roadrunner
2.6.0
Fast simulator for SBML models
c
rrEvent.h
1
#ifndef rrEventH
2
#define rrEventH
3
#include "rrRandom.h"
4
#include "rrExporter.h"
5
#include <ostream>
6
7
8
namespace
rr
9
{
10
11
class
RR_DECLSPEC
Event
12
{
13
14
15
public
:
16
Event
(
int
id
,
double
prior = 0,
double
delay = 0);
17
Event
(
const
Event
&
id
);
18
~
Event
() {}
19
double
GetPriority()
const
;
20
void
SetPriority(
double
prior);
21
int
GetID()
const
;
22
Event
& operator = (
const
Event
& rhs);
23
friend
bool
operator < (
const
Event
& e1,
const
Event
& e2);
24
friend
bool
operator == (
const
Event
& e1,
const
Event
& e2);
25
26
protected
:
27
int
mID;
28
double
mPriority;
29
double
mDelay;
30
Random
mRandom;
//If we need randomness..
31
};
32
33
// compare and printing functions,
34
// there is some bizzare problem with gcc when these are
35
// declared as friend functions, so use the public interface,
36
// and all seems to work.
37
RR_DECLSPEC std::ostream& operator << (std::ostream& str,
const
Event
& event);
38
39
40
struct
RR_DECLSPEC
SortByPriority
41
{
42
bool
operator()(
const
rr::Event
& lx,
const
rr::Event
& rx )
const
43
{
44
return
lx.GetPriority() > rx.GetPriority();
45
}
46
};
47
48
}
49
#endif
rr::Event
Definition:
rrEvent.h:12
rr::Random
Definition:
rrRandom.h:14
rr::SortByPriority
Definition:
rrEvent.h:41
Generated by
1.9.1