18#ifndef _LOG4CXX_HELPERS_APRINITIALIZER_H
19#define _LOG4CXX_HELPERS_APRINITIALIZER_H
22 #error "aprinitializer.h should only be included by log4cxx implementation"
29 struct apr_threadkey_t;
38#if LOG4CXX_ABI_VERSION <= 15
45#if LOG4CXX_ABI_VERSION <= 15
53#if LOG4CXX_ABI_VERSION <= 15
66 template <
class T>
static void setUnique(
const std::shared_ptr<T>& pObject)
68 getInstance().addObject(
typeid(T).hash_code(), pObject);
73 template <
class T>
static std::shared_ptr<T>
getOrAddUnique(std::function<ObjectPtr()> creator)
75 return cast<T>(getInstance().findOrAddObject(
typeid(T).hash_code(), creator));
85 void addObject(
size_t key,
const ObjectPtr& pObject);
86 const ObjectPtr& findOrAddObject(
size_t key, std::function<ObjectPtr()> creator);
88 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(APRInitializerPrivate, m_priv)
Definition aprinitializer.h:43
static void unregisterAll()
static apr_threadkey_t * getTlsKey()
static std::shared_ptr< T > getOrAddUnique(std::function< ObjectPtr()> creator)
Fetch or add a single instance type ObjectPtr for deletion prior to termination.
Definition aprinitializer.h:73
static void registerCleanup(FileWatchdog *watchdog)
Register a FileWatchdog for deletion prior to termination.
static log4cxx_time_t getStartTime()
static log4cxx_time_t initialize()
static apr_pool_t * getRootPool()
static void setUnique(const std::shared_ptr< T > &pObject)
Store a single instance type ObjectPtr for deletion prior to termination.
Definition aprinitializer.h:66
static bool isDestructed
Definition aprinitializer.h:47
static void unregisterCleanup(FileWatchdog *watchdog)
Check every now and then that a certain file has not changed.
Definition filewatchdog.h:36
The WideLife wrapper is destined to prolongate the runtime logger state lifetime from static duration...
Definition widelife.h:37
std::shared_ptr< Ret > cast(const std::shared_ptr< Type > &incoming)
Attempt to cast one Object to another kind of Object.
Definition object.h:127