5 #ifndef INCLUDE_PERSISTENCYSVC_ITECHNOLOGYSPECIFICATTRIBUTES_H
6 #define INCLUDE_PERSISTENCYSVC_ITECHNOLOGYSPECIFICATTRIBUTES_H
25 template<
class T > T
attribute(
const std::string& attributeName,
26 const std::string& option =
"" ) {
28 const std::type_info& typeInfo =
typeid(T);
30 static_cast< void*
>( &
data ),
33 std::ostringstream
error;
34 error <<
"Failed to retrieve attribute " << attributeName <<
" of type " << typeInfo.name();
35 throw std::runtime_error(
error.str() +
" (APR: \" ITechnologySpecificAttributes \" from \" PersistencySvc \")");
41 template<
class T >
bool setAttribute(
const std::string& attributeName,
42 const T& atttibuteValue,
43 const std::string& option =
"" ) {
45 static_cast< const void*
>( &atttibuteValue ),
57 const std::type_info& typeInfo,
58 const std::string& option ) = 0;
63 const std::type_info& typeInfo,
64 const std::string& option ) = 0;