示例#1
0
bool CFunctionDB::load(const std::string& fileName)
{
  CCopasiXML XML;
  XML.setFunctionList(&mLoadedFunctions);
  std::fstream str(fileName.c_str());

  if (str.fail())
    return false;

  if (!XML.load(str, ""))
    return false;

  return true;
}
示例#2
0
bool CFunctionDB::load()
{
  CCopasiXML XML;
  XML.setFunctionList(&mLoadedFunctions);

  std::stringstream DB;
  DB.str(FunctionDBxml);

  if (DB.fail())
    return false;

  if (!XML.load(DB, ""))
    return false;

  return true;
}