COPASI API  4.16.103
SBMLUtils.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/sbml/SBMLUtils.h,v $
3 // $Revision: 1.4 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2010/03/16 18:57:03 $
7 // End CVS Header
8 
9 // Copyright (C) 2010 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc. and EML Research, gGmbH.
16 // All rights reserved.
17 
18 #ifndef SBMLUTILS_H__
19 #define SBMLUTILS_H__
20 
21 #include <string>
22 #include "copasi/copasi.h"
23 
24 class SBase;
25 
26 class SBMLUtils
27 {
28 public:
29 
30  /**
31  * Return the sbml ID if the sbml object actually has one.
32  * If not, it returns "".
33  * It only handles core sbml objects. No layout objects yet.
34  */
35  static std::string getIdFromSBase(const SBase* s);
36 
37  /**
38  * This method goes through the given SBML model and collects all ids and
39  * meta ids used in the model.
40  */
41  static void collectIds(Model* pModel, std::map<std::string, const SBase*>& ids, std::map<std::string, const SBase*>& metaIds);
42 
43 protected:
44 
45  template<class CType>
46  static std::string getId(const CType * pA, C_INT32 level = 2);
47 };
48 
49 #endif
static void collectIds(Model *pModel, std::map< std::string, const SBase * > &ids, std::map< std::string, const SBase * > &metaIds)
Definition: SBMLUtils.cpp:96
#define C_INT32
Definition: copasi.h:90
static std::string getIdFromSBase(const SBase *s)
Definition: SBMLUtils.cpp:32
static std::string getId(const CType *pA, C_INT32 level=2)
Definition: SBMLUtils.cpp:81