]> git.stg.codes - stg.git/blobdiff - include/stg/user_property.h
Add type REGISTRY in USER_PROPERTIES
[stg.git] / include / stg / user_property.h
index f2421213bc6efbdc3dc3ccacc62dccd2588413d3..da60ff1c7362f26772dcf50f0b848fc2b171bdd6 100644 (file)
@@ -121,11 +121,13 @@ class USER_PROPERTIES : private NONCOPYABLE {
  начале идет закрытая секция
  * */
 
+public:
+    typedef std::map<std::string, USER_PROPERTY_BASE *> REGISTRY;
 private:
     USER_STAT stat;
     USER_CONF conf;
 
-    std::map<std::string, USER_PROPERTY_BASE *> properties;
+    REGISTRY properties;
 public:
     USER_PROPERTIES(const std::string & sd);
 
@@ -280,7 +282,7 @@ USER_PROPERTY_LOGGED<varT>::USER_PROPERTY_LOGGED(varT & val,
                                                  bool isSt,
                                                  STG_LOGGER & logger,
                                                  const std::string & sd,
-                                                 std::map<std::string, USER_PROPERTY_BASE*> & properties)
+                                                 USER_PROPERTIES::REGISTRY & properties)
 
     : USER_PROPERTY<varT>(val),
       stgLogger(logger),
@@ -392,7 +394,7 @@ else
 inline
 std::string USER_PROPERTIES::GetPropertyValue(const std::string & name) const
 {
-std::map<std::string, USER_PROPERTY_BASE*>::const_iterator it = properties.find(ToLower(name));
+REGISTRY::const_iterator it = properties.find(ToLower(name));
 if (it == properties.end())
     return "";
 return it->second->ToString();