libNuML 1.1.1
Library for reading / writing NuML documents
Tuple.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 TUPLE_H_
25#define TUPLE_H_
26
27#include <numl/common/extern.h>
28#include <numl/common/numlfwd.h>
29
30
31#include <numl/NMBase.h>
32#include <numl/NUMLList.h>
33#include <numl/Dimension.h>
34#include <vector>
35
36
37#ifdef __cplusplus
38LIBNUML_CPP_NAMESPACE_BEGIN
39
40class AtomicValue;
41class AtomicValues;
42class NUMLVisitor;
43
45{
46
47public:
48
49 Tuple();
50 ~Tuple();
51
69 Tuple (unsigned int level, unsigned int version);
70
92 Tuple (NUMLNamespaces* numlns);
93
99 virtual Tuple* clone () const;
100
101
121 virtual NUMLTypeCode_t getTypeCode () const { return NUML_TUPLE; };
122
123
145 virtual NUMLTypeCode_t getItemTypeCode () const;
146
160 virtual int getElementPosition () const;
161
169 virtual const std::string& getElementName () const;
170
171
172
173
174
184 virtual AtomicValue * getAtomicValue(unsigned int n);
185
186
196 virtual const AtomicValue * getAtomicValue(unsigned int n) const;
197
208 virtual AtomicValue* removeAtomicValue (unsigned int n);
209
218
219
220 virtual NMBase* createObject (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream& stream);
221
227 //virtual void writeElements(XMLOutputStream& stream) const;
228
229 virtual void write(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream& stream) const;
230
231protected:
232
237 //virtual NMBase* createObject (XMLInputStream& stream);
238 //Tuple *mTuple;
239
240 virtual void readAttributes(const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLAttributes & attributes);
241 virtual void writeAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream & stream) const;
242
243 //attributes
244// AtomicValue *mAtomicValue;
245
246
247};
248
249LIBNUML_CPP_NAMESPACE_END
250
251#endif /* __cplusplus */
252
253
254
255#ifndef SWIG
256
257LIBNUML_CPP_NAMESPACE_BEGIN
259
260//TODO
261
263LIBNUML_CPP_NAMESPACE_END
264
265#endif /* !SWIG */
266#endif /* TUPLE_H_ */
NUMLTypeCode_t
An enumeration of NUML types to help identify NUML objects at runtime.
Definition: NUMLTypeCodes.h:34
@ NUML_TUPLE
Definition: NUMLTypeCodes.h:45
This class stores the atomic values.
Definition: AtomicValue.h:40
this class stores the dimension information
Definition: Dimension.h:54
virtual NMBase * createObject(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream &stream)
Definition: Dimension.cpp:294
virtual Dimension * clone() const
Creates and returns a deep copy of this Dimension instance.
Definition: Dimension.cpp:78
virtual NUMLTypeCode_t getItemTypeCode() const
Returns the libNUML type code for the objects contained in this NUMLList (i.e., CompositeValue object...
Definition: Dimension.cpp:180
virtual int getElementPosition() const
Get the ordinal position of this element in the containing object (which in this case is the Model ob...
Definition: Dimension.cpp:284
virtual const std::string & getElementName() const
Returns the XML element name of this object.
Definition: Dimension.cpp:198
AtomicValue * createAtomicValue()
creates a new atomic value and adds it to the dimension
Definition: Dimension.cpp:148
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 tuple information
Definition: Tuple.h:45
virtual NUMLTypeCode_t getTypeCode() const
Returns the libNUML type code for this NUML object.
Definition: Tuple.h:121
#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