]> git.stg.codes - stg.git/blobdiff - include/stg/user_property.h
Added const version of GetPointer.
[stg.git] / include / stg / user_property.h
index 97c1af51b7335adeb235422dd3043e847bdeb2dc..20ca6fd8052fe33336a3c66b89292a6da0462239 100644 (file)
@@ -81,6 +81,7 @@ public:
     virtual ~USER_PROPERTY_LOGGED() {}
 
     USER_PROPERTY_LOGGED<varT> * GetPointer() throw() { return this; }
+    const USER_PROPERTY_LOGGED<varT> * GetPointer() const throw() { return this; }
     const varT & Get() const { return USER_PROPERTY<varT>::ConstData(); }
     const std::string & GetName() const { return name; }
     bool Set(const varT & val,
@@ -214,7 +215,7 @@ template <typename varT>
 inline
 void USER_PROPERTY<varT>::Set(const varT & rvalue)
 {
-STG_LOCKER locker(&mutex, __FILE__, __LINE__);
+STG_LOCKER locker(&mutex);
 
 typename std::set<PROPERTY_NOTIFIER_BASE<varT> *>::iterator ni;
 
@@ -244,7 +245,7 @@ template <typename varT>
 inline
 void USER_PROPERTY<varT>::AddBeforeNotifier(PROPERTY_NOTIFIER_BASE<varT> * n)
 {
-STG_LOCKER locker(&mutex, __FILE__, __LINE__);
+STG_LOCKER locker(&mutex);
 beforeNotifiers.insert(n);
 }
 //-----------------------------------------------------------------------------
@@ -252,7 +253,7 @@ template <typename varT>
 inline
 void USER_PROPERTY<varT>::DelBeforeNotifier(const PROPERTY_NOTIFIER_BASE<varT> * n)
 {
-STG_LOCKER locker(&mutex, __FILE__, __LINE__);
+STG_LOCKER locker(&mutex);
 beforeNotifiers.erase(const_cast<PROPERTY_NOTIFIER_BASE<varT> *>(n));
 }
 //-----------------------------------------------------------------------------
@@ -260,7 +261,7 @@ template <typename varT>
 inline
 void USER_PROPERTY<varT>::AddAfterNotifier(PROPERTY_NOTIFIER_BASE<varT> * n)
 {
-STG_LOCKER locker(&mutex, __FILE__, __LINE__);
+STG_LOCKER locker(&mutex);
 afterNotifiers.insert(n);
 }
 //-----------------------------------------------------------------------------
@@ -268,7 +269,7 @@ template <typename varT>
 inline
 void USER_PROPERTY<varT>::DelAfterNotifier(const PROPERTY_NOTIFIER_BASE<varT> * n)
 {
-STG_LOCKER locker(&mutex, __FILE__, __LINE__);
+STG_LOCKER locker(&mutex);
 afterNotifiers.erase(const_cast<PROPERTY_NOTIFIER_BASE<varT> *>(n));
 }
 //-----------------------------------------------------------------------------