#ifndef CONFIGCOLLECTION_H #define CONFIGCOLLECTION_H namespace icinga { class ConfigHive; class ConfigCollection : public Object { private: weak_ptr m_Hive; public: typedef shared_ptr Ptr; typedef weak_ptr WeakPtr; typedef map::iterator ObjectIterator; map Objects; void SetHive(const weak_ptr& hive); weak_ptr GetHive(void) const; void AddObject(const ConfigObject::Ptr& object); void RemoveObject(const ConfigObject::Ptr& object); ConfigObject::Ptr GetObject(const string& name = string()); void ForEachObject(function callback); event OnObjectCreated; event OnObjectRemoved; event OnPropertyChanged; }; } #endif /* CONFIGCOLLECTION_H */