X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/6c9a0f6104d79654dd12f5d5e585af3c60649a48..7d8cd97c12ce291be0da9e16e4c1d136020a246d:/include/stg/user_property.h diff --git a/include/stg/user_property.h b/include/stg/user_property.h index 9030d37f..1716296a 100644 --- a/include/stg/user_property.h +++ b/include/stg/user_property.h @@ -24,7 +24,7 @@ $Author: faust $ #include "notifer.h" #include "noncopyable.h" -extern const volatile time_t stgTime; +extern volatile time_t stgTime; //----------------------------------------------------------------------------- template @@ -51,6 +51,7 @@ public: time_t ModificationTime() const throw() { return modificationTime; } void ModifyTime() throw(); + std::string ToString() const; private: varT & value; time_t modificationTime; @@ -295,8 +296,8 @@ if ((priv->userConf && !isStat) || std::stringstream oldVal; std::stringstream newVal; - oldVal.flags(oldVal.flags() | ios::fixed); - newVal.flags(newVal.flags() | ios::fixed); + oldVal.flags(oldVal.flags() | std::ios::fixed); + newVal.flags(newVal.flags() | std::ios::fixed); oldVal << USER_PROPERTY::ConstData(); newVal << val; @@ -377,10 +378,16 @@ else //------------------------------------------------------------------------- template inline -ostream & operator<< (ostream & stream, const USER_PROPERTY & value) +std::ostream & operator<< (std::ostream & stream, const USER_PROPERTY & value) { return stream << value.ConstData(); } //----------------------------------------------------------------------------- - +template +std::string USER_PROPERTY::ToString() const +{ +std::stringstream stream; +stream << value; +return stream.str(); +} #endif // USER_PROPERTY_H