libNuML 1.1.1
Library for reading / writing NuML documents
NUMLNamespaces.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 NUMLNamespaces_h
25#define NUMLNamespaces_h
26
27#include <numl/common/extern.h>
28#include <sbml/xml/XMLNamespaces.h>
29
30#include <numl/common/common.h>
31#include <numl/common/numlfwd.h>
32
33
34
35#ifdef __cplusplus
36
37
38
39LIBNUML_CPP_NAMESPACE_BEGIN
40
41const unsigned int NUML_DEFAULT_LEVEL = 1;
42const unsigned int NUML_DEFAULT_VERSION = 1;
43const char* const NUML_XMLNS_L1 = "http://www.numl.org/numl/level1/version1";
44const char* const NUML_XMLNS_L1V1 = "http://www.numl.org/numl/level1/version1";
45
47{
48public:
49
84 NUMLNamespaces(unsigned int level = NUML_DEFAULT_LEVEL,
85 unsigned int version = NUML_DEFAULT_VERSION);
86
87
92
93
99 NUMLNamespaces(const NUMLNamespaces& orig);
100
101
105 NUMLNamespaces& operator=(const NUMLNamespaces& orig);
106
107
113 NUMLNamespaces* clone () const;
114
115
126 static std::string getNUMLNamespaceURI(unsigned int level,
127 unsigned int version);
128
129
135 unsigned int getLevel();
136
137
138
144 unsigned int getVersion();
145
146
147
161 LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * getNamespaces();
162
163
170 void addNamespaces(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * xmlns);
171
172
173 void setLevel(unsigned int level);
174
175
176 void setVersion(unsigned int version);
177
178
179 void setNamespaces(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * xmlns);
180
181protected:
182
183 unsigned int mLevel;
184 unsigned int mVersion;
185 LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * mNamespaces;
186
187};
188
189LIBNUML_CPP_NAMESPACE_END
190
191#endif /* __cplusplus */
192
193
194#ifndef SWIG
195
196LIBNUML_CPP_NAMESPACE_BEGIN
198
199/*-----------------------------------------------------------------------------
200 * See the .cpp file for the documentation of the following functions.
201 *---------------------------------------------------------------------------*/
202
205NUMLNamespaces_create(unsigned int level, unsigned int version);
206
207
209unsigned int
211
212
214unsigned int
216
217
219LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces_t *
221
222
224const char *
225NUMLNamespaces_getNUMLNamespaceURI(unsigned int level, unsigned int version);
226
227
229void
231 LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces_t * xmlns);
232
233
235LIBNUML_CPP_NAMESPACE_END
236
237#endif /* !SWIG */
238#endif /* NUMLNamespaces_h */
LIBNUML_EXTERN unsigned int NUMLNamespaces_getLevel(NUMLNamespaces_t *numlns)
Get the NUML Level of this NUMLNamespaces_t structure.
Definition: NUMLNamespaces.cpp:213
LIBNUML_EXTERN LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces_t * NUMLNamespaces_getNamespaces(NUMLNamespaces_t *numlns)
Get the NUML Version of this NUMLNamespaces_t structure.
Definition: NUMLNamespaces.cpp:243
LIBNUML_EXTERN unsigned int NUMLNamespaces_getVersion(NUMLNamespaces_t *numlns)
Get the NUML Version of this NUMLNamespaces_t structure.
Definition: NUMLNamespaces.cpp:228
LIBNUML_EXTERN const char * NUMLNamespaces_getNUMLNamespaceURI(unsigned int level, unsigned int version)
Returns a string representing the NUML XML namespace for the given level and version of NUML.
Definition: NUMLNamespaces.cpp:261
LIBNUML_EXTERN NUMLNamespaces_t * NUMLNamespaces_create(unsigned int level, unsigned int version)
Creates a new NUMLNamespaces_t structure corresponding to the given NUML level and version.
Definition: NUMLNamespaces.cpp:198
LIBNUML_EXTERN void NUMLNamespaces_addNamespaces(NUMLNamespaces_t *numlns, LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces_t *xmlns)
Add the XML namespaces list to the set of namespaces within this NUMLNamespaces_t structure.
Definition: NUMLNamespaces.cpp:276
const char *const NUML_XMLNS_L1
Definition: NUMLNamespaces.h:43
LIBNUML_CPP_NAMESPACE_BEGIN const unsigned int NUML_DEFAULT_LEVEL
Definition: NUMLNamespaces.h:41
const unsigned int NUML_DEFAULT_VERSION
Definition: NUMLNamespaces.h:42
const char *const NUML_XMLNS_L1V1
Definition: NUMLNamespaces.h:44
namespace class
Definition: NUMLNamespaces.h:47
unsigned int mLevel
Definition: NUMLNamespaces.h:183
unsigned int mVersion
Definition: NUMLNamespaces.h:184
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * mNamespaces
Definition: NUMLNamespaces.h:185
#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 XMLNamespaces XMLNamespaces_t
Definition: numlfwd.h:247
CLASS_OR_STRUCT NUMLNamespaces NUMLNamespaces_t
Definition: numlfwd.h:196