- Timestamp:
- Jul 30, 2010, 4:47:27 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Types.h
r138 r139 120 120 } Tmanage_event_t; 121 121 122 typedef enum 123 { 124 RAT_NO_SAVE , // Rat without save 125 RAT_ONE_SAVE , // Rat with one save 126 RAT_DEPTH_SAVE // RAT with multiple save (depth) 127 } Trat_scheme_t; 128 122 129 //--------------------------------------------------[ instruction ]----- 123 130 class instruction_t … … 307 314 }; 308 315 316 template<> inline std::string toString<morpheo::behavioural::Trat_scheme_t>(const morpheo::behavioural::Trat_scheme_t& x) 317 { 318 switch (x) 319 { 320 case morpheo::behavioural::RAT_NO_SAVE : return "rat_no_save" ; break; 321 case morpheo::behavioural::RAT_ONE_SAVE : return "rat_one_save" ; break; 322 case morpheo::behavioural::RAT_DEPTH_SAVE : return "rat_depth_save"; break; 323 default : return "" ; break; 324 } 325 }; 326 327 template<> inline morpheo::behavioural::Trat_scheme_t fromString<morpheo::behavioural::Trat_scheme_t>(const std::string& x) 328 { 329 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::RAT_NO_SAVE ))) == 0) or 330 (x.compare(toString( morpheo::behavioural::RAT_NO_SAVE )) == 0)) 331 return morpheo::behavioural::RAT_NO_SAVE; 332 333 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::RAT_ONE_SAVE ))) == 0) or 334 (x.compare(toString( morpheo::behavioural::RAT_ONE_SAVE )) == 0)) 335 return morpheo::behavioural::RAT_ONE_SAVE; 336 337 if ((x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::RAT_DEPTH_SAVE))) == 0) or 338 (x.compare(toString( morpheo::behavioural::RAT_DEPTH_SAVE )) == 0)) 339 return morpheo::behavioural::RAT_DEPTH_SAVE; 340 341 throw (ERRORMORPHEO ("fromString","Unknow string : \""+x+"\"")); 342 }; 343 309 344 }; // end namespace morpheo 310 345 #endif
Note: See TracChangeset
for help on using the changeset viewer.