roadrunner
2.6.0
Fast simulator for SBML models
c
rrSymbolList.h
1
#ifndef rrSymbolListH
2
#define rrSymbolListH
3
#include <vector>
4
#include "rrExporter.h"
5
#include "rrSymbol.h"
6
7
using
std::vector;
8
9
namespace
rr
10
{
11
12
class
RR_DECLSPEC
SymbolList
:
public
std::vector<Symbol>
//Using std::vector instead of list since accessing element by []
13
{
14
public
:
15
void
Clear();
16
int
Add(
const
Symbol
& item);
17
double
getValue
(
const
int
& index);
18
std::string getName(
const
int
& index);
19
std::string getKeyName(
const
int
& index);
20
bool
find(
const
std::string& name,
int
& index)
const
;
21
bool
find(
const
std::string& keyName,
const
std::string& name,
int
& index)
const
;
22
unsigned
int
Count()
const
{
return
size();}
23
};
//class
24
25
}
//namespace rr
26
27
#endif
28
29
//c#
30
//using System.Collections;
31
//
33
// * Description : .NET based simulator
34
// * Author(s) : Herbert M Sauro
35
// * Organization: Keck Graduate Institute
36
// * Created : 2005
37
// *
38
// * This software is licenced under the BSD Licence.
39
// *
40
// * Original author:
41
// * Herbert Sauro (hsauro@kgi.edu)
42
// *
43
// * Copyright (c) 2005 <Herbert M Sauro>
44
// * All rights reserved
45
// *
46
// * Redistribution and use in source and binary forms, with or without
47
// * modification, are permitted provided that the following conditions
48
// * are met:
49
// * 1. Redistributions of source code must retain the above copyright
50
// * notice, this list of conditions and the following disclaimer.
51
// * 2. Redistributions in binary form must reproduce the above copyright
52
// * notice, this list of conditions and the following disclaimer in the
53
// * documentation and/or other materials provided with the distribution.
54
// * 3. The name of the author may not be used to endorse or promote products
55
// * derived from this software without specific prior written permission.
56
//
57
// * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
58
// * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
59
// * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
60
// * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
61
// * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
62
// * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
63
// * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
64
// * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
65
// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
66
// * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
67
// *****************************************************************************/
68
//
69
//namespace LibRoadRunner.Util
70
//{
71
// public class SymbolList : ArrayList
72
// {
73
// /// <summary>
74
// /// Returns the Symbol by the given index
75
// /// </summary>
76
// /// <param name="index">the index of the element to return</param>
77
// /// <returns>Returns the Symbol by the given index</returns>
78
// public new Symbol this[int index]
79
// {
80
// get { return ((Symbol) base[index]); }
81
// }
82
//
83
// /// <summary>
84
// /// Returns the Symbol with the given Name
85
// /// </summary>
86
// /// <param name="sName">the name of the symbol to return</param>
87
// /// <returns>Returns the Symbol with the given Name or null if not found</returns>
88
// public Symbol this[std::string sName]
89
// {
90
// get
91
// {
92
// int nIndex = -1;
93
// if (find(sName, out nIndex))
94
// {
95
// return this[nIndex];
96
// }
97
// return null;
98
// }
99
// }
100
//
101
// public int Add(Symbol item)
102
// {
103
// return base.Add(item);
104
// }
105
//
106
// public double getValue(int index)
107
// {
108
// return ((Symbol) base[index]).value;
109
// }
110
//
111
// public std::string getName(int index)
112
// {
113
// return ((Symbol) base[index]).name;
114
// }
115
//
116
// public std::string getKeyName(int index)
117
// {
118
// return ((Symbol) base[index]).keyName;
119
// }
120
//
121
// public override void Clear()
122
// {
123
// Clear();
124
// }
125
//
126
// public bool find(std::string name, out int index)
127
// {
128
// index = -1;
129
// Symbol sym;
130
// for (int i = 0; i < Count; i++)
131
// {
132
// sym = (Symbol) base[i];
133
// if (name == sym.name)
134
// {
135
// index = i;
136
// return true;
137
// }
138
// if (sym.name == name)
139
// {
140
// index = i;
141
// return true;
142
// }
143
// }
144
// return false;
145
// }
146
//
147
// public bool find(std::string keyName, std::string name, out int index)
148
// {
149
// index = -1;
150
// for (int i = 0; i < Count; i++)
151
// {
152
// var sym = (Symbol) base[i];
153
// if ((sym.name == name) && (sym.keyName == keyName))
154
// {
155
// index = i;
156
// return true;
157
// }
158
// }
159
// return false;
160
// }
161
//
190
// }
191
//}
rr::SymbolList
Definition:
rrSymbolList.h:13
rr::Symbol
An SBML species definition.
Definition:
rrSymbol.h:18
getValue
C_DECL_SPEC bool rrcCallConv getValue(RRHandle handle, const char *symbolId, double *value)
Get the value for a given symbol, use getAvailableTimeCourseSymbols(void) for a list of symbols.
Generated by
1.9.1