-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTargetGen.h
51 lines (39 loc) · 1.25 KB
/
TargetGen.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*******************************************************************
*
* DESCRIPTION: Initial Investor Pool for Ponzi Scheme Model
*
* AUTHOR: Elizabeth Hosang
*
* EMAIL: mailto://eahosang@scs.carleton.ca
*
* DATE: 25/10/2011
*
*******************************************************************/
#ifndef __TARGETGEN_H
#define __TARGETGEN_H
/** include files **/
#include "atomic.h" // class Atomic
/** declarations **/
class TargetGen: public Atomic
{
public:
TargetGen( const string &name = "TargetGen" ) ; // Default constructor
~TargetGen(); // Destructor
virtual string className() const
{return "TargetGen";}
enum GeneratorState {Initial, Generating};
protected:
Model &initFunction();
Model &externalFunction( const ExternalMessage &msg );
Model &internalFunction( const InternalMessage &msg );
Model &outputFunction( const InternalMessage &msg );
private:
// In Ports
Port &out ; // Output a target
Port &statsOut_out; // Used for reporting status
double m_randnumber;
int m_timePeriod; // Time period between new investors
bool m_timerStarted;
GeneratorState m_state; // Internal state of the model
}; // class TargetGen
#endif //__TARGETGEN_H