30 #include <sbml/util/List.h> 33 #include <sbml/SyntaxChecker.h> 44 #include <sbml/xml/XMLAttributes.h> 45 #include <sbml/xml/XMLOutputStream.h> 46 #include <sbml/xml/XMLNode.h> 47 #include <sbml/xml/XMLInputStream.h> 48 #include <sbml/xml/XMLNamespaces.h> 49 #include <sbml/xml/XMLToken.h> 101 virtual NMBase* clone ()
const = 0;
127 const std::string& getMetaId ()
const;
153 std::string& getMetaId ();
163 virtual const std::string& getId ()
const;
173 virtual const std::string& getName ()
const;
211 virtual LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces* getNamespaces()
const ;
262 NMBase* getParentNUMLObject();
291 unsigned int getLine ()
const;
302 unsigned int getColumn ()
const;
330 bool isSetMetaId ()
const;
342 bool isSetName ()
const;
372 int setMetaId (
const std::string& metaid);
390 virtual int setId (
const std::string& sid);
424 virtual void setParentNUMLObject (
NMBase* sb);
437 int setNamespaces(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces* xmlns);
504 unsigned int getLevel ()
const;
514 unsigned int getVersion ()
const;
566 bool hasValidLevelVersionNamespaceCombination();
576 virtual const std::string& getElementName ()
const = 0;
592 void read (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream& stream);
598 void write (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& stream)
const;
611 virtual void writeElements (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& stream)
const;
618 virtual bool hasRequiredAttributes()
const ;
625 virtual bool hasRequiredElements()
const ;
635 void syncAnnotation();
636 bool isSetNotes()
const;
637 bool isSetAnnotation()
const;
638 virtual int setAnnotation(
const XMLNode* annotation);
639 virtual int setAnnotation(
const std::string& annotation);
640 virtual int appendAnnotation(
const XMLNode* annotation);
641 virtual int appendAnnotation(
const std::string& annotation);
642 int removeTopLevelAnnotationElement(
const std::string elementName,
643 const std::string elementURI =
"");
644 int replaceTopLevelAnnotationElement(
const XMLNode* annotation);
645 int replaceTopLevelAnnotationElement(
const std::string& annotation);
646 int setNotes(
const XMLNode* notes);
647 int setNotes(
const std::string& notes,
bool addXHTMLMarkup =
false);
648 int appendNotes(
const XMLNode* notes);
649 int appendNotes(
const std::string& notes);
651 int unsetAnnotation();
653 XMLNode* getNotes()
const;
654 std::string getNotesString()
const;
655 XMLNode* getAnnotation()
const;
656 std::string getAnnotationString()
const;
669 virtual void writeXMLNS(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& stream)
const;
687 NMBase (
const std::string&
id =
"",
const std::string& name =
"");
694 NMBase (
unsigned int level,
unsigned int version);
718 virtual NMBase* createObject (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream& stream);
727 virtual bool readOtherXML (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream& stream);
740 virtual int getElementPosition ()
const;
768 void logError (
unsigned int id 769 ,
const unsigned int level = 2
770 ,
const unsigned int version = 3
771 ,
const std::string& details =
"" );
777 void logUnknownAttribute( std::string attribute,
778 const unsigned int level,
779 const unsigned int version,
780 const std::string element );
786 void logUnknownElement(
const std::string element,
787 const unsigned int level,
788 const unsigned int version );
794 void logEmptyString( std::string attribute,
795 const unsigned int level,
796 const unsigned int version,
797 std::string element);
805 virtual void readAttributes (
const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLAttributes& attributes);
818 virtual void writeAttributes (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& stream)
const;
825 void checkOrderAndLogError (
NMBase*
object,
int expected);
833 void checkNUMLListPopulated(
NMBase*
object);
861 void checkUnitSyntax(
unsigned int flag = 0);
868 void checkDefaultNamespace(
const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces* xmlns,
const std::string& elementName);
876 void checkXHTML(
const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *);
882 void checkAnnotation();
890 LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode*
mNotes;
922 void setNMBaseFields (
const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLToken& element);
928 bool readAnnotation (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream& stream);
934 bool readNotes (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream& stream);
936 bool getHasBeenDeleted();
988 LIBSBML_CPP_NAMESPACE_QUALIFIER
XMLNode_t *
994 NMBase_getNotesString (
NMBase_t *sb);
998 LIBSBML_CPP_NAMESPACE_QUALIFIER
XMLNode_t *
999 NMBase_getAnnotation (
NMBase_t *sb);
1004 NMBase_getAnnotationString (
NMBase_t *sb);
1014 NMBase_isSetNotes (
const NMBase_t *sb);
1019 NMBase_isSetAnnotation (
const NMBase_t *sb);
1034 NMBase_setNotes (
NMBase_t *sb, LIBSBML_CPP_NAMESPACE_QUALIFIER
XMLNode_t *notes);
1039 NMBase_setNotesString (
NMBase_t *sb,
char *notes);
1044 NMBase_appendNotes (
NMBase_t *sb, LIBSBML_CPP_NAMESPACE_QUALIFIER
XMLNode_t *notes);
1049 NMBase_appendNotesString (
NMBase_t *sb,
char *notes);
1054 NMBase_setAnnotation (
NMBase_t *sb, LIBSBML_CPP_NAMESPACE_QUALIFIER
XMLNode_t *annotation);
1059 NMBase_setAnnotationString (
NMBase_t *sb,
char *annotation);
1064 NMBase_appendAnnotation (
NMBase_t *sb, LIBSBML_CPP_NAMESPACE_QUALIFIER
XMLNode_t *annotation);
1069 NMBase_appendAnnotationString (
NMBase_t *sb,
char *annotation);
This is the base class for all numl objects.
Definition: NMBase.h:70
LIBNUML_EXTERN NUMLTypeCode_t NMBase_getTypeCode(const NMBase_t *sb)
Returns the libNUML type code for the given structure.
Definition: NMBase.cpp:2524
LIBNUML_EXTERN int NMBase_hasValidLevelVersionNamespaceCombination(NMBase_t *sb)
Predicate returning nonzero true or false depending on whether the object's level/version and namespa...
Definition: NMBase.cpp:2602
unsigned int mColumn
Definition: NMBase.h:900
std::string mName
Definition: NMBase.h:886
LIBNUML_EXTERN int NMBase_setNamespaces(NMBase_t *sb, LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces_t *xmlns)
Sets the namespaces relevant of this NUML object.
Definition: NMBase.cpp:2481
#define BEGIN_C_DECLS
Definition: extern.h:112
unsigned int mLine
Definition: NMBase.h:899
#define LIBNUML_CPP_NAMESPACE_BEGIN
Definition: libnuml-namespace.h:71
std::string mId
Definition: NMBase.h:885
NUMLDocument * mNUML
Definition: NMBase.h:888
NUMLConstructorException()
elements permitted on the body element of xhtml
Definition: NMBase.cpp:59
LIBNUML_EXTERN const char * NMBase_getElementName(const NMBase_t *sb)
Returns the XML element name of the given structure.
Definition: NMBase.cpp:2542
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * mNotes
Definition: NMBase.h:890
NMBase * mParentNUMLObject
Definition: NMBase.h:905
LIBNUML_EXTERN int NMBase_isSetMetaId(const NMBase_t *sb)
Predicate returning nonzero true or false depending on whether the given structure's "metaid" attribu...
Definition: NMBase.cpp:2423
LIBNUML_EXTERN const NUMLDocument_t * NMBase_getNUMLDocument(NMBase_t *sb)
Returns the value of the "id" attribute of the given NMBase_t structure.
Definition: NMBase.cpp:2358
NUMLNamespaces * mNUMLNamespaces
Definition: NMBase.h:896
LIBNUML_EXTERN unsigned int NMBase_getLine(const NMBase_t *sb)
Returns the line number on which the given object first appears in the XML representation of the NUML...
Definition: NMBase.cpp:2560
LIBNUML_EXTERN unsigned int NMBase_getVersion(const NMBase_t *sb)
Returns the Version within the NUML Level of the overall NUML document.
Definition: NMBase.cpp:2407
LIBNUML_EXTERN const char * NMBase_getMetaId(NMBase_t *sb)
Returns the value of the "metaid" attribute of the given NMBase_t structure.
Definition: NMBase.cpp:2310
CLASS_OR_STRUCT XMLNode XMLNode_t
Definition: numlfwd.h:235
std::string mMetaId
Definition: NMBase.h:884
LIBNUML_EXTERN const NMBase_t * NMBase_getParentNUMLObject(NMBase_t *sb)
Returns the parent NMBase_t structure of the given NMBase_t structure.
Definition: NMBase.cpp:2374
NUMLTypeCode_t
An enumeration of NUML types to help identify NUML objects at runtime.
Definition: NUMLTypeCodes.h:33
LIBNUML_EXTERN unsigned int NMBase_getLevel(const NMBase_t *sb)
Returns the NUML Level of the overall NUML document.
Definition: NMBase.cpp:2390
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
Implementation of the Visitor design pattern, for operations on NUML objects.
Definition: NUMLVisitor.h:72
namespace class
Definition: NUMLNamespaces.h:46
#define END_C_DECLS
Definition: extern.h:113
LIBNUML_EXTERN int NMBase_setMetaId(NMBase_t *sb, const char *metaid)
Sets the value of the "metaid" attribute of the given object.
Definition: NMBase.cpp:2459
CLASS_OR_STRUCT XMLNamespaces XMLNamespaces_t
Definition: numlfwd.h:247
#define LIBNUML_CPP_NAMESPACE_END
Definition: libnuml-namespace.h:72
bool mHasBeenDeleted
Definition: NMBase.h:910
std::string mEmptyString
Definition: NMBase.h:912
LIBNUML_EXTERN unsigned int NMBase_getColumn(const NMBase_t *sb)
Returns the column number on which the given object first appears in the XML representation of the NU...
Definition: NMBase.cpp:2578
CLASS_OR_STRUCT NUMLDocument NUMLDocument_t
This represents the numl document that contains all information.
Definition: numlfwd.h:88
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * mAnnotation
Definition: NMBase.h:891
int mDept
Definition: NMBase.h:902
CLASS_OR_STRUCT NMBase NMBase_t
This is the base class for all numl objects.
Definition: numlfwd.h:82
LIBNUML_EXTERN int NMBase_unsetMetaId(NMBase_t *sb)
Unsets the "metaid" attribute of the given object.
Definition: NMBase.cpp:2500