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