libNuML 1.1.1
Library for reading / writing NuML documents
TupleDescription.h
Go to the documentation of this file.
1/*
2* ****************************************************************************
3* This file is part of libNUML. Please visit http://code.google.com/p/numl/for more
4* information about NUML, and the latest version of libNUML.
5* Copyright (c) 2013 The University of Manchester.
6*
7* This library is free software; you can redistribute it and/or modify it
8* under the terms of the GNU Lesser General Public License as published
9* by the Free Software Foundation. A copy of the license agreement is
10* provided in the file named "LICENSE.txt" included with this software
11* distribution and also available online as http://www.gnu.org/licenses/lgpl.html
12*
13* Contributors:
14* Joseph O. Dada, The University of Manchester - initial API and implementation
15* ****************************************************************************
16**/
17
24#ifndef TUPLEDESCRIPTION_H_
25#define TUPLEDESCRIPTION_H_
26
27#include <numl/common/extern.h>
28#include <numl/common/numlfwd.h>
29
30
31
32#include <numl/NMBase.h>
33#include <numl/NUMLList.h>
35#include <vector>
36
37
38#ifdef __cplusplus
39LIBNUML_CPP_NAMESPACE_BEGIN
40
42class NUMLVisitor;
43
45{
46
47public:
48
51
69 TupleDescription (unsigned int level, unsigned int version);
70
93
99 virtual TupleDescription* clone () const;
100
101 virtual const std::string& getId() const;
102 virtual int setId(const std::string& id);
103
104
124 virtual NUMLTypeCode_t getTypeCode () const { return NUML_NUMLLIST; };
125
126
148 virtual NUMLTypeCode_t getItemTypeCode () const;
149
150
164 virtual int getElementPosition () const;
165
173 virtual const std::string& getElementName () const;
174
175
176
186 virtual AtomicDescription * getAtomicDescription(unsigned int n);
187
188
198 virtual const AtomicDescription * getAtomicDescription(unsigned int n) const;
199
210 virtual AtomicDescription* removeAtomicDescription (unsigned int n);
211
220
221 virtual NMBase* createObject (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream& stream);
222
223 //write to the output stream
224 virtual void write(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& stream) const;
225
226protected:
227
232 virtual void readAttributes(const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLAttributes & attributes);
233 virtual void writeAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream & stream) const;
234 //virtual NMBase* createObject (XMLInputStream& stream);
235 //TupleDescription *mTupleDescription;
236
237 std::string mId;
238 std::string mName;
239 std::string mOntologyTerm;
240
241};
242LIBNUML_CPP_NAMESPACE_END
243
244#endif /* __cplusplus */
245
246#ifndef SWIG
247
248LIBNUML_CPP_NAMESPACE_BEGIN
250
251//TODO
252
254LIBNUML_CPP_NAMESPACE_END
255
256#endif /* !SWIG */
257
258#endif /* TUPLEDESCRIPTION_H_ */
NUMLTypeCode_t
An enumeration of NUML types to help identify NUML objects at runtime.
Definition: NUMLTypeCodes.h:34
@ NUML_NUMLLIST
Definition: NUMLTypeCodes.h:52
This class stores the atomic description.
Definition: AtomicDescription.h:42
This class stores the dimension description.
Definition: DimensionDescription.h:59
virtual int setId(const std::string &id)
Definition: DimensionDescription.cpp:302
virtual DimensionDescription * clone() const
Creates and returns a deep copy of this NMBase object.
Definition: DimensionDescription.cpp:172
virtual NMBase * createObject(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream &stream)
Definition: DimensionDescription.cpp:327
AtomicDescription * createAtomicDescription()
creates a new atomic description and adds it to the dimensiondescription
Definition: DimensionDescription.cpp:145
virtual const std::string & getElementName() const
Returns the XML element name of this object, which for DimensionDescription, is always "model".
Definition: DimensionDescription.cpp:75
virtual NUMLTypeCode_t getItemTypeCode() const
Returns the libNUML type code for the objects contained in this NUMLList (i.e., CompositeDescription ...
Definition: DimensionDescription.cpp:183
virtual const std::string & getId() const
Definition: DimensionDescription.cpp:296
virtual int getElementPosition() const
Get the ordinal position of this element in the containing object (which in this case is the Model ob...
Definition: DimensionDescription.cpp:267
This is the base class for all numl objects.
Definition: NMBase.h:71
void write(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream &stream) const
Writes (serializes) this NUML object by writing it to XMLOutputStream.
Definition: NMBase.cpp:1666
virtual void writeAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream &stream) const
Subclasses should override this method to write their XML attributes to the XMLOutputStream.
Definition: NUMLList.cpp:441
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: NUMLList.cpp:410
namespace class
Definition: NUMLNamespaces.h:47
Implementation of the Visitor design pattern, for operations on NUML objects.
Definition: NUMLVisitor.h:73
stores the tuple description
Definition: TupleDescription.h:45
std::string mOntologyTerm
Definition: TupleDescription.h:239
virtual NUMLTypeCode_t getTypeCode() const
Returns the libNUML type code for this NUML object.
Definition: TupleDescription.h:124
std::string mName
Definition: TupleDescription.h:238
std::string mId
Definition: TupleDescription.h:237
#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