1 | #ifndef morpheo_behavioural_Entity_h |
---|
2 | #define morpheo_behavioural_Entity_h |
---|
3 | |
---|
4 | /* |
---|
5 | * $Id$ |
---|
6 | * |
---|
7 | * [ Description ] |
---|
8 | * |
---|
9 | */ |
---|
10 | |
---|
11 | #include <stdint.h> |
---|
12 | #include <iostream> |
---|
13 | #include <list> |
---|
14 | //#include "Behavioural/include/Description.h" |
---|
15 | #include "Behavioural/include/Interfaces.h" |
---|
16 | #include "Behavioural/include/Schema.h" |
---|
17 | #include "Common/include/ErrorMorpheo.h" |
---|
18 | #include "Common/include/ToString.h" |
---|
19 | #include "Common/include/Debug.h" |
---|
20 | #include "Behavioural/include/Usage.h" |
---|
21 | |
---|
22 | using namespace std; |
---|
23 | |
---|
24 | namespace morpheo { |
---|
25 | namespace behavioural { |
---|
26 | |
---|
27 | class Entity |
---|
28 | { |
---|
29 | // -----[ fields ]---------------------------------------------------- |
---|
30 | private : const string _name ; |
---|
31 | private : const string _type ; |
---|
32 | #ifdef POSITION |
---|
33 | private : const schema_t _schema ; |
---|
34 | #endif |
---|
35 | private : const Tusage_t _usage; |
---|
36 | |
---|
37 | private : Interfaces * _interfaces ; |
---|
38 | |
---|
39 | #ifdef POSITION |
---|
40 | private : string _comment ; |
---|
41 | |
---|
42 | private : bool _is_map ; |
---|
43 | private : uint32_t _map_size_x ; |
---|
44 | private : uint32_t _map_size_y ; |
---|
45 | private : uint32_t _map_pos_x ; |
---|
46 | private : uint32_t _map_pos_y ; |
---|
47 | #endif |
---|
48 | |
---|
49 | // -----[ methods ]--------------------------------------------------- |
---|
50 | public : Entity ( string name |
---|
51 | ,string type |
---|
52 | #ifdef POSITION |
---|
53 | ,schema_t schema |
---|
54 | #endif |
---|
55 | ,Tusage_t usage=USE_ALL |
---|
56 | ); |
---|
57 | public : Entity (const Entity & entity); |
---|
58 | public : ~Entity (); |
---|
59 | |
---|
60 | public : string get_name (void); |
---|
61 | public : string get_type (void); |
---|
62 | |
---|
63 | #ifdef POSITION |
---|
64 | public : void set_comment (string comment); |
---|
65 | private : string get_comment (void ); |
---|
66 | #endif |
---|
67 | public : Interfaces * set_interfaces (void); |
---|
68 | private : string get_interfaces (void); |
---|
69 | public : Interfaces * get_interfaces_list(void); |
---|
70 | |
---|
71 | public : Interface * find_interface (string name); |
---|
72 | public : Signal * find_signal (string name); |
---|
73 | public : bool find_signal (Signal * signal); |
---|
74 | |
---|
75 | #ifdef POSITION |
---|
76 | public : void mapping (uint32_t pos_x, |
---|
77 | uint32_t pos_y, |
---|
78 | uint32_t size_x , |
---|
79 | uint32_t size_y ); |
---|
80 | #endif |
---|
81 | |
---|
82 | #ifdef POSITION |
---|
83 | public : XML toXML (void); |
---|
84 | public : XML toXML_mapping (void); |
---|
85 | #endif |
---|
86 | public : friend ostream& operator<< (ostream& output_stream, |
---|
87 | morpheo::behavioural::Entity & x); |
---|
88 | }; |
---|
89 | |
---|
90 | }; // end namespace behavioural |
---|
91 | }; // end namespace morpheo |
---|
92 | |
---|
93 | #endif |
---|