24 #ifndef NUMLDocument_h 25 #define NUMLDocument_h 59 #define IdCheckON 0x01; 62 #define IdCheckOFF 0xfe; 65 #define NUMLCheckON 0x02; 68 #define NUMLCheckOFF 0xfd; 71 #define SBOCheckON 0x04; 74 #define SBOCheckOFF 0xfb; 77 #define MathCheckON 0x08; 80 #define MathCheckOFF 0xf7; 83 #define UnitsCheckON 0x10; 86 #define UnitsCheckOFF 0xef; 88 #ifndef OverdeterCheckON 89 #define OverdeterCheckON 0x20; 91 #ifndef OverdeterCheckOFF 92 #define OverdeterCheckOFF 0xdf; 94 #ifndef PracticeCheckON 95 #define PracticeCheckON 0x40; 97 #ifndef PracticeCheckOFF 98 #define PracticeCheckOFF 0xbf; 101 #define AllChecksON 0x7f; 123 static unsigned int getDefaultLevel ();
141 static unsigned int getDefaultVersion ();
183 NUMLDocument (
unsigned int level = 0,
unsigned int version = 0);
221 unsigned int getNumOntologyTerms ()
const;
291 unsigned int getNumResultComponents()
const;
303 bool setLevelAndVersion (
unsigned int level,
unsigned int version,
328 const NUMLError* getError (
unsigned int n)
const;
337 unsigned int getNumErrors ()
const;
366 void printErrors (std::ostream& stream = std::cerr)
const;
435 virtual LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces*
getNamespaces()
const;
451 virtual void writeElements (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& stream)
const;
460 virtual NMBase*
createObject (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream& stream);
469 void readAttributes (
const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLAttributes& attributes);
477 virtual void writeAttributes (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& stream)
const;
482 bool conversion_errors(
unsigned int errors);
487 bool hasStrictUnits();
564 ,
unsigned int version );
571 ,
unsigned int version );
LIBNUML_EXTERN unsigned int NUMLDocument_getNumErrors(const NUMLDocument_t *d)
Returns the number of errors or warnings encountered during parsing, consistency checking, or attempted translation of this model.
Definition: NUMLDocument.cpp:1008
This is the base class for all numl objects.
Definition: NMBase.h:70
Definition: OntologyTerm.h:300
NUMLErrorLog * getErrorLog()
Definition: NMBase.cpp:2050
#define BEGIN_C_DECLS
Definition: extern.h:112
LIBNUML_EXTERN NUMLDocument_t * NUMLDocument_createWithLevelAndVersion(unsigned int level, unsigned int version)
Creates a new, empty NUMLDocument_t structure with given values for the NUML Level and Version...
Definition: NUMLDocument.cpp:820
virtual NMBase * createObject(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream &stream)
Subclasses should override this method to create, store, and then return an NUML object corresponding...
Definition: NMBase.cpp:1714
virtual void setParentNUMLObject(NMBase *sb)
Sets the parent NUML object of this NUML object.
Definition: NMBase.cpp:485
virtual void writeElements(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream &stream) const
Subclasses should override this method to write out their contained NUML objects as XML elements...
Definition: NMBase.cpp:1693
int mVersion
Definition: NUMLDocument.h:496
stores the result component
Definition: ResultComponent.h:57
unsigned char mApplicableValidatorsForConversion
Definition: NUMLDocument.h:505
LIBNUML_EXTERN unsigned int NUMLDocument_getLevel(const NUMLDocument_t *d)
Returns the NUML Level of the given NUMLDocument_t structure.
Definition: NUMLDocument.cpp:863
#define LIBNUML_CPP_NAMESPACE_BEGIN
Definition: libnuml-namespace.h:71
NUMLErrorCategory_t
Category codes for NUMLError diagnostics.
Definition: NUMLError.h:145
LIBNUML_EXTERN unsigned int NUMLDocument_getVersion(const NUMLDocument_t *d)
Returns the Version within the NUML Level of the given NUMLDocument_t structure.
Definition: NUMLDocument.cpp:879
virtual LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * getNamespaces() const
Returns the content of the "annotation" subelement of this object as a character string.
Definition: NMBase.cpp:241
LIBNUML_EXTERN const NUMLError_t * NUMLDocument_getError(NUMLDocument_t *d, unsigned int n)
Returns the nth error or warning encountered during parsing, consistency checking, or attempted translation of this model.
Definition: NUMLDocument.cpp:988
virtual void setNUMLDocument(NUMLDocument *d)
Sets the parent NUMLDocument of this NUML object.
Definition: NMBase.cpp:434
unsigned int NUMLDocument_getDefaultVersion()
Definition: NUMLDocument.cpp:1063
unsigned char mApplicableValidators
Definition: NUMLDocument.h:504
The reader class implementing reading NuML documents from file / string.
Definition: NUMLReader.h:44
LIBNUML_EXTERN void NUMLDocument_printErrors(NUMLDocument_t *d, FILE *stream)
Prints to the given output stream all the errors or warnings encountered during parsing, consistency checking, or attempted translation of this model.
Definition: NUMLDocument.cpp:1033
NUMLTypeCode_t
An enumeration of NUML types to help identify NUML objects at runtime.
Definition: NUMLTypeCodes.h:33
LIBNUML_EXTERN void NUMLDocument_free(NUMLDocument_t *d)
Frees the given NUMLDocument_t structure.
Definition: NUMLDocument.cpp:833
LIBNUML_EXTERN int NUMLDocument_setLevelAndVersionStrict(NUMLDocument_t *d, unsigned int level, unsigned int version)
Sets the NUML Level and Version of this NUMLDocument, attempting to convert the model as needed...
Definition: NUMLDocument.cpp:960
This represents the numl document that contains all information.
Definition: NUMLDocument.h:106
#define LIBNUML_EXTERN
Begin svn Header.
Definition: extern.h:104
the error log containing all errors / warnings encountered
Definition: NUMLErrorLog.h:38
virtual const std::string & getElementName() const =0
Returns the XML element name of this object.
Implementation of the Visitor design pattern, for operations on NUML objects.
Definition: NUMLVisitor.h:72
Definition: ResultComponent.h:322
LIBNUML_EXTERN int NUMLDocument_setLevelAndVersion(NUMLDocument_t *d, unsigned int level, unsigned int version)
Sets the NUML Level and Version of this NUMLDocument, attempting to convert the ResultComponent as ne...
Definition: NUMLDocument.cpp:914
LIBNUML_EXTERN NUMLDocument_t * NUMLDocument_create()
Creates a new, empty NUMLDocument_t structure.
Definition: NUMLDocument.cpp:799
virtual NUMLTypeCode_t getTypeCode() const
Returns the libnuml type code for this object.
Definition: NMBase.cpp:623
ontology terms store information about what individual elements represents
Definition: OntologyTerm.h:44
#define END_C_DECLS
Definition: extern.h:113
virtual void readAttributes(const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLAttributes &attributes)
Subclasses should override this method to read values from the given XMLAttributes set into their spe...
Definition: NMBase.cpp:2134
OntologyTerms mOntologyTerms
Definition: NUMLDocument.h:498
virtual bool accept(NUMLVisitor &v) const =0
Accepts the given NUMLVisitor for this instance of NMBase.
contains all error information collected
Definition: NUMLError.h:234
CLASS_OR_STRUCT XMLNamespaces XMLNamespaces_t
Definition: numlfwd.h:247
NUMLErrorLog mErrorLog
Definition: NUMLDocument.h:502
#define LIBNUML_CPP_NAMESPACE_END
Definition: libnuml-namespace.h:72
int mLevel
Definition: NUMLDocument.h:495
CLASS_OR_STRUCT NUMLDocument NUMLDocument_t
This represents the numl document that contains all information.
Definition: numlfwd.h:88
unsigned int NUMLDocument_getDefaultLevel()
Definition: NUMLDocument.cpp:1052
virtual int getElementPosition() const
The NUML XML Schema is written such that the order of child elements is significant.
Definition: NMBase.cpp:2040
CLASS_OR_STRUCT NUMLError NUMLError_t
contains all error information collected
Definition: numlfwd.h:190
LIBNUML_EXTERN const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces_t * NUMLDocument_getNamespaces(NUMLDocument_t *d)
Returns a list of XMLNamespaces_t associated with the XML content of this NUML document.
Definition: NUMLDocument.cpp:1078
virtual void writeAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream &stream) const
Subclasses should override this method to write their XML attributes to the XMLOutputStream.
Definition: NMBase.cpp:2159
ResultComponents mResultComponents
Definition: NUMLDocument.h:499
LIBNUML_EXTERN NUMLDocument_t * NUMLDocument_clone(const NUMLDocument_t *d)
Creates and returns a deep copy of the given NUMLDocument_t structure.
Definition: NUMLDocument.cpp:848
virtual NMBase * clone() const =0
Creates and returns a deep copy of this NMBase object.