5 #ifndef INCLUDE_PERSISTENCYSVC_ITECHNOLOGYSPECIFICATTRIBUTES_H
6 #define INCLUDE_PERSISTENCYSVC_ITECHNOLOGYSPECIFICATTRIBUTES_H
30 "ITechnologySpecificAttributes" )
37 template<
class T > T
attribute(
const std::string& attributeName,
38 const std::string& option =
"" ) {
40 const std::type_info& typeInfo =
typeid(T);
42 static_cast< void*
>( &
data ),
45 std::ostringstream
error;
46 error <<
"Failed to retrieve attribute " << attributeName <<
" of type " << typeInfo.name();
53 template<
class T >
bool setAttribute(
const std::string& attributeName,
54 const T& atttibuteValue,
55 const std::string& option =
"" ) {
57 static_cast< const void*
>( &atttibuteValue ),
69 const std::type_info& typeInfo,
70 const std::string& option ) = 0;
75 const std::type_info& typeInfo,
76 const std::string& option ) = 0;