libNuML  1.1.1
Library for reading / writing NuML documents
NUMLReader.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 NUMLReader_h
25 #define NUMLReader_h
26 
27 
28 #include <numl/common/extern.h>
29 #include <numl/common/numlfwd.h>
30 #include <sbml/util/util.h>
31 
32 
33 
34 
35 
36 #include <string>
37 
38 #ifdef __cplusplus
39 LIBNUML_CPP_NAMESPACE_BEGIN
40 
41 class NUMLDocument;
42 
43 
45 {
46 public:
47 
51  NUMLReader ();
52 
53 
57  virtual ~NUMLReader ();
58 
59 
145  NUMLDocument* readNUML (const std::string& filename);
146 
147 
233  NUMLDocument* readNUMLFromFile (const std::string& filename);
234 
235 
256  NUMLDocument* readNUMLFromString (const std::string& xml);
257 
258 
265  static bool hasZlib();
266 
267 
274  static bool hasBzip2();
275 
276 
277 protected:
293  NUMLDocument* readInternal (const char* content, bool isFile = true);
294 
295 };
296 
297 LIBNUML_CPP_NAMESPACE_END
298 
299 #endif /* __cplusplus */
300 
301 LIBNUML_CPP_NAMESPACE_BEGIN
303 
304 
305 #ifndef SWIG
306 
307 
313 NUMLReader_t *
314 NUMLReader_create (void);
315 
320 void
322 
323 
386 NUMLReader_readNUML (NUMLReader_t *sr, const char *filename);
387 
390 NUMLReader_readNUMLFromFile (NUMLReader_t *sr, const char *filename);
391 
409 NUMLReader_readNUMLFromString (NUMLReader_t *sr, const char *xml);
410 
411 
419 int
421 
422 
430 int
432 
433 #endif /* !SWIG */
434 
435 
449 readNUML (const char *filename);
450 
451 
454 readNUMLFromFile (const char *filename);
455 
456 
477 readNUMLFromString (const char *xml);
478 
479 
481 LIBNUML_CPP_NAMESPACE_END
482 
483 #endif /* NUMLReader_h */
LIBNUML_EXTERN NUMLReader_t * NUMLReader_create()
Creates a new NUMLReader and returns it.
Definition: NUMLReader.cpp:277
LIBNUML_EXTERN NUMLDocument_t * NUMLReader_readNUMLFromString(NUMLReader_t *sr, const char *xml)
Reads an NUML document from the given XML string.
Definition: NUMLReader.cpp:375
LIBNUML_EXTERN NUMLDocument_t * NUMLReader_readNUMLFromFile(NUMLReader_t *sr, const char *filename)
Reads an NUML document from the given file.
Definition: NUMLReader.cpp:352
LIBNUML_EXTERN NUMLDocument_t * NUMLReader_readNUML(NUMLReader_t *sr, const char *filename)
Reads an NUML document from the given file.
Definition: NUMLReader.cpp:320
LIBNUML_EXTERN int NUMLReader_hasBzip2()
Predicate returning non-zero or zero depending on whether underlying libNUML is linked with bzip2 at ...
Definition: NUMLReader.cpp:404
LIBNUML_EXTERN int NUMLReader_hasZlib()
Predicate returning non-zero or zero depending on whether underlying libNUML is linked with zlib at c...
Definition: NUMLReader.cpp:390
LIBNUML_EXTERN void NUMLReader_free(NUMLReader_t *sr)
Frees the given NUMLReader.
Definition: NUMLReader.cpp:288
LIBNUML_EXTERN NUMLDocument_t * readNUMLFromFile(const char *filename)
Reads an NUML document from the given file.
Definition: NUMLReader.cpp:499
LIBNUML_EXTERN NUMLDocument_t * readNUMLFromString(const char *xml)
Reads an NUML document from a string assumed to be in XML format.
Definition: NUMLReader.cpp:523
LIBNUML_CPP_NAMESPACE_END LIBNUML_CPP_NAMESPACE_BEGIN BEGIN_C_DECLS LIBNUML_EXTERN NUMLDocument_t * readNUML(const char *filename)
Reads an NUML document from the given file filename.
Definition: NUMLReader.cpp:451
This represents the numl document that contains all information.
Definition: NUMLDocument.h:107
The reader class implementing reading NuML documents from file / string.
Definition: NUMLReader.h:45
#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 NUMLDocument NUMLDocument_t
This represents the numl document that contains all information.
Definition: numlfwd.h:88
CLASS_OR_STRUCT NUMLReader NUMLReader_t
The reader class implementing reading NuML documents from file / string.
Definition: numlfwd.h:178