libNuML  1.1.1
Library for reading / writing NuML documents
AtomicDescription.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 
23 #ifndef ATOMICDESCRIPTION_H_
24 #define ATOMICDESCRIPTION_H_
25 
26 #include <numl/common/extern.h>
27 #include <numl/common/numlfwd.h>
28 
29 
30 #include <numl/NMBase.h>
31 #include <numl/NUMLList.h>
33 #include <string>
34 #include <sstream>
35 
36 #include <sbml/xml/XMLAttributes.h>
37 #include <sbml/xml/XMLOutputStream.h>
38 
39 #ifdef __cplusplus
40 LIBNUML_CPP_NAMESPACE_BEGIN
41 
43 
44 public:
45 
63  AtomicDescription (unsigned int level, unsigned int version);
64 
65 
95 
103  virtual bool accept (NUMLVisitor& v) const;
104 
105 
125  virtual NUMLTypeCode_t getTypeCode () const;
126 
133  virtual const std::string& getElementName () const;
134 
140  const std::string& getValueType () const;
141 
147  const std::string& getOntologyTerm () const;
148 
149 
155  virtual const std::string& getName () const;
156 
157 
168  int setOntologyTerm (const std::string& ontologyTerm);
169 
180  int setValueType (const std::string& valueType);
181 
192  int setName (const std::string& name);
193 
197  virtual const std::string& getId() const;
198 
204  virtual int setId(const std::string& id);
205 
211  virtual AtomicDescription* clone () const;
213  virtual ~AtomicDescription();
214 
215 protected:
216  /* this is a constructor that takes no arguments and
217  * only exists because the validator code needs it
218  */
219  // AtomicDescription ();
220 
229  //virtual NMBase* createObject (XMLInputStream& stream);
230  virtual void readAttributes(const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLAttributes & attributes);
231  virtual void writeAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream & stream) const;
232 
233  std::string mId;
234  std::string mName;
235  std::string mOntologyTerm;
236  std::string mValueType;
237 };
238 
239 LIBNUML_CPP_NAMESPACE_END
240 
241 #endif /* __cplusplus */
242 
243 #ifndef SWIG
244 
245 LIBNUML_CPP_NAMESPACE_BEGIN
247 
248 //TODO
249 
251 LIBNUML_CPP_NAMESPACE_END
252 
253 #endif /* !SWIG */
254 
255 #endif /* ATOMICDESCRIPTION_H_ */
virtual int setName(const std::string &name)
Definition: DimensionDescription.cpp:315
virtual const std::string & getId() const
Definition: DimensionDescription.cpp:296
std::string mValueType
Definition: AtomicDescription.h:236
std::string mId
Definition: AtomicDescription.h:233
#define BEGIN_C_DECLS
Definition: extern.h:112
std::string mName
Definition: AtomicDescription.h:234
virtual DimensionDescription * clone() const
Creates and returns a deep copy of this NMBase object.
Definition: DimensionDescription.cpp:172
virtual bool accept(NUMLVisitor &v) const
Accepts the given NUMLVisitor for this instance of NMBase.
Definition: DimensionDescription.cpp:66
virtual const std::string & getName() const
Definition: DimensionDescription.cpp:309
NUMLTypeCode_t
An enumeration of NUML types to help identify NUML objects at runtime.
Definition: NUMLTypeCodes.h:33
#define LIBNUML_EXTERN
Begin svn Header.
Definition: extern.h:104
Implementation of the Visitor design pattern, for operations on NUML objects.
Definition: NUMLVisitor.h:72
namespace class
Definition: NUMLNamespaces.h:46
This class stores the atomic description.
Definition: AtomicDescription.h:42
std::string mOntologyTerm
Definition: AtomicDescription.h:235
virtual int setId(const std::string &id)
Definition: DimensionDescription.cpp:302
#define END_C_DECLS
Definition: extern.h:113
virtual const std::string & getElementName() const
Returns the XML element name of this object, which for DimensionDescription, is always "model"...
Definition: DimensionDescription.cpp:75
This class stores the dimension description.
Definition: DimensionDescription.h:58
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 NUMLTypeCode_t getTypeCode() const
Returns the libNUML type code for this NUML object.
Definition: DimensionDescription.h:198
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