]> granicus.if.org Git - icinga2/commitdiff
Bugfixes for libdyn.
authorGunnar Beutner <gunnar@beutner.name>
Mon, 11 Jun 2012 12:04:16 +0000 (14:04 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Mon, 11 Jun 2012 12:04:16 +0000 (14:04 +0200)
dyn/configvm.h
dyn/dyn.vcxproj
dyn/dynamicobject.cpp
dyn/dynamicobject.h
dyn/objectset.h

index b6261b041db905ba261a136a1de895c9700a3cc0..b6238b1bdfec135b4c3f7faee3b136b560b1c159 100644 (file)
@@ -23,7 +23,7 @@
 namespace icinga
 {
 
-class ConfigVM
+class I2_DYN_API ConfigVM
 {
 public:
        static void ExecuteItems(const vector<ConfigItem::Ptr>& items);
index 010bdee5a572f6a578c9df5c47808e58e8e58e13..02b53261218105f08fb2f23489b512ccf7f0a34b 100644 (file)
     </ProjectConfiguration>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="configcontext.h" />
+    <ClInclude Include="configcompiler.h" />
+    <ClInclude Include="configitem.h" />
+    <ClInclude Include="configvm.h" />
     <ClInclude Include="config_parser.h" />
-    <ClInclude Include="dynamicdictionary.h" />
+    <ClInclude Include="debuginfo.h" />
     <ClInclude Include="dynamicobject.h" />
+    <ClInclude Include="expression.h" />
+    <ClInclude Include="expressionlist.h" />
     <ClInclude Include="i2-dyn.h" />
     <ClInclude Include="objectmap.h" />
     <ClInclude Include="objectset.h" />
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="configcontext.cpp" />
+    <ClCompile Include="configcompiler.cpp" />
+    <ClCompile Include="configitem.cpp" />
+    <ClCompile Include="configvm.cpp" />
     <ClCompile Include="config_lexer.cc" />
     <ClCompile Include="config_parser.cc" />
-    <ClCompile Include="dynamicdictionary.cpp" />
     <ClCompile Include="dynamicobject.cpp" />
+    <ClCompile Include="expression.cpp" />
+    <ClCompile Include="expressionlist.cpp" />
     <ClCompile Include="objectmap.cpp" />
     <ClCompile Include="objectset.cpp" />
   </ItemGroup>
index cc877ac3c771c0555f044680b98141119eac69cd..542b23b9287e65d3e3c2d4a11c3836fec3a480f3 100644 (file)
@@ -36,8 +36,11 @@ Dictionary::Ptr DynamicObject::GetConfig(void) const
        return m_Config;
 }
 
-Dictionary::Ptr DynamicObject::GetTags(void) const
+Dictionary::Ptr DynamicObject::GetTags(void)
 {
+       if (!m_Tags)
+               m_Tags = make_shared<Dictionary>();
+
        return m_Tags;
 }
 
index 719a9df29336fd44f17a997c8e470e26e4593d41..e8d118a35245068e4e4dd661879bf2e6caf0118a 100644 (file)
@@ -36,7 +36,7 @@ public:
        void SetConfig(Dictionary::Ptr config);
        Dictionary::Ptr GetConfig(void) const;
 
-       Dictionary::Ptr GetTags(void) const;
+       Dictionary::Ptr GetTags(void);
 
        string GetType(void) const;
        string GetName(void) const;
index 770b12f0e4e478e30b9d6d2c21cdd8e1119bcc6a..af0796a711bfc4c81656ab792d36b3cc3418f5ad 100644 (file)
@@ -124,7 +124,7 @@ public:
 private:
        set<TValue> m_Objects;
 
-       ObjectSet::Ptr m_Parent;
+       typename ObjectSet<TValue>::Ptr m_Parent;
        function<bool (const TValue&)> m_Predicate;
 
        int ObjectAddedOrCommittedHandler(const ObjectSetEventArgs<TValue>& ea)