COPASI API  4.16.103
CMiaseML.cpp
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/miase/CMiaseML.cpp,v $
3 // $Revision: 1.7 $
4 // $Name: $
5 // $Author: akoenig $
6 // $Date: 2008/04/02 12:14:39 $
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 #include "CMiaseML.h"
15 #include <iostream>
16 
18 {}
19 
21 {
22  //TODO:
23  //delete content of following vectors: mListofSimulations, mListofTasks,
24  // mListofModels, mListofOutputs
25 }
26 
28 {
29  mListofSimulations.push_back(simulation);
30 }
31 
33 {
34  mListofTasks.push_back(task);
35 }
36 
38 {
39  mListofModels.push_back(model);
40 }
41 
43 {
44  mListofOutputs.push_back(output);
45 }
46 
48 {
49  return mListofSimulations[ num ];
50 }
51 
53 {
54  int i;
55  CMiaseSimulation* tmp;
56  for (i = 0 ; i <= getNumOfSimulations() ; i++)
57  {
58  tmp = getSimulation(i);
59  if (tmp->getId() == id)
60  return tmp;
61  }
62 }
63 
65 {
66  return mListofSimulations[ mListofSimulations.size() - 1 ];
67 }
68 
70 {
71  return mListofSimulations.size();
72 }
73 
75 {
76  return mListofTasks[ num ];
77 }
78 
80 {
81  int i;
82  CMiaseTask* tmp;
83  for (i = 0 ; i <= getNumOfTasks() ; i++)
84  {
85  tmp = getTask(i);
86  if (tmp->getId() == id)
87  return tmp;
88  }
89 }
90 
92 {
93  return mListofTasks[ mListofTasks.size() - 1 ];
94 }
95 
97 {
98  return mListofTasks.size();
99 }
100 
102 {
103  return mListofModels[ num ];
104 }
105 
107 {
108  int i;
109  CMiaseModel* tmp;
110  for (i = 0 ; i <= getNumOfModels() ; i++)
111  {
112  tmp = getModel(i);
113  if (tmp->getId() == id)
114  return tmp;
115  }
116 }
117 
119 {
120  return mListofModels[ mListofModels.size() - 1 ];
121 }
122 
124 {
125  return mListofModels.size();
126 }
127 
129 {
130  return mListofOutputs[ num ];
131 }
132 
134 {
135  int i;
136  CMiaseOutput* tmp;
137  for (i = 0 ; i <= getNumOfOutputs() ; i++)
138  {
139  tmp = getOutput(i);
140  if (tmp->getId() == id)
141  return tmp;
142  }
143 }
144 
146 {
147  return mListofOutputs[ mListofOutputs.size() - 1 ];
148 }
149 
151 {
152  return mListofOutputs.size();
153 }
154 
155 //*****************************************************************************
156 
158 {}
159 
161 {}
162 
164 {
165  mSed = sed;
166 }
167 
169 {
170  return mSed;
171 }
172 
173 std::string CMiaseML::getXmlns()
174 {
175  return mXmlns;
176 }
177 
178 std::string CMiaseML::getVersion()
179 {
180  return mVersion;
181 }
182 
183 void CMiaseML::setXmlns(std::string xmlns)
184 {
185  mXmlns = xmlns;
186 }
187 
188 void CMiaseML::setVersion(std::string version)
189 {
190  mVersion = version;
191 }
std::string getId()
Definition: CMiaseBase.cpp:117
CMiaseModel * getLastModel()
Definition: CMiaseML.cpp:118
CMiaseTask * getTask(int num)
Definition: CMiaseML.cpp:74
void addTask(CMiaseTask *task)
Definition: CMiaseML.cpp:32
std::vector< CMiaseModel * > mListofModels
Definition: CMiaseML.h:60
CMiaseOutput * getOutput(int num)
Definition: CMiaseML.cpp:128
std::vector< CMiaseSimulation * > mListofSimulations
Definition: CMiaseML.h:58
CMiaseTask * getLastTask()
Definition: CMiaseML.cpp:91
CMiaseOutput * getLastOutput()
Definition: CMiaseML.cpp:145
int getNumOfOutputs()
Definition: CMiaseML.cpp:150
void setMiaseSed(CMiaseSed *sed)
Definition: CMiaseML.cpp:163
std::string mXmlns
Definition: CMiaseML.h:86
CMiaseSed * mSed
Definition: CMiaseML.h:84
std::vector< CMiaseOutput * > mListofOutputs
Definition: CMiaseML.h:61
CMiaseSimulation * getSimulation(int num)
Definition: CMiaseML.cpp:47
CMiaseSed * getSed()
Definition: CMiaseML.cpp:168
void setXmlns(std::string xmlns)
Definition: CMiaseML.cpp:183
CMiaseModel * getModel(int num)
Definition: CMiaseML.cpp:101
std::vector< CMiaseTask * > mListofTasks
Definition: CMiaseML.h:59
void addModel(CMiaseModel *model)
Definition: CMiaseML.cpp:37
void setVersion(std::string version)
Definition: CMiaseML.cpp:188
int getNumOfModels()
Definition: CMiaseML.cpp:123
int getNumOfSimulations()
Definition: CMiaseML.cpp:69
~CMiaseSed()
Definition: CMiaseML.cpp:20
void addOutput(CMiaseOutput *output)
Definition: CMiaseML.cpp:42
CMiaseSimulation * getLastSimulation()
Definition: CMiaseML.cpp:64
std::string mVersion
Definition: CMiaseML.h:87
std::string getVersion()
Definition: CMiaseML.cpp:178
std::string getXmlns()
Definition: CMiaseML.cpp:173
int getNumOfTasks()
Definition: CMiaseML.cpp:96
void addSimulation(CMiaseSimulation *simulation)
Definition: CMiaseML.cpp:27