[icinga-checkins] icinga.org: icinga2/master: Move EXPORT_COMPONENT() macros to the beginning of the files.

git at icinga.org git at icinga.org
Fri Feb 8 07:11:20 CET 2013


Module: icinga2
Branch: master
Commit: b14027ec73e13b29b78a8bd309c433001f0bcb88
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=b14027ec73e13b29b78a8bd309c433001f0bcb88

Author: Gunnar Beutner <gunnar at beutner.name>
Date:   Fri Feb  8 07:11:14 2013 +0100

Move EXPORT_COMPONENT() macros to the beginning of the files.

Fixes #3654

---

 components/checker/checkercomponent.cpp           |    5 ++---
 components/compat/compatcomponent.cpp             |    4 ++--
 components/compatido/compatidocomponent.cpp       |    5 ++---
 components/delegation/delegationcomponent.cpp     |    4 ++--
 components/demo/democomponent.cpp                 |    4 ++--
 components/notification/notificationcomponent.cpp |    4 ++--
 components/replication/replicationcomponent.cpp   |    4 ++--
 7 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/components/checker/checkercomponent.cpp b/components/checker/checkercomponent.cpp
index af6e83a..5f6694e 100644
--- a/components/checker/checkercomponent.cpp
+++ b/components/checker/checkercomponent.cpp
@@ -21,6 +21,8 @@
 
 using namespace icinga;
 
+EXPORT_COMPONENT(checker, CheckerComponent);
+
 void CheckerComponent::Start(void)
 {
 	m_Endpoint = Endpoint::MakeEndpoint("checker", false);
@@ -193,6 +195,3 @@ void CheckerComponent::ObjectRemovedHandler(const DynamicObject::Ptr& object)
 	m_IdleServices.erase(service);
 	m_PendingServices.erase(service);
 }
-
-EXPORT_COMPONENT(checker, CheckerComponent);
-
diff --git a/components/compat/compatcomponent.cpp b/components/compat/compatcomponent.cpp
index db0b15b..2fae796 100644
--- a/components/compat/compatcomponent.cpp
+++ b/components/compat/compatcomponent.cpp
@@ -21,6 +21,8 @@
 
 using namespace icinga;
 
+EXPORT_COMPONENT(compat, CompatComponent);
+
 /**
  * Hint: The reason why we're using "\n" rather than std::endl is because
  * std::endl also _flushes_ the output stream which severely degrades
@@ -546,5 +548,3 @@ void CompatComponent::StatusTimerHandler(void)
 	if (rename(objectspathtmp.CStr(), objectspath.CStr()) < 0)
 		BOOST_THROW_EXCEPTION(PosixException("rename() failed", errno));
 }
-
-EXPORT_COMPONENT(compat, CompatComponent);
diff --git a/components/compatido/compatidocomponent.cpp b/components/compatido/compatidocomponent.cpp
index 62181c0..f5a4b4b 100644
--- a/components/compatido/compatidocomponent.cpp
+++ b/components/compatido/compatidocomponent.cpp
@@ -21,6 +21,8 @@
 
 using namespace icinga;
 
+EXPORT_COMPONENT(compatido, CompatIdoComponent);
+
 const String CompatIdoComponent::DefaultSocketAddress = "127.0.0.1";
 const String CompatIdoComponent::DefaultSocketPort = "5668";
 const String CompatIdoComponent::DefaultInstanceName = "i2-default";
@@ -835,6 +837,3 @@ void CompatIdoComponent::DumpStatusData(void)
 		DumpServiceStatus(service);
 	}
 }
-
-
-EXPORT_COMPONENT(compatido, CompatIdoComponent);
diff --git a/components/delegation/delegationcomponent.cpp b/components/delegation/delegationcomponent.cpp
index 3e8d9cf..5744b2d 100644
--- a/components/delegation/delegationcomponent.cpp
+++ b/components/delegation/delegationcomponent.cpp
@@ -22,6 +22,8 @@
 
 using namespace icinga;
 
+EXPORT_COMPONENT(delegation, DelegationComponent);
+
 void DelegationComponent::Start(void)
 {
 	m_DelegationTimer = boost::make_shared<Timer>();
@@ -203,5 +205,3 @@ void DelegationComponent::DelegationTimerHandler(void)
 	msgbuf << "Updated delegations for " << delegated << " services";
 	Logger::Write(LogInformation, "delegation", msgbuf.str());
 }
-
-EXPORT_COMPONENT(delegation, DelegationComponent);
diff --git a/components/demo/democomponent.cpp b/components/demo/democomponent.cpp
index 1b4ab06..e2657d0 100644
--- a/components/demo/democomponent.cpp
+++ b/components/demo/democomponent.cpp
@@ -21,6 +21,8 @@
 
 using namespace icinga;
 
+EXPORT_COMPONENT(demo, DemoComponent);
+
 /**
  * Starts the component.
  */
@@ -71,5 +73,3 @@ void DemoComponent::HelloWorldRequestHandler(const Endpoint::Ptr& sender,
 	Logger::Write(LogInformation, "demo", "Got 'hello world' from identity=" +
 	    (sender ? sender->GetName() : "(anonymous)"));
 }
-
-EXPORT_COMPONENT(demo, DemoComponent);
diff --git a/components/notification/notificationcomponent.cpp b/components/notification/notificationcomponent.cpp
index c2eb254..7dac914 100644
--- a/components/notification/notificationcomponent.cpp
+++ b/components/notification/notificationcomponent.cpp
@@ -21,6 +21,8 @@
 
 using namespace icinga;
 
+EXPORT_COMPONENT(notification, NotificationComponent);
+
 /**
  * Starts the component.
  */
@@ -48,5 +50,3 @@ void NotificationComponent::NotificationTimerHandler(void)
 {
 	// TODO: implement
 }
-
-EXPORT_COMPONENT(notification, NotificationComponent);
diff --git a/components/replication/replicationcomponent.cpp b/components/replication/replicationcomponent.cpp
index fee1d2a..5995b9c 100644
--- a/components/replication/replicationcomponent.cpp
+++ b/components/replication/replicationcomponent.cpp
@@ -21,6 +21,8 @@
 
 using namespace icinga;
 
+EXPORT_COMPONENT(replication, ReplicationComponent);
+
 /**
  * Starts the component.
  */
@@ -248,5 +250,3 @@ void ReplicationComponent::RemoteObjectRemovedHandler(const RequestMessage& requ
 		object->Unregister();
 	}
 }
-
-EXPORT_COMPONENT(replication, ReplicationComponent);





More information about the icinga-checkins mailing list