mirror of
				https://github.com/Icinga/icinga2.git
				synced 2025-11-03 21:25:56 +01:00 
			
		
		
		
	
							parent
							
								
									98c3431dda
								
							
						
					
					
						commit
						2a6151e935
					
				@ -34,8 +34,10 @@ inline bool InitializeOnceHelper(InitializeFunc func)
 | 
			
		||||
	return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define INITIALIZE_ONCE(name, func) \
 | 
			
		||||
	I2_EXPORT bool l_InitializeOnce ## name(InitializeOnceHelper(func))
 | 
			
		||||
#define INITIALIZE_ONCE(func) \
 | 
			
		||||
	namespace { \
 | 
			
		||||
		I2_EXPORT bool l_InitializeOnce(InitializeOnceHelper(func)); \
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -104,7 +104,7 @@ struct FactoryHelper
 | 
			
		||||
			icinga::Type::Register(GetType<type>()); \
 | 
			
		||||
		} \
 | 
			
		||||
		\
 | 
			
		||||
		INITIALIZE_ONCE(type, RegisterType); \
 | 
			
		||||
		INITIALIZE_ONCE(RegisterType); \
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -35,7 +35,7 @@ REGISTER_TYPE(DbConnection);
 | 
			
		||||
 | 
			
		||||
Timer::Ptr DbConnection::m_ProgramStatusTimer;
 | 
			
		||||
 | 
			
		||||
INITIALIZE_ONCE(DbConnection, &DbConnection::StaticInitialize);
 | 
			
		||||
INITIALIZE_ONCE(&DbConnection::StaticInitialize);
 | 
			
		||||
 | 
			
		||||
void DbConnection::Start(void)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
@ -32,7 +32,7 @@ using namespace icinga;
 | 
			
		||||
 | 
			
		||||
boost::signals2::signal<void (const DbQuery&)> DbObject::OnQuery;
 | 
			
		||||
 | 
			
		||||
INITIALIZE_ONCE(DbObject, &DbObject::StaticInitialize);
 | 
			
		||||
INITIALIZE_ONCE(&DbObject::StaticInitialize);
 | 
			
		||||
 | 
			
		||||
DbObject::DbObject(const shared_ptr<DbType>& type, const String& name1, const String& name2)
 | 
			
		||||
	: m_Name1(name1), m_Name2(name2), m_Type(type), m_LastConfigUpdate(0), m_LastStatusUpdate(0)
 | 
			
		||||
 | 
			
		||||
@ -38,7 +38,7 @@ using namespace icinga;
 | 
			
		||||
 | 
			
		||||
REGISTER_DBTYPE(Service, "service", DbObjectTypeService, "service_object_id", ServiceDbObject);
 | 
			
		||||
 | 
			
		||||
INITIALIZE_ONCE(ServiceDbObject, &ServiceDbObject::StaticInitialize);
 | 
			
		||||
INITIALIZE_ONCE(&ServiceDbObject::StaticInitialize);
 | 
			
		||||
 | 
			
		||||
void ServiceDbObject::StaticInitialize(void)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
@ -33,7 +33,7 @@ using namespace icinga;
 | 
			
		||||
static Timer::Ptr l_RetentionTimer;
 | 
			
		||||
 | 
			
		||||
REGISTER_TYPE(IcingaApplication);
 | 
			
		||||
INITIALIZE_ONCE(IcingaApplication, &IcingaApplication::StaticInitialize);
 | 
			
		||||
INITIALIZE_ONCE(&IcingaApplication::StaticInitialize);
 | 
			
		||||
 | 
			
		||||
void IcingaApplication::StaticInitialize(void)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user