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