本文整理汇总了C++中Cantera::handleAllExceptions方法的典型用法代码示例。如果您正苦于以下问题:C++ Cantera::handleAllExceptions方法的具体用法?C++ Cantera::handleAllExceptions怎么用?C++ Cantera::handleAllExceptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cantera
的用法示例。
在下文中一共展示了Cantera::handleAllExceptions方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ctml_getfloatarray_
status_t ctml_getfloatarray_(const integer* i, const integer* n,
doublereal* data, const integer* iconvert)
{
try {
XML_Node& node = *_xml(i);
Cantera::vector_fp v;
bool conv = false;
if (*iconvert > 0) {
conv = true;
}
getFloatArray(node, v, conv);
int nv = v.size();
// array not big enough
if (*n < nv) {
throw CanteraError("ctml_getfloatarray",
"array must be dimensioned at least "+Cantera::int2str(nv));
}
for (int i = 0; i < nv; i++) {
data[i] = v[i];
}
} catch (...) {
return handleAllExceptions(-1, ERR);
}
return 0;
}
示例2: fxml_copy_
status_t fxml_copy_(const integer* i)
{
try {
return XmlCabinet::newCopy(*i);
} catch (...) {
return handleAllExceptions(-1, ERR);
}
}
示例3: fxml_del_
status_t fxml_del_(const integer* i)
{
try {
XmlCabinet::del(*i);
return 0;
} catch (...) {
return handleAllExceptions(-1, ERR);
}
}
示例4: fxml_removechild_
status_t fxml_removechild_(const integer* i, const integer* j)
{
try {
_xml(i)->removeChild(_xml(j));
return 0;
} catch (...) {
return handleAllExceptions(-1, ERR);
}
}
示例5: fxml_get_xml_file_
status_t fxml_get_xml_file_(const char* file, ftnlen filelen)
{
try {
XML_Node* x = Cantera::get_XML_File(f2string(file, filelen));
return XmlCabinet::add(x);
} catch (...) {
return handleAllExceptions(-1, ERR);
}
}
示例6: fxml_clear_
status_t fxml_clear_()
{
try {
XmlCabinet::clear();
Cantera::close_XML_File("all");
return 0;
} catch (...) {
return handleAllExceptions(-1, ERR);
}
}
示例7: fxml_nchildren_
integer fxml_nchildren_(const integer* i)
{
try {
XML_Node& node = *_xml(i);
return node.nChildren();
} catch (...) {
return handleAllExceptions(-1, ERR);
}
return 0;
}
示例8: fxml_child_
status_t fxml_child_(const integer* i, const char* loc, ftnlen loclen)
{
try {
XML_Node& node = *_xml(i);
XML_Node& c = node.child(f2string(loc, loclen));
return XmlCabinet::add(&c);
} catch (...) {
return handleAllExceptions(-1, ERR);
}
}
示例9: fxml_child_bynumber_
status_t fxml_child_bynumber_(const integer* i, const integer* m)
{
try {
XML_Node& node = *_xml(i);
XML_Node& c = node.child(*m);
return XmlCabinet::add(&c);
} catch (...) {
return handleAllExceptions(-1, ERR);
}
return 0;
}
示例10: fxml_value_
status_t fxml_value_(const integer* i, char* value, ftnlen valuelen)
{
try {
XML_Node& node = *_xml(i);
const std::string v = node.value();
strncpy(value, v.c_str(), valuelen);
} catch (...) {
return handleAllExceptions(-1, ERR);
}
return 0;
}
示例11: fxml_tag_
status_t fxml_tag_(const integer* i, char* tag, ftnlen taglen)
{
try {
XML_Node& node = *_xml(i);
const std::string v = node.name();
strncpy(tag, v.c_str(), taglen);
} catch (...) {
return handleAllExceptions(-1, ERR);
}
return 0;
}
示例12: fxml_addcomment_
status_t fxml_addcomment_(const integer* i, const char* comment,
ftnlen commentlen)
{
try {
std::string c = f2string(comment, commentlen);
XML_Node& node = *_xml(i);
node.addComment(c);
} catch (...) {
return handleAllExceptions(-1, ERR);
}
return 0;
}
示例13: fxml_addchildnode_
status_t fxml_addchildnode_(const integer* i, const integer* j)
{
try {
XML_Node& node = *_xml(i);
XML_Node& chld = *_xml(j);
XML_Node& c = node.addChild(chld);
return XmlCabinet::add(&c);
} catch (...) {
return handleAllExceptions(-1, ERR);
}
return 0;
}
示例14: fxml_addchild_
status_t fxml_addchild_(const integer* i, const char* name,
const char* value, ftnlen namelen, ftnlen valuelen)
{
try {
XML_Node& node = *_xml(i);
XML_Node& c = node.addChild(f2string(name, namelen),
f2string(value,valuelen));
return XmlCabinet::add(&c);
} catch (...) {
return handleAllExceptions(-1, ERR);
}
return 0;
}
示例15: fxml_addattrib_
status_t fxml_addattrib_(const integer* i, const char* key,
const char* value, ftnlen keylen, ftnlen valuelen)
{
try {
std::string ky = f2string(key, keylen);
std::string val = f2string(value, valuelen);
XML_Node& node = *_xml(i);
node.addAttribute(ky, val);
} catch (...) {
return handleAllExceptions(-1, ERR);
}
return 0;
}