X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/9b8f74aec65e4e61ae82e14e6cb439da736ee808..30eb6cd56d43fe69026617228478c7c373739a09:/include/stg/user_property.h?ds=sidebyside diff --git a/include/stg/user_property.h b/include/stg/user_property.h index f53b416d..aee32e3e 100644 --- a/include/stg/user_property.h +++ b/include/stg/user_property.h @@ -12,6 +12,7 @@ $Author: faust $ #include #include #include +#include #include #include @@ -32,7 +33,7 @@ public: }; //----------------------------------------------------------------------------- template -class USER_PROPERTY : USER_PROPERTY_BASE { +class USER_PROPERTY : public USER_PROPERTY_BASE { public: USER_PROPERTY(varT & val); virtual ~USER_PROPERTY(); @@ -123,7 +124,7 @@ private: USER_STAT stat; USER_CONF conf; - std::map & properties; + std::map properties; public: USER_PROPERTIES(const std::string & sd); @@ -386,12 +387,13 @@ else //------------------------------------------------------------------------- //------------------------------------------------------------------------- //------------------------------------------------------------------------- +inline std::string USER_PROPERTIES::GetPropertyValue(const std::string & name) const { -std::map::iterator it = properties.find(name); +std::map::const_iterator it = properties.find(name); if (it == properties.end()) return ""; -return it->second.ToString(); +return it->second->ToString(); } //------------------------------------------------------------------------- //------------------------------------------------------------------------- @@ -407,7 +409,7 @@ template inline std::string USER_PROPERTY::ToString() const { -std::stringstream stream; +std::ostringstream stream; stream << value; return stream.str(); }