00001 // Copyright CERN 2012 - Developed in collaboration with GSI 00002 00003 #ifndef CONVERTER_STRUCT_H_ 00004 #define CONVERTER_STRUCT_H_ 00005 00006 #include <fesa-core/DataStore/Converter.h> 00007 #include <fesa-core/Exception/FesaException.h> 00008 00009 #include <string> 00010 00011 namespace fesa 00012 { 00013 00021 template<typename T> 00022 class Converter<T*> 00023 { 00024 public: 00030 static void valueToString(T* value,std::string& value); 00031 00037 static void stringToValue(const std::string& value, T* pVal); 00038 00039 }; 00040 00041 template<typename T> 00042 inline const Converter<T*>::valueToString(T* value,std::string& str) 00043 { 00044 throw FesaException(__FILE__, __LINE__, FesaErrorSpecializedConverterNotProvided.c_str()); 00045 str = "dummy"; 00046 } 00047 00048 template<typename T> 00049 inline void Converter<T*>::stringToValue(const std::string& value, T* pVal) 00050 { 00051 throw FesaException(__FILE__, __LINE__, FesaErrorSpecializedConverterNotProvided.c_str()); 00052 } 00053 00054 } // fesa 00055 00056 #endif // CONVERTER_STRUCT_H_