- Timestamp:
- Feb 1, 2011, 9:57:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Types.h
r139 r146 114 114 115 115 typedef enum 116 { 117 PHT_SCHEME_COUNTER, 118 PHT_SCHEME_FSM 119 } Tpht_scheme_t; 120 121 typedef enum 116 122 { 117 123 MANAGE_EVENT_WAIT_ALL, … … 314 320 }; 315 321 322 323 template<> inline std::string toString<morpheo::behavioural::Tpht_scheme_t>(const morpheo::behavioural::Tpht_scheme_t& x) 324 { 325 switch (x) 326 { 327 case morpheo::behavioural::PHT_SCHEME_COUNTER : return "counter"; break; 328 case morpheo::behavioural::PHT_SCHEME_FSM : return "fsm" ; break; 329 default : return ""; break; 330 } 331 }; 332 333 template<> inline morpheo::behavioural::Tpht_scheme_t fromString<morpheo::behavioural::Tpht_scheme_t>(const std::string& x) 334 { 335 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PHT_SCHEME_COUNTER ))) == 0) or 336 (x.compare(toString( morpheo::behavioural::PHT_SCHEME_COUNTER )) == 0)) 337 return morpheo::behavioural::PHT_SCHEME_COUNTER; 338 if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::PHT_SCHEME_FSM))) == 0) or 339 (x.compare(toString( morpheo::behavioural::PHT_SCHEME_FSM )) == 0)) 340 return morpheo::behavioural::PHT_SCHEME_FSM; 341 342 throw (ErrorMorpheo ("<fromString> : Unknow string : \""+x+"\"")); 343 }; 344 345 316 346 template<> inline std::string toString<morpheo::behavioural::Trat_scheme_t>(const morpheo::behavioural::Trat_scheme_t& x) 317 347 {
Note: See TracChangeset
for help on using the changeset viewer.