-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerat.h
More file actions
54 lines (40 loc) · 1.11 KB
/
generat.h
File metadata and controls
54 lines (40 loc) · 1.11 KB
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
52
53
54
/*******************************************************************
*
* DESCRIPTION: class Generator
*
* AUTHOR: Khaldoon Al-Zoubi
*
*
* DATE: 29/11/2003
*
*******************************************************************/
#ifndef __GENERATOR_H
#define __GENERATOR_H
/** include files **/
#include "atomic.h" // class Atomic
#include "except.h" // class InvalidMessageException
/** forward declarations **/
class Distribution ;
/** declarations **/
class Generator : public Atomic
{
public:
Generator( const string &name = "Generator" ); // Default constructor
~Generator();
virtual string className() const
{return "Generator";}
protected:
Model &initFunction() ;
Model &externalFunction( const ExternalMessage & )
{throw InvalidMessageException();}
Model &internalFunction( const InternalMessage & );
Model &outputFunction( const InternalMessage & );
private:
Port &out ;
Distribution *dist ;
double customer_id;
double customers; // number of customers that will be generated in time unit.
Distribution &distribution()
{return *dist;}
}; // class Generator
#endif //__GENERATOR_H