00001
00002
00003 #ifndef ASGTOOLS_PROPERTYMGR_H
00004 #define ASGTOOLS_PROPERTYMGR_H
00005
00006
00007 #include "AsgTools/AsgToolsConf.h"
00008
00009 #ifdef ASGTOOL_ATHENA
00010 # include "GaudiKernel/PropertyMgr.h"
00011 #elif defined(ASGTOOL_STANDALONE)
00012
00013
00014 #include <string>
00015 #include <map>
00016
00017
00018 #include "AsgTools/MsgStream.h"
00019 #include "AsgTools/Property.h"
00020 #include "AsgTools/StatusCode.h"
00021
00033 class PropertyMgr {
00034
00035 public:
00037 typedef Property::Type Type;
00038
00040 typedef std::map< std::string, Property* > PropMap_t;
00041
00043 PropertyMgr();
00045 ~PropertyMgr();
00046
00049
00051 template< typename T >
00052 Property* declareProperty( const std::string& name, T& loc );
00053
00055 StatusCode setProperty( const std::string& name, const char* value );
00057 template< typename T >
00058 StatusCode setProperty( const std::string& name, const T& val );
00059
00061 template< typename T >
00062 StatusCode getProperty( const std::string& name, T& val ) const;
00063
00065 const Property* getProperty( const std::string& name ) const;
00066
00068 const PropMap_t& getProperties() const;
00069
00071
00074
00076 MsgStream& msg() const;
00077
00079 MsgStream& msg( MSG::Level level ) const;
00080
00082
00083 private:
00085 PropMap_t m_props;
00087 mutable MsgStream m_msg;
00088
00089 };
00090
00091
00092 #include "AsgTools/PropertyMgr.icc"
00093
00094 #else
00095 # error "What environment are we in?!?"
00096 #endif // Environment selection
00097 #endif // ASGTOOLS_PROPERTYMGR_H