]> granicus.if.org Git - icinga2/commitdiff
Moved CIB class constructors from header file to .cpp files.
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 9 Jul 2012 15:07:20 +0000 (17:07 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 9 Jul 2012 15:07:20 +0000 (17:07 +0200)
cib/host.cpp
cib/host.h
cib/hostgroup.cpp
cib/hostgroup.h
cib/service.cpp
cib/service.h
cib/servicegroup.cpp
cib/servicegroup.h

index de2787d92e120ee36cda858c24dd7c71979eeecd..df59f519df1cbb86594ababcafad045a3cec0917 100644 (file)
@@ -2,6 +2,13 @@
 
 using namespace icinga;
 
+Host::Host(const ConfigObject::Ptr& configObject)
+       : ConfigObjectAdapter(configObject)
+{
+       assert(GetType() == "host");
+}
+
+
 string Host::GetAlias(void) const
 {
        string value;
index 156aaeefabf8131d73bafe78de4ce593dc52afe6..3c5d5e077bbd993949196c9b59590fe2761f2f38 100644 (file)
@@ -7,11 +7,7 @@ namespace icinga
 class I2_CIB_API Host : public ConfigObjectAdapter
 {
 public:
-       Host(const ConfigObject::Ptr& configObject)
-               : ConfigObjectAdapter(configObject)
-       {
-               assert(GetType() == "host");
-       }
+       Host(const ConfigObject::Ptr& configObject);
 
        static bool Exists(const string& name);
        static Host GetByName(const string& name);
index 90ceb88753b0ecb1a85a9ed605b6545284b20b78..9e6e74dc9b3cdbe0e4619cc3269629ebba394958 100644 (file)
@@ -2,6 +2,12 @@
 
 using namespace icinga;
 
+HostGroup::HostGroup(const ConfigObject::Ptr& configObject)
+       : ConfigObjectAdapter(configObject)
+{
+       assert(GetType() == "hostgroup");
+}
+
 string HostGroup::GetAlias(void) const
 {
        string value;
index 025c1a819174935a5d2331cbf819c53d41e29a12..7dda66ff65049d41b976b383d0a303badbc57362 100644 (file)
@@ -7,11 +7,7 @@ namespace icinga
 class I2_CIB_API HostGroup : public ConfigObjectAdapter
 {
 public:
-       HostGroup(const ConfigObject::Ptr& configObject)
-               : ConfigObjectAdapter(configObject)
-       {
-               assert(GetType() == "hostgroup");
-       }
+       HostGroup(const ConfigObject::Ptr& configObject);
 
        static bool Exists(const string& name);
        static HostGroup GetByName(const string& name);
index 5bf8092d78bdef9b4c4503fdeec0d0eccd756980..6f811be21f234ffa2e170f15bd481ee2cbc39501 100644 (file)
@@ -2,6 +2,12 @@
 
 using namespace icinga;
 
+Service::Service(const ConfigObject::Ptr& configObject)
+       : ConfigObjectAdapter(configObject)
+{
+       assert(GetType() == "service");
+}
+
 string Service::GetAlias(void) const
 {
        string value;
index 1cd51332eabf90a23a6a6c11dd2dc284bb37a99f..499e7acc3bd18af0a1517ba6d58f3aac3a7f9f98 100644 (file)
@@ -25,11 +25,7 @@ class ServiceStatusMessage;
 class I2_CIB_API Service : public ConfigObjectAdapter
 {
 public:
-       Service(const ConfigObject::Ptr& configObject)
-               : ConfigObjectAdapter(configObject)
-       {
-               assert(GetType() == "service");
-       }
+       Service(const ConfigObject::Ptr& configObject);
 
        static bool Exists(const string& name);
        static Service GetByName(const string& name);
index 39363f0a492d86e2a3af235ecb9629670ee2081a..057379417a7d7a63f87a3cda17c71440b6f7dfff 100644 (file)
@@ -2,6 +2,13 @@
 
 using namespace icinga;
 
+ServiceGroup::ServiceGroup(const ConfigObject::Ptr& configObject)
+       : ConfigObjectAdapter(configObject)
+{
+       assert(GetType() == "servicegroup");
+}
+
+
 string ServiceGroup::GetAlias(void) const
 {
        string value;
index 51cd09111f00fa04296d7beaeb143c518cf08350..5b13a75b57b5f43887b6ddd8dc4ebecb0243e431 100644 (file)
@@ -7,11 +7,7 @@ namespace icinga
 class I2_CIB_API ServiceGroup : public ConfigObjectAdapter
 {
 public:
-       ServiceGroup(const ConfigObject::Ptr& configObject)
-               : ConfigObjectAdapter(configObject)
-       {
-               assert(GetType() == "servicegroup");
-       }
+       ServiceGroup(const ConfigObject::Ptr& configObject);
 
        static bool Exists(const string& name);
        static ServiceGroup GetByName(const string& name);