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>
54LIBNUML_CPP_NAMESPACE_BEGIN
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();
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 LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode* annotation);
639 virtual int setAnnotation(
const std::string& annotation);
641 virtual int appendAnnotation(
const std::string& annotation);
642 int removeTopLevelAnnotationElement(
const std::string elementName,
643 const std::string elementURI =
"");
645 int replaceTopLevelAnnotationElement(
const std::string& annotation);
646 int setNotes(
const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode* notes);
647 int setNotes(
const std::string& notes,
bool addXHTMLMarkup =
false);
648 int appendNotes(
const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode* notes);
649 int appendNotes(
const std::string& notes);
651 int unsetAnnotation();
653 LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode* getNotes()
const;
654 std::string getNotesString()
const;
655 LIBSBML_CPP_NAMESPACE_QUALIFIER 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();
941LIBNUML_CPP_NAMESPACE_END
949LIBNUML_CPP_NAMESPACE_BEGIN
988LIBSBML_CPP_NAMESPACE_QUALIFIER
XMLNode_t *
994NMBase_getNotesString (
NMBase_t *sb);
998LIBSBML_CPP_NAMESPACE_QUALIFIER
XMLNode_t *
1004NMBase_getAnnotationString (
NMBase_t *sb);
1014NMBase_isSetNotes (
const NMBase_t *sb);
1019NMBase_isSetAnnotation (
const NMBase_t *sb);
1034NMBase_setNotes (
NMBase_t *sb, LIBSBML_CPP_NAMESPACE_QUALIFIER
XMLNode_t *notes);
1039NMBase_setNotesString (
NMBase_t *sb,
char *notes);
1044NMBase_appendNotes (
NMBase_t *sb, LIBSBML_CPP_NAMESPACE_QUALIFIER
XMLNode_t *notes);
1049NMBase_appendNotesString (
NMBase_t *sb,
char *notes);
1054NMBase_setAnnotation (
NMBase_t *sb, LIBSBML_CPP_NAMESPACE_QUALIFIER
XMLNode_t *annotation);
1059NMBase_setAnnotationString (
NMBase_t *sb,
char *annotation);
1064NMBase_appendAnnotation (
NMBase_t *sb, LIBSBML_CPP_NAMESPACE_QUALIFIER
XMLNode_t *annotation);
1069NMBase_appendAnnotationString (
NMBase_t *sb,
char *annotation);
1102LIBNUML_CPP_NAMESPACE_END
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:2460
LIBNUML_EXTERN const char * NMBase_getElementName(const NMBase_t *sb)
Returns the XML element name of the given structure.
Definition: NMBase.cpp:2543
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:2311
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:2375
LIBNUML_EXTERN NUMLTypeCode_t NMBase_getTypeCode(const NMBase_t *sb)
Returns the libNUML type code for the given structure.
Definition: NMBase.cpp:2525
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:2482
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:2603
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:2579
LIBNUML_EXTERN unsigned int NMBase_getLevel(const NMBase_t *sb)
Returns the NUML Level of the overall NUML document.
Definition: NMBase.cpp:2391
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:2424
LIBNUML_EXTERN const NUMLDocument_t * NMBase_getNUMLDocument(NMBase_t *sb)
**
Definition: NMBase.cpp:2359
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:2408
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:2561
LIBNUML_EXTERN int NMBase_unsetMetaId(NMBase_t *sb)
Unsets the "metaid" attribute of the given object.
Definition: NMBase.cpp:2501
NUMLTypeCode_t
An enumeration of NUML types to help identify NUML objects at runtime.
Definition: NUMLTypeCodes.h:34
This is the base class for all numl objects.
Definition: NMBase.h:71
virtual int appendAnnotation(const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *annotation)
unsigned int mLine
Definition: NMBase.h:899
int appendNotes(const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *notes)
std::string mId
Definition: NMBase.h:885
bool mHasBeenDeleted
Definition: NMBase.h:910
virtual const std::string & getElementName() const =0
Returns the XML element name of this object.
int mDept
Definition: NMBase.h:902
virtual bool accept(NUMLVisitor &v) const =0
Accepts the given NUMLVisitor for this instance of NMBase.
virtual NMBase * clone() const =0
Creates and returns a deep copy of this NMBase object.
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * mNotes
Definition: NMBase.h:890
virtual int setAnnotation(const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *annotation)
NUMLNamespaces * mNUMLNamespaces
Definition: NMBase.h:896
NMBase * mParentNUMLObject
Definition: NMBase.h:905
int replaceTopLevelAnnotationElement(const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *annotation)
std::string mMetaId
Definition: NMBase.h:884
std::string mEmptyString
Definition: NMBase.h:912
NUMLDocument * mNUML
Definition: NMBase.h:888
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * mAnnotation
Definition: NMBase.h:891
unsigned int mColumn
Definition: NMBase.h:900
std::string mName
Definition: NMBase.h:886
int setNotes(const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *notes)
NUMLConstructorException()
elements permitted on the body element of xhtml
Definition: NMBase.cpp:60
This represents the numl document that contains all information.
Definition: NUMLDocument.h:107
the error log containing all errors / warnings encountered
Definition: NUMLErrorLog.h:39
namespace class
Definition: NUMLNamespaces.h:47
Implementation of the Visitor design pattern, for operations on NUML objects.
Definition: NUMLVisitor.h:73
#define BEGIN_C_DECLS
Definition: extern.h:112
#define LIBNUML_EXTERN
Begin svn Header.
Definition: extern.h:104
#define END_C_DECLS
Definition: extern.h:113
CLASS_OR_STRUCT XMLNode XMLNode_t
Definition: numlfwd.h:235
CLASS_OR_STRUCT NUMLDocument NUMLDocument_t
Definition: numlfwd.h:88
CLASS_OR_STRUCT NMBase NMBase_t
Definition: numlfwd.h:82
CLASS_OR_STRUCT XMLNamespaces XMLNamespaces_t
Definition: numlfwd.h:247