#include <iostream>
#include <sstream>
#ifdef LIBSBML_HAS_PACKAGE_COMP
#endif
LIBSBML_CPP_NAMESPACE_USE
using namespace std;
const string usage = "Usage: flattenModel [-p] inputFile outputFile\n"
" -p : list unused ports";
int main(int argc,char** argv)
{
bool leavePorts = false;
if (argc < 3)
{
cout << usage << endl;
return 1;
}
else if (argc == 3)
{
if ( string("-p") == string(argv[1]) )
{
cout << usage << endl;
return 1;
}
}
int argIndex = 1;
if ( string("-p") == string(argv[1]) )
{
leavePorts = true;
++argIndex;
}
{
cerr << "The version of libsbml being used does not have the comp"
<< " package code enabled" << endl;
return 1;
}
const char* inputFile = argv[argIndex];
const char* outputFile = argv[argIndex+1];
{
cerr << "Encountered the following SBML errors:" << endl;
return 1;
}
{
cerr << "Conversion failed\n";
}
delete converter;
delete document;
}
Include all SBML types of Comp extension in a single header file.
Definition of SBMLConverterRegistry, a registry of available converters.
Template class for registering extension packages.
SBMLDocument_t * readSBML(const char *filename)
Reads an SBML document from the given file.
Include all SBML types in a single header file.
int writeSBML(const SBMLDocument_t *d, const char *filename)
Writes the given SBML document d to the file named by filename.
Definition: ConversionProperties.h:84
virtual void addOption(const ConversionOption &option)
Adds a copy of the given option to this properties object.
Definition: ConversionProperties.cpp:232
Definition: SBMLConverter.h:77
virtual int setDocument(const SBMLDocument *doc)
Sets the SBML document to be converted.
Definition: SBMLConverter.cpp:148
virtual int convert()
Perform the conversion.
Definition: SBMLConverter.cpp:181
SBMLConverter * getConverterFor(const ConversionProperties &props) const
Returns the converter that best matches the given configuration properties.
Definition: SBMLConverterRegistry.cpp:80
static SBMLConverterRegistry & getInstance()
Returns the singleton instance for the converter registry.
Definition: SBMLConverterRegistry.cpp:63
Definition: SBMLDocument.h:349
unsigned int getNumErrors() const
Returns the number of errors or warnings encountered during parsing, consistency checking,...
Definition: SBMLDocument.cpp:1163
void printErrors(std::ostream &stream=std::cerr) const
Prints all the errors or warnings encountered trying to parse, check, or translate this SBML document...
Definition: SBMLDocument.cpp:1186
static bool isPackageEnabled(const std::string &package)
Returns true if the named package is enabled.
Definition: SBMLExtensionRegistry.cpp:568
@ LIBSBML_OPERATION_SUCCESS
Definition: operationReturnValues.h:61