COPASI API  4.16.103
CModelMerging.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/model/CModelMerging.h,v $
3 // $Revision: 1.9 $
4 // $Name: $
5 // $Author: nsimus $
6 // $Date: 2009/11/30 13:17:58 $
7 // End CVS Header
8 
9 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
11 // and The University of Manchester.
12 // All rights reserved.
13 
14 #ifndef CMODELMERGING_H
15 #define CMODELMERGING_H
16 
17 #include <string>
18 #include <map>
19 #include <vector>
20 
21 class CModel;
22 class CCompartment;
23 class CReaction;
24 class CMetab;
25 class CModelEntity;
26 class CExpression;
27 class CEvent;
28 class CEventAssignment;
29 
30 class CModelAdd
31 {
32 public:
33  CModelAdd(CModel* pModel, CModel* mModel);
34 
35  void setModel(CModel* pModel, CModel* mModel);
36 
37  ///just a simple method to call during development
38  void simpleCall();
39 
40 protected:
41 
42  std::map<std::string, std::string> keyMap;
43  std::map<std::string, std::string> nameMap;
44 
45  bool addCompartments(std::string name);
46  bool addMetabolites(std::string name);
47  bool addModelValues(std::string name);
48 
52 
53  bool addReactions(std::string name);
54  bool addEvents(std::string name);
55 
56  bool copyEventAssignmentExpression(const CEventAssignment * sourceAssignment, CEventAssignment * newAssignment);
57  bool copyDelayExpression(const CEvent * sourceEvent, CEvent * newEvent);
58  bool copyTriggerExpression(const CEvent * sourceEvent, CEvent * newEvent);
59  bool copyExpression(const CModelEntity * sourceEntity, CModelEntity * newEntity);
60  bool copyInitialExpression(const CModelEntity * sourceEntity, CModelEntity * newEntity);
61 
62  /**
63  * determine whether the one of the substrate, products, or modifiers of the reaction
64  * is located in the given compartment
65  */
66  static bool reactionInvolvesCompartment(const CReaction * reac, const CCompartment* comp);
67 
70 };
71 
73 {
74 public:
75  CModelMerging(CModel* pModel);
76 
77  void setModel(CModel* pModel);
78 
79  ///just a simple method to call during development
80  void simpleCall(std::vector< std::string > & toKey, std::vector< std::string > & objectKey);
81 
82  /**
83  ** Enumeration of the types of columns known to COPASI.
84  **/
85  enum Type
86  {
87  ignore = 0,
89  };
90 
91  /**
92  ** String literals for the GUI to display type names of columns known
93  ** to COPASI.
94  **/
95  static const std::string TypeName[];
96 
97 protected:
98 
99  bool mergeMetabolites(std::string toKey, std::string key);
100  bool mergeInExpression(std::string toKey, std::string key, CExpression *pExpression);
101 
103 };
104 
105 #endif // CMODELMERGING_H
Definition: CEvent.h:152
CModel * mmModel
Definition: CModelMerging.h:69
bool mergeMetabolites(std::string toKey, std::string key)
bool addMetabolitesExpressions()
static const std::string TypeName[]
Definition: CModelMerging.h:95
void setModel(CModel *pModel, CModel *mModel)
std::map< std::string, std::string > keyMap
Definition: CModelMerging.h:42
void setModel(CModel *pModel)
bool addEvents(std::string name)
CModel * mpModel
Definition: CModelMerging.h:68
bool mergeInExpression(std::string toKey, std::string key, CExpression *pExpression)
Definition: CMetab.h:178
bool addModelValuesExpressions()
bool copyEventAssignmentExpression(const CEventAssignment *sourceAssignment, CEventAssignment *newAssignment)
CModel * mpModel
bool copyExpression(const CModelEntity *sourceEntity, CModelEntity *newEntity)
bool addMetabolites(std::string name)
std::map< std::string, std::string > nameMap
Definition: CModelMerging.h:43
bool addCompartmentsExpressions()
CModelAdd(CModel *pModel, CModel *mModel)
bool addCompartments(std::string name)
bool addModelValues(std::string name)
bool copyTriggerExpression(const CEvent *sourceEvent, CEvent *newEvent)
void simpleCall(std::vector< std::string > &toKey, std::vector< std::string > &objectKey)
just a simple method to call during development
bool copyDelayExpression(const CEvent *sourceEvent, CEvent *newEvent)
Definition: CModel.h:50
static bool reactionInvolvesCompartment(const CReaction *reac, const CCompartment *comp)
bool copyInitialExpression(const CModelEntity *sourceEntity, CModelEntity *newEntity)
void simpleCall()
just a simple method to call during development
CModelMerging(CModel *pModel)
bool addReactions(std::string name)