Converter.h

00001 
00002 #ifndef SCTAPIIPC_CONVERTER_H
00003 #define SCTAPIIPC_CONVERTER_H
00004 
00005 namespace SctApiIPC {
00006 
00007   class Converter {
00008   public:
00009     static ::SctApi::Scan::ScanOptionsEnum corbaToScanOptionsEnum(const Sct_SctApi::Scan::ScanOptions opt) {
00010       switch (opt) {
00011       case Sct_SctApi::Scan::full:
00012     return ::SctApi::Scan::FULL;
00013       case Sct_SctApi::Scan::bits32:
00014     return ::SctApi::Scan::BITS32;
00015       case Sct_SctApi::Scan::loopCalLine:
00016     return ::SctApi::Scan::LOOPCALLINE;
00017       case Sct_SctApi::Scan::distSlave:
00018     return ::SctApi::Scan::DISTSLAVE;
00019       case Sct_SctApi::Scan::debug:
00020     return ::SctApi::Scan::DEBUG;
00021       case Sct_SctApi::Scan::tim:
00022         return ::SctApi::Scan::TIM;
00023       case Sct_SctApi::Scan::nth:
00024         return ::SctApi::Scan::NTH;
00025       case Sct_SctApi::Scan::nth_rem:
00026         return ::SctApi::Scan::NTH_REM;
00027       case Sct_SctApi::Scan::enableDataMode:
00028         return ::SctApi::Scan::ENABLE_DATA_MODE;
00029       case Sct_SctApi::Scan::ccode:
00030         return ::SctApi::Scan::USE_CCODE;
00031       case Sct_SctApi::Scan::ope:
00032         return ::SctApi::Scan::OPE;
00033       default:
00034     throw Sct_SctApi::SctApiException("Unknown Sct_SctApi::Scan::ScanOptions opt");
00035       };
00036     };
00037     static Sct_SctApi::Scan::ScanOptions scanOptionsEnumToCorba(const ::SctApi::Scan::ScanOptionsEnum opt) {
00038       switch (opt) {
00039       case ::SctApi::Scan::FULL:
00040     return Sct_SctApi::Scan::full;
00041       case ::SctApi::Scan::BITS32:
00042     return Sct_SctApi::Scan::bits32;
00043       case ::SctApi::Scan::LOOPCALLINE:
00044     return Sct_SctApi::Scan::loopCalLine;
00045       case ::SctApi::Scan::DISTSLAVE:
00046     return Sct_SctApi::Scan::distSlave;
00047       case ::SctApi::Scan::DEBUG:
00048     return Sct_SctApi::Scan::debug;
00049       case ::SctApi::Scan::TIM:
00050     return Sct_SctApi::Scan::tim;
00051       case ::SctApi::Scan::NTH:
00052     return Sct_SctApi::Scan::nth;
00053       case ::SctApi::Scan::NTH_REM:
00054     return Sct_SctApi::Scan::nth_rem;
00055       case ::SctApi::Scan::ENABLE_DATA_MODE:
00056         return Sct_SctApi::Scan::enableDataMode;
00057       case ::SctApi::Scan::USE_CCODE:
00058         return Sct_SctApi::Scan::ccode;
00059       case ::SctApi::Scan::OPE:
00060         return Sct_SctApi::Scan::ope;
00061     default:
00062       throw Sct_SctApi::SctApiException("Unknown ::SctApi::Scan::ScanOptionsEnum opt");
00063       };
00064     };
00065   };
00066 
00067 };
00068 
00069 #endif 

Generated on Mon Feb 6 14:01:18 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6