]> granicus.if.org Git - icinga2/commitdiff
Add DECLARE_PTR_TYPEDEFS macro for Ptr/WeakPtr typedefs.
authorGunnar Beutner <gunnar.beutner@netways.de>
Tue, 9 Jul 2013 06:42:08 +0000 (08:42 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Tue, 9 Jul 2013 06:43:52 +0000 (08:43 +0200)
74 files changed:
components/checker/checkercomponent.h
components/compat/checkresultreader.h
components/compat/compatcomponent.h
components/compat/compatlog.h
components/delegation/delegationcomponent.h
components/demo/democomponent.h
components/livestatus/andfilter.h
components/livestatus/attributefilter.h
components/livestatus/combinerfilter.h
components/livestatus/commentstable.h
components/livestatus/contactgroupstable.h
components/livestatus/contactstable.h
components/livestatus/downtimestable.h
components/livestatus/filter.h
components/livestatus/hoststable.h
components/livestatus/negatefilter.h
components/livestatus/orfilter.h
components/livestatus/query.h
components/livestatus/servicestable.h
components/livestatus/statustable.h
components/livestatus/table.h
components/notification/notificationcomponent.h
components/replication/replicationcomponent.h
lib/base/application.h
lib/base/array.h
lib/base/bufferedstream.h
lib/base/consolelogger.h
lib/base/dictionary.h
lib/base/dynamicobject.h
lib/base/dynamictype.h
lib/base/fifo.h
lib/base/filelogger.h
lib/base/logger.h
lib/base/networkstream.h
lib/base/object.h
lib/base/process.h
lib/base/ringbuffer.h
lib/base/script.h
lib/base/scriptfunction.h
lib/base/scriptinterpreter.h
lib/base/scriptlanguage.h
lib/base/socket.h
lib/base/stdiostream.h
lib/base/stream.h
lib/base/streamlogger.h
lib/base/sysloglogger.h
lib/base/tcpsocket.h
lib/base/timer.h
lib/base/tlsstream.h
lib/base/unixsocket.h
lib/config/configitem.h
lib/config/configitembuilder.h
lib/config/configtype.h
lib/config/expressionlist.h
lib/config/typerulelist.h
lib/icinga/checkcommand.h
lib/icinga/command.h
lib/icinga/eventcommand.h
lib/icinga/host.h
lib/icinga/hostgroup.h
lib/icinga/icingaapplication.h
lib/icinga/macroresolver.h
lib/icinga/notification.h
lib/icinga/notificationcommand.h
lib/icinga/perfdatawriter.h
lib/icinga/service.h
lib/icinga/servicegroup.h
lib/icinga/timeperiod.h
lib/icinga/user.h
lib/icinga/usergroup.h
lib/python/pythoninterpreter.h
lib/python/pythonlanguage.h
lib/remoting/endpoint.h
lib/remoting/endpointmanager.h

index 65d56a72376da8caa68df5466c3695819f642eaf..dfcc83967ad20f47be086bbc34503e2cab5b970d 100644 (file)
@@ -63,8 +63,7 @@ struct ServiceNextCheckExtractor
 class CheckerComponent : public DynamicObject
 {
 public:
-       typedef shared_ptr<CheckerComponent> Ptr;
-       typedef weak_ptr<CheckerComponent> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(CheckerComponent);
 
        typedef boost::multi_index_container<
                Service::Ptr,
index 2b6695f6dd52589605f27c8a486ab3025d2a1387..3820103d2287d264eeb29c4b38513b67b0a2724a 100644 (file)
@@ -36,8 +36,7 @@ namespace icinga
 class CheckResultReader : public DynamicObject
 {
 public:
-       typedef shared_ptr<CheckResultReader> Ptr;
-       typedef weak_ptr<CheckResultReader> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(CheckResultReader);
 
        CheckResultReader(const Dictionary::Ptr& properties);
 
index e36ec079b850ea469d502ca002a81f2c9cdbee89..e42052b64ca61d4988d74582e8c5c74b8fd27ef2 100644 (file)
@@ -45,6 +45,8 @@ enum CompatObjectType
 class CompatComponent : public DynamicObject
 {
 public:
+       DECLARE_PTR_TYPEDEFS(CompatComponent);
+
        CompatComponent(const Dictionary::Ptr& serializedUpdate);
 
        virtual void Start(void);
index 5e739c1364134079a31f92e9976fa26a463ad1cf..b45ef13f3703cdf412c360c4366eacb911678e91 100644 (file)
@@ -37,8 +37,7 @@ namespace icinga
 class CompatLog : public DynamicObject
 {
 public:
-       typedef shared_ptr<CompatLog> Ptr;
-       typedef weak_ptr<CompatLog> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(CompatLog);
 
        CompatLog(const Dictionary::Ptr& serializedUpdate);
 
index fe8a5cba7d9e352723ce992ca7f28452529229f3..362bf834f321987db43438c084bc67cc02768d94 100644 (file)
@@ -34,6 +34,8 @@ namespace icinga
 class DelegationComponent : public DynamicObject
 {
 public:
+       DECLARE_PTR_TYPEDEFS(DelegationComponent);
+
        DelegationComponent(const Dictionary::Ptr& serializedUpdate);
 
        virtual void Start(void);
index 43f8cc16e6346a90a681debca5a3b61aa1136593..a1bcba8716e870350a79014de62955e9581e66f8 100644 (file)
@@ -33,6 +33,8 @@ namespace icinga
 class DemoComponent : public DynamicObject
 {
 public:
+       DECLARE_PTR_TYPEDEFS(DemoComponent);
+
        DemoComponent(const Dictionary::Ptr& serializedUpdate);
 
        virtual void Start(void);
index 52060605896d94014e9bf53e83429861080d751c..aafe5bf9871c6efc0d249fb73a05c387c5408c21 100644 (file)
@@ -33,8 +33,7 @@ namespace livestatus
 class AndFilter : public CombinerFilter
 {
 public:
-       typedef shared_ptr<AndFilter> Ptr;
-       typedef weak_ptr<AndFilter> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(AndFilter);
 
        AndFilter(void);
 
index 0e3f3b71f882ff6f2589b69354abf70f16dcfbfd..939f030d61439c18c113cf26abc42eba62b860fb 100644 (file)
@@ -33,8 +33,7 @@ namespace livestatus
 class AttributeFilter : public Filter
 {
 public:
-       typedef shared_ptr<AttributeFilter> Ptr;
-       typedef weak_ptr<AttributeFilter> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(AttributeFilter);
 
        AttributeFilter(const String& column, const String& op, const String& operand);
 
index 70538172dfa81e31ab3c31164df32a224f400494..01a372cfe125ef627db3a34e7af845a98f5be731 100644 (file)
@@ -33,8 +33,7 @@ namespace livestatus
 class CombinerFilter : public Filter
 {
 public:
-       typedef shared_ptr<CombinerFilter> Ptr;
-       typedef weak_ptr<CombinerFilter> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(CombinerFilter);
 
        CombinerFilter(void);
 
index 56197e56db9706acb915840e6a934693ab4c9537..b47d364933d7b48e28df8cc4178e5724883174e9 100644 (file)
@@ -33,8 +33,7 @@ namespace livestatus
 class CommentsTable : public Table
 {
 public:
-       typedef shared_ptr<CommentsTable> Ptr;
-       typedef weak_ptr<CommentsTable> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(CommentsTable);
 
        CommentsTable(void);
 
index 6710ffab24d55cd4c8505c8fd2b76f371f7b86ab..247a689425c5296376ee547820b297e6f8e2a1d8 100644 (file)
@@ -33,8 +33,7 @@ namespace livestatus
 class ContactGroupsTable : public Table
 {
 public:
-       typedef shared_ptr<ContactGroupsTable> Ptr;
-       typedef weak_ptr<ContactGroupsTable> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(ContactGroupsTable);
 
        ContactGroupsTable(void);
 
index 744f7f1788304a22198ae6241128d27ec26a5cfe..673a61d388f683b115ba38394da88d66248a7e86 100644 (file)
@@ -33,8 +33,7 @@ namespace livestatus
 class ContactsTable : public Table
 {
 public:
-       typedef shared_ptr<ContactsTable> Ptr;
-       typedef weak_ptr<ContactsTable> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(ContactsTable);
 
        ContactsTable(void);
 
index ee38f9bf149788fba4b68c15251cbf8ad680402c..e14bb29e0060384f90e96aa025b5ecdb4543e00a 100644 (file)
@@ -33,8 +33,7 @@ namespace livestatus
 class DowntimesTable : public Table
 {
 public:
-       typedef shared_ptr<DowntimesTable> Ptr;
-       typedef weak_ptr<DowntimesTable> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(DowntimesTable);
 
        DowntimesTable(void);
 
index 68dfef6195497bb803449f2581dad2def37904e3..1038da9cc04a58496cda658ca3e9927bcdb7f99b 100644 (file)
@@ -31,8 +31,7 @@ namespace livestatus
 class Filter : public Object
 {
 public:
-       typedef shared_ptr<Filter> Ptr;
-       typedef weak_ptr<Filter> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Filter);
 
        virtual bool Apply(const Table::Ptr& table, const Object::Ptr& object) = 0;
 
index 6c8fdd692b673f0c12b730fa8cc59b4fbc5e29b8..24bc21334b55104b07687a87570a7584911d8185 100644 (file)
@@ -33,8 +33,7 @@ namespace livestatus
 class HostsTable : public Table
 {
 public:
-       typedef shared_ptr<HostsTable> Ptr;
-       typedef weak_ptr<HostsTable> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(HostsTable);
 
        HostsTable(void);
 
index 18759345c694d36d3df3ca1222a03d63e36e6a51..3461c0f8bf8915c186ba51abe284722826b1c07c 100644 (file)
@@ -33,8 +33,7 @@ namespace livestatus
 class NegateFilter : public Filter
 {
 public:
-       typedef shared_ptr<NegateFilter> Ptr;
-       typedef weak_ptr<NegateFilter> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(NegateFilter);
 
        NegateFilter(const Filter::Ptr& inner);
 
index 2d323f1b39ba1e9d39842c5b498b0b1e3967fead..207207575cffd726c0af49d40b896c0c2af9dbd8 100644 (file)
@@ -33,8 +33,7 @@ namespace livestatus
 class OrFilter : public CombinerFilter
 {
 public:
-       typedef shared_ptr<OrFilter> Ptr;
-       typedef weak_ptr<OrFilter> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(OrFilter);
 
        OrFilter(void);
 
index 2d8362d9be23d0288fb1d0f1aa933be24527e53e..270aa6abee1467b311ffcac0862e805a83f1fad1 100644 (file)
@@ -37,8 +37,7 @@ namespace livestatus
 class Query : public Object
 {
 public:
-       typedef shared_ptr<Query> Ptr;
-       typedef weak_ptr<Query> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Query);
 
        Query(const std::vector<String>& lines);
 
index 33a80248efcfd89530bc62666f6f01d5fc3cb9b9..e45ee3b145052fa8b994bb7a27c95865d953ad7f 100644 (file)
@@ -33,8 +33,7 @@ namespace livestatus
 class ServicesTable : public Table
 {
 public:
-       typedef shared_ptr<ServicesTable> Ptr;
-       typedef weak_ptr<ServicesTable> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(ServicesTable);
 
        ServicesTable(void);
 
index 5a891e7e3c174e7898b110840c02ce016b7bb333..dcde0473d16914c01eb319d005fe119d46ad1a71 100644 (file)
@@ -33,8 +33,7 @@ namespace livestatus
 class StatusTable : public Table
 {
 public:
-       typedef shared_ptr<StatusTable> Ptr;
-       typedef weak_ptr<StatusTable> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(StatusTable);
 
        StatusTable(void);
 
index 78beb1a7af113e70dccdf1a1f69aa09cec78c19d..0614aa95dc82fe06e530d0fd290474f56ecd02bd 100644 (file)
@@ -36,8 +36,7 @@ class Filter;
 class Table : public Object
 {
 public:
-       typedef shared_ptr<Table> Ptr;
-       typedef weak_ptr<Table> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Table);
 
        typedef boost::function<void (const Object::Ptr&)> AddRowFunction;
 
index ab56d7d27b7164892caae25258e09a9121a9c41e..5cff72798c240deefb186b7310bb9b9697fcb04d 100644 (file)
@@ -33,6 +33,8 @@ namespace icinga
 class NotificationComponent : public DynamicObject
 {
 public:
+       DECLARE_PTR_TYPEDEFS(NotificationComponent);
+
        NotificationComponent(const Dictionary::Ptr& serializedUpdate);
 
        virtual void Start(void);
index d097e181cf9e14acec2f18ce5dc797f8242a8111..1950ef22cd47362f26c1f8fb89611d343288512c 100644 (file)
@@ -32,6 +32,8 @@ namespace icinga
 class ReplicationComponent : public DynamicObject
 {
 public:
+       DECLARE_PTR_TYPEDEFS(ReplicationComponent);
+
        ReplicationComponent(const Dictionary::Ptr& serializedUpdate);
 
        virtual void Start(void);
index c4aaaec1327fea2d3fdb22abc3d6ac998cb1a06c..fdea6a0924395f5c2f6c720d909a04ca535c3740 100644 (file)
@@ -35,8 +35,7 @@ class Component;
  */
 class I2_BASE_API Application : public DynamicObject {
 public:
-       typedef shared_ptr<Application> Ptr;
-       typedef weak_ptr<Application> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Application);
 
        explicit Application(const Dictionary::Ptr& serializedUpdate);
        ~Application(void);
index cefba286d55be38f0737cea52d6bd5836b4245e0..fe96093003286b703bb6d4f618e41bd9ff162f4f 100644 (file)
@@ -35,8 +35,7 @@ namespace icinga
 class I2_BASE_API Array : public Object
 {
 public:
-       typedef shared_ptr<Array> Ptr;
-       typedef weak_ptr<Array> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Array);
 
        /**
         * An iterator that can be used to iterate over array elements.
index 4176a7754c68c724d77e0022af1b550925320fea..75934f553fbe2aaca8b3a875de485053bc6c2dd1 100644 (file)
@@ -35,8 +35,7 @@ namespace icinga
 class I2_BASE_API BufferedStream : public Stream
 {
 public:
-       typedef shared_ptr<BufferedStream> Ptr;
-       typedef weak_ptr<BufferedStream> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(BufferedStream);
 
        BufferedStream(const Stream::Ptr& innerStream);
        ~BufferedStream(void);
index 973d5fd21b3797ca518504eefc32253c0d87c9b2..f39ef56af9b76f2cd97389480ab58473f98b0316 100644 (file)
@@ -34,8 +34,7 @@ namespace icinga
 class I2_BASE_API ConsoleLogger : public StreamLogger
 {
 public:
-       typedef shared_ptr<ConsoleLogger> Ptr;
-       typedef weak_ptr<ConsoleLogger> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(ConsoleLogger);
 
        explicit ConsoleLogger(const Dictionary::Ptr& serializedUpdate);
 };
index 2bb9061afe12ad12b26b180f5186d2324f255bb3..8f8e669c33f1233253b585632533b300d8c2c6ff 100644 (file)
@@ -36,8 +36,7 @@ namespace icinga
 class I2_BASE_API Dictionary : public Object
 {
 public:
-       typedef shared_ptr<Dictionary> Ptr;
-       typedef weak_ptr<Dictionary> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Dictionary);
 
        /**
         * An iterator that can be used to iterate over dictionary elements.
index 0ad599c74ca9534d7bd49ceed3a785b8e1bd6404..1308ab0a24d5b0cf5fd76a4dc84825fd179a5c5d 100644 (file)
@@ -42,8 +42,7 @@ class DynamicType;
 class I2_BASE_API DynamicObject : public Object
 {
 public:
-       typedef shared_ptr<DynamicObject> Ptr;
-       typedef weak_ptr<DynamicObject> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(DynamicObject);
 
        typedef std::map<String, AttributeHolder, string_iless> AttributeMap;
        typedef AttributeMap::iterator AttributeIterator;
index b4e65670d6dbb1f0c7efe5221be90bbe97998d86..7b7c8dd90b8ebbdac7f4ea568e84d7f12eeb83e7 100644 (file)
@@ -34,8 +34,7 @@ namespace icinga
 class I2_BASE_API DynamicType : public Object
 {
 public:
-       typedef shared_ptr<DynamicType> Ptr;
-       typedef weak_ptr<DynamicType> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(DynamicType);
 
        typedef boost::function<DynamicObject::Ptr (const Dictionary::Ptr&)> ObjectFactory;
 
index 97c81e1a1cd8987c5cbbceff9ff7be824a93f250..cab32b160fe7452d3d1dd2fcb2d04bbb8435152e 100644 (file)
@@ -34,10 +34,9 @@ namespace icinga
 class I2_BASE_API FIFO : public Stream
 {
 public:
-       static const size_t BlockSize = 16 * 1024;
+       DECLARE_PTR_TYPEDEFS(FIFO);
 
-       typedef shared_ptr<FIFO> Ptr;
-       typedef weak_ptr<FIFO> WeakPtr;
+       static const size_t BlockSize = 16 * 1024;
 
        FIFO(void);
        ~FIFO(void);
index 9c872b31349edcc32747f233f48bbbb96aeaef3d..5ed0f2df78b6e756724639f9e9d056b71be044a7 100644 (file)
@@ -34,8 +34,7 @@ namespace icinga
 class I2_BASE_API FileLogger : public StreamLogger
 {
 public:
-       typedef shared_ptr<FileLogger> Ptr;
-       typedef weak_ptr<FileLogger> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(FileLogger);
 
        explicit FileLogger(const Dictionary::Ptr& serializedUpdate);
 
index dc11f810949cb2f48fa44389be5101c3448d812a..085ebbb893ea915a4d637eae0493e8b562773efb 100644 (file)
@@ -48,8 +48,7 @@ struct LogEntry {
 class I2_BASE_API Logger : public DynamicObject
 {
 public:
-       typedef shared_ptr<Logger> Ptr;
-       typedef weak_ptr<Logger> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Logger);
 
        explicit Logger(const Dictionary::Ptr& serializedUpdate);
 
index cff765b48f484c366358b85d14615871acc8fe26..018f02f30964e8fa7cc0639979bdbbf642d12ffb 100644 (file)
@@ -35,8 +35,7 @@ namespace icinga
 class I2_BASE_API NetworkStream : public Stream
 {
 public:
-       typedef shared_ptr<NetworkStream> Ptr;
-       typedef weak_ptr<NetworkStream> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(NetworkStream);
 
        NetworkStream(const Socket::Ptr& socket);
 
index 2fcf8d24097254731dfb3888a19f83c1541649fd..2fe2c37be304563cd9ad5dcb8b0b16c0adb7400d 100644 (file)
@@ -44,6 +44,10 @@ namespace icinga
 
 class Value;
 
+#define DECLARE_PTR_TYPEDEFS(klass) \
+       typedef shared_ptr<klass> Ptr; \
+       typedef weak_ptr<klass> WeakPtr
+
 /**
  * Base class for all heap-allocated objects. At least one of its methods
  * has to be virtual for RTTI to work.
@@ -53,8 +57,7 @@ class Value;
 class I2_BASE_API Object : public boost::enable_shared_from_this<Object>
 {
 public:
-       typedef shared_ptr<Object> Ptr;
-       typedef weak_ptr<Object> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Object);
 
        Object(void);
        virtual ~Object(void);
index 1587752a6fdce8213728c83961b34808d6d568a5..79513122fc9b8c8951ff183dca917c174fa1e101 100644 (file)
@@ -54,8 +54,7 @@ struct ProcessResult
 class I2_BASE_API Process : public Object
 {
 public:
-       typedef shared_ptr<Process> Ptr;
-       typedef weak_ptr<Process> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Process);
 
        static const std::deque<Process::Ptr>::size_type MaxTasksPerThread = 512;
 
index 200ffecdf4a9ba1662629abbf5b99cc14f0f05e1..bd0579f1f14514b249956010d7d5a9a34b281282 100644 (file)
@@ -35,8 +35,7 @@ namespace icinga
 class I2_BASE_API RingBuffer : public Object
 {
 public:
-       typedef shared_ptr<RingBuffer> Ptr;
-       typedef weak_ptr<RingBuffer> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(RingBuffer);
 
        typedef std::vector<int>::size_type SizeType;
 
index 7c359c7d0c0c242d8140ff07128f0a1a694859eb..e34d55d941bb0f63d0ec18b081c8dd7012280f6a 100644 (file)
@@ -36,8 +36,7 @@ class ScriptInterpreter;
 class I2_BASE_API Script : public DynamicObject
 {
 public:
-       typedef shared_ptr<Script> Ptr;
-       typedef weak_ptr<Script> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Script);
 
        Script(const Dictionary::Ptr& serializedUpdate);
 
index 3ad5184b67196ffb62d7aa1f1931da1ff26ea2e6..bc19a1fafcf97880a94cb6701b920e99290ad97d 100644 (file)
@@ -38,8 +38,7 @@ namespace icinga
 class I2_BASE_API ScriptFunction : public Object
 {
 public:
-       typedef shared_ptr<ScriptFunction> Ptr;
-       typedef weak_ptr<ScriptFunction> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(ScriptFunction);
 
        typedef boost::function<Value (const std::vector<Value>& arguments)> Callback;
 
index 29659907dd64c736923dd9594c2ac13d86b7af14..a7e92a6255f5b129632f102bf724219ea81de89e 100644 (file)
@@ -36,8 +36,7 @@ namespace icinga
 class I2_BASE_API ScriptInterpreter : public Object
 {
 public:
-       typedef shared_ptr<ScriptInterpreter> Ptr;
-       typedef weak_ptr<ScriptInterpreter> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(ScriptInterpreter);
 
        ~ScriptInterpreter(void);
 
index edf9ace1f5a3d56efc10173b50a46971e9e81916..b27b504ca0edfed968a6c4cb214d8c3b7a2be5dc 100644 (file)
@@ -35,8 +35,7 @@ namespace icinga
 class I2_BASE_API ScriptLanguage : public Object
 {
 public:
-       typedef shared_ptr<ScriptLanguage> Ptr;
-       typedef weak_ptr<ScriptLanguage> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(ScriptLanguage);
 
        static void Register(const String& name, const ScriptLanguage::Ptr& language);
        static void Unregister(const String& name);
index 94d6e9b26bc7cf0ee8cc767da255bd17e77aa685..d3218989e865e81527ba1171091edafdc91a8127 100644 (file)
@@ -37,8 +37,7 @@ namespace icinga {
 class I2_BASE_API Socket : public Object
 {
 public:
-       typedef shared_ptr<Socket> Ptr;
-       typedef weak_ptr<Socket> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Socket);
 
        Socket(void);
        Socket(SOCKET fd);
index 9e5b48b5af74f843574ea11b6ac73d4d00625ac3..f1b9079f52090f5b09ceb20f33b35e98b7718983 100644 (file)
@@ -29,8 +29,7 @@ namespace icinga {
 class StdioStream : public Stream
 {
 public:
-       typedef shared_ptr<StdioStream> Ptr;
-       typedef weak_ptr<StdioStream> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(StdioStream);
 
        StdioStream(std::iostream *innerStream, bool ownsStream);
        ~StdioStream(void);
index ce47d6ea145ee826f7e7dff5af835ebc4abfa8a1..3f0fa5e0ca09ef96bb9f70f183a10dbbca43dbfb 100644 (file)
@@ -48,8 +48,7 @@ struct ReadLineContext
 class I2_BASE_API Stream : public Object
 {
 public:
-       typedef shared_ptr<Stream> Ptr;
-       typedef weak_ptr<Stream> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Stream);
 
        /**
         * Reads data from the stream.
index 1a7766d6032c95213139c26e76178344f9814a1a..9d85c0e31e81c2606d407f0f492e81df0d7abb3c 100644 (file)
@@ -35,8 +35,7 @@ namespace icinga
 class I2_BASE_API StreamLogger : public Logger
 {
 public:
-       typedef shared_ptr<StreamLogger> Ptr;
-       typedef weak_ptr<StreamLogger> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(StreamLogger);
 
        StreamLogger(const Dictionary::Ptr& serializedUpdate);
        ~StreamLogger(void);
index 5d3860ec4eccc6d177af9f817a7a5687f0e32f1f..9a1bb0e009fd6000396df6e03c5991c74c16ccb5 100644 (file)
@@ -35,8 +35,7 @@ namespace icinga
 class I2_BASE_API SyslogLogger : public Logger
 {
 public:
-       typedef shared_ptr<SyslogLogger> Ptr;
-       typedef weak_ptr<SyslogLogger> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(SyslogLogger);
 
        explicit SyslogLogger(const Dictionary::Ptr& serializedUpdate);
 
index eee873016844a6f9bba252e5e0df4a85dd65e2c7..bc2a797222ea649baec5915d0dd94c222c8aff32 100644 (file)
@@ -34,8 +34,7 @@ namespace icinga
 class I2_BASE_API TcpSocket : public Socket
 {
 public:
-       typedef shared_ptr<TcpSocket> Ptr;
-       typedef weak_ptr<TcpSocket> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(TcpSocket);
 
        void Bind(const String& service, int family);
        void Bind(const String& node, const String& service, int family);
index fdf572fc6e6054d5f126ff999de6b1f2c8882fd5..5011ebf613517254cd6d519b6bd52c6ee11111ea 100644 (file)
@@ -36,8 +36,7 @@ struct TimerNextExtractor;
 class I2_BASE_API Timer : public Object
 {
 public:
-       typedef shared_ptr<Timer> Ptr;
-       typedef weak_ptr<Timer> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Timer);
 
        Timer(void);
 
index 5741bc985209c1c4c866dad5c6047c2c769a328f..cd59ed51e2a6b640f159af43595f55362ff3da15 100644 (file)
@@ -43,8 +43,7 @@ enum TlsRole
 class I2_BASE_API TlsStream : public Stream
 {
 public:
-       typedef shared_ptr<TlsStream> Ptr;
-       typedef weak_ptr<TlsStream> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(TlsStream);
 
        TlsStream(const Stream::Ptr& innerStream, TlsRole role, shared_ptr<SSL_CTX> sslContext);
 
index a828496999464456fd928768ccd694c46073629b..fff1e3a2554c7eb8c72dbfec212c76280ab5acc5 100644 (file)
@@ -30,8 +30,7 @@ namespace icinga
 class UnixSocket : public Socket
 {
 public:
-       typedef shared_ptr<UnixSocket> Ptr;
-       typedef weak_ptr<UnixSocket> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(UnixSocket);
 
        UnixSocket(void);
 
index 8b9e8a2622fe04575a8d2f2ec496931b5338a473..175544c8bd4e8f41fdc640dcc1670ecb3a34a5f0 100644 (file)
@@ -35,8 +35,7 @@ namespace icinga
  */
 class I2_CONFIG_API ConfigItem : public Object {
 public:
-       typedef shared_ptr<ConfigItem> Ptr;
-       typedef weak_ptr<ConfigItem> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(ConfigItem);
 
        ConfigItem(const String& type, const String& name, const String& unit,
            bool abstract, const ExpressionList::Ptr& exprl, const std::vector<String>& parents,
index 6b38ce6181d353c3b4ca4e7dc5a4f943a71c4e08..27ba051306db21d50227002aec4d7daf66d0558b 100644 (file)
@@ -38,8 +38,7 @@ namespace icinga
 class I2_CONFIG_API ConfigItemBuilder : public Object
 {
 public:
-       typedef shared_ptr<ConfigItemBuilder> Ptr;
-       typedef weak_ptr<ConfigItemBuilder> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(ConfigItemBuilder);
 
        ConfigItemBuilder(void);
        explicit ConfigItemBuilder(const DebugInfo& debugInfo);
index e1f132f10f1516e44f20e5bf492233e7ed1503d1..03dd9664cf7134db654b5ceb4ed8c3caf7f5ed8f 100644 (file)
@@ -36,8 +36,7 @@ namespace icinga
  */\r
 class I2_CONFIG_API ConfigType : public Object {\r
 public:\r
-       typedef shared_ptr<ConfigType> Ptr;\r
-       typedef weak_ptr<ConfigType> WeakPtr;\r
+       DECLARE_PTR_TYPEDEFS(ConfigType);\r
 \r
        ConfigType(const String& name, const DebugInfo& debuginfo);\r
 \r
index 5dc3c6190cef8c4be1ee10ef5652509c076a4b8c..b809bd6ef3e6a570b8a4a4a1742a0131be466342 100644 (file)
@@ -36,8 +36,7 @@ namespace icinga
 class I2_CONFIG_API ExpressionList : public Object
 {
 public:
-       typedef shared_ptr<ExpressionList> Ptr;
-       typedef weak_ptr<ExpressionList> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(ExpressionList);
 
        void AddExpression(const Expression& expression);
 
index 4bae5f5280daab80fddf65cac0f1762fbbe541e3..57e20a163f13df32f11e68fd45ce4899b089ec9f 100644 (file)
@@ -47,8 +47,7 @@ enum TypeValidationResult
 class I2_CONFIG_API TypeRuleList : public Object\r
 {\r
 public:\r
-       typedef shared_ptr<TypeRuleList> Ptr;\r
-       typedef weak_ptr<TypeRuleList> WeakPtr;\r
+       DECLARE_PTR_TYPEDEFS(TypeRuleList);\r
 \r
        void SetValidator(const String& validator);\r
        String GetValidator(void) const;\r
index 2df7db5c3c61be91d410a1b9896196550702a97b..4597ae2f8a42cc004f1e48e462ffee3acdadbe75 100644 (file)
@@ -34,8 +34,7 @@ namespace icinga
 class I2_BASE_API CheckCommand : public Command
 {
 public:
-       typedef shared_ptr<CheckCommand> Ptr;
-       typedef weak_ptr<CheckCommand> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(CheckCommand);
 
        explicit CheckCommand(const Dictionary::Ptr& serializedUpdate);
 
index cfa4a252adce29847c75891d4a87734bc2f1cecc..cd671888f408bfb5f6eac5cd9f288cccb6cdaf12 100644 (file)
@@ -38,8 +38,7 @@ namespace icinga
 class I2_BASE_API Command : public DynamicObject, public MacroResolver
 {
 public:
-       typedef shared_ptr<Command> Ptr;
-       typedef weak_ptr<Command> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Command);
 
        explicit Command(const Dictionary::Ptr& serializedUpdate);
 
index 0c2d6e0b8084fa401a21b2305341f3b2ff2f2669..db8f9890325c1619fd4672375771e4739c61f93c 100644 (file)
@@ -34,8 +34,7 @@ namespace icinga
 class I2_BASE_API EventCommand : public Command
 {
 public:
-       typedef shared_ptr<EventCommand> Ptr;
-       typedef weak_ptr<EventCommand> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(EventCommand);
 
        explicit EventCommand(const Dictionary::Ptr& serializedUpdate);
 
index 0b0ae8f11f68b32a3ea6086c277cfaf39d8e1917..954380ee16c1c338cd3ea47b40337a48aad5b917 100644 (file)
@@ -77,8 +77,7 @@ enum StateType
 class I2_ICINGA_API Host : public DynamicObject, public MacroResolver
 {
 public:
-       typedef shared_ptr<Host> Ptr;
-       typedef weak_ptr<Host> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Host);
 
        explicit Host(const Dictionary::Ptr& serializedUpdate);
        ~Host(void);
index 7399368ffc2b48119b7013d1c8af292e27b25396..dcfd4b5cbc386d1c52c9c29b7ae8068b4dc4039a 100644 (file)
@@ -36,8 +36,7 @@ namespace icinga
 class I2_ICINGA_API HostGroup : public DynamicObject
 {
 public:
-       typedef shared_ptr<HostGroup> Ptr;
-       typedef weak_ptr<HostGroup> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(HostGroup);
 
        explicit HostGroup(const Dictionary::Ptr& serializedUpdate);
        ~HostGroup(void);
index 1f8d547af1607cbc488066c735b2a3a172a0aa07..fee06816facd2eefb0d9f58ff4e338090baa5234 100644 (file)
@@ -36,8 +36,7 @@ namespace icinga
 class I2_ICINGA_API IcingaApplication : public Application, public MacroResolver
 {
 public:
-       typedef shared_ptr<IcingaApplication> Ptr;
-       typedef weak_ptr<IcingaApplication> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(IcingaApplication);
 
        explicit IcingaApplication(const Dictionary::Ptr& serializedUpdate);
 
index 5944c14227090f2a2475899e8ad501037444e9cf..de80031706f6f2b966280d4b30da6e58832cf715 100644 (file)
@@ -35,8 +35,7 @@ namespace icinga
 class I2_ICINGA_API MacroResolver
 {
 public:
-       typedef shared_ptr<MacroResolver> Ptr;
-       typedef weak_ptr<MacroResolver> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(MacroResolver);
 
        virtual bool ResolveMacro(const String& macro, const Dictionary::Ptr& cr, String *result) const = 0;
 };
@@ -44,8 +43,7 @@ public:
 class I2_ICINGA_API StaticMacroResolver : public Object, public MacroResolver
 {
 public:
-       typedef shared_ptr<StaticMacroResolver> Ptr;
-       typedef weak_ptr<StaticMacroResolver> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(StaticMacroResolver);
 
        StaticMacroResolver(void);
 
index fdf28094b70086e546c7a5266c153c793a862ab9..0a10d99235054290461034408d1ed164da0b5605 100644 (file)
@@ -58,8 +58,7 @@ class NotificationCommand;
 class I2_ICINGA_API Notification : public DynamicObject, public MacroResolver
 {
 public:
-       typedef shared_ptr<Notification> Ptr;
-       typedef weak_ptr<Notification> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Notification);
 
        explicit Notification(const Dictionary::Ptr& serializedUpdate);
        ~Notification(void);
index 41ed80d376d8d600096ca43fab37e21cfae2e0c2..150a73ebdee8ff2ea07047f25bb6ecec39d05f6a 100644 (file)
@@ -36,8 +36,7 @@ class Notification;
 class I2_BASE_API NotificationCommand : public Command
 {
 public:
-       typedef shared_ptr<NotificationCommand> Ptr;
-       typedef weak_ptr<NotificationCommand> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(NotificationCommand);
 
        explicit NotificationCommand(const Dictionary::Ptr& serializedUpdate);
 
index ea20eafd97a10c13d8e1626c01987ef0f6ed736a..cc5fd7532660099b350fd3827195ceabbacc40ec 100644 (file)
@@ -37,8 +37,7 @@ namespace icinga
 class I2_ICINGA_API PerfdataWriter : public DynamicObject
 {
 public:
-       typedef shared_ptr<PerfdataWriter> Ptr;
-       typedef weak_ptr<PerfdataWriter> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(PerfdataWriter);
 
        PerfdataWriter(const Dictionary::Ptr& properties);
 
index 4203037801bcfa6c03bb733fad22da1ec78e7c3f..4305321ace5dc9c3d5dbe7304a62a36c5a42df97 100644 (file)
@@ -96,8 +96,7 @@ class EventCommand;
 class I2_ICINGA_API Service : public DynamicObject, public MacroResolver
 {
 public:
-       typedef shared_ptr<Service> Ptr;
-       typedef weak_ptr<Service> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Service);
 
        explicit Service(const Dictionary::Ptr& serializedUpdate);
        ~Service(void);
index cec760ce9f5b573ee7bbe52e89cb379bd97e3688..18f6437f178a99dbdd3e94927d1ab41748ad2230 100644 (file)
@@ -36,8 +36,7 @@ namespace icinga
 class I2_ICINGA_API ServiceGroup : public DynamicObject
 {
 public:
-       typedef shared_ptr<ServiceGroup> Ptr;
-       typedef weak_ptr<ServiceGroup> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(ServiceGroup);
 
        explicit ServiceGroup(const Dictionary::Ptr& serializedUpdate);
        ~ServiceGroup(void);
index 9f4036b641d4939a0bf1bd1c6f74536138e8b654..36e7403db9f631e9c6a6710e03660c0b884eebe3 100644 (file)
@@ -35,8 +35,7 @@ namespace icinga
 class I2_ICINGA_API TimePeriod : public DynamicObject
 {
 public:
-       typedef shared_ptr<TimePeriod> Ptr;
-       typedef weak_ptr<TimePeriod> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(TimePeriod);
 
        explicit TimePeriod(const Dictionary::Ptr& serializedUpdate);
 
index cad26ad7a2c1f90d54e979568a20d869551ed1ba..6cf3bf19ee6a48ef698f5085567694396ffbdb37 100644 (file)
@@ -37,8 +37,7 @@ namespace icinga
 class I2_ICINGA_API User : public DynamicObject, public MacroResolver
 {
 public:
-       typedef shared_ptr<User> Ptr;
-       typedef weak_ptr<User> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(User);
 
        explicit User(const Dictionary::Ptr& serializedUpdate);
        ~User(void);
index 3447ae1b25478e835fee48af3cc81ce8a0db1533..549da006034dff457c6ffe7f0e808bc42fff9074 100644 (file)
@@ -35,8 +35,7 @@ namespace icinga
 class I2_ICINGA_API UserGroup : public DynamicObject
 {
 public:
-       typedef shared_ptr<UserGroup> Ptr;
-       typedef weak_ptr<UserGroup> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(UserGroup);
 
        explicit UserGroup(const Dictionary::Ptr& serializedUpdate);
        ~UserGroup(void);
index 15a8956e3d1409fb674f6daeb52bb79a41dfce28..1f23d487b9d84eb1ed9b6e14e30a936e3c46af08 100644 (file)
@@ -35,8 +35,7 @@ namespace icinga
 class PythonInterpreter : public ScriptInterpreter
 {
 public:
-       typedef shared_ptr<PythonInterpreter> Ptr;
-       typedef weak_ptr<PythonInterpreter> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(PythonInterpreter);
 
        PythonInterpreter(const PythonLanguage::Ptr& language, const Script::Ptr& script);
        ~PythonInterpreter(void);
index 89fcc5eb4d6025adbf6c04b7ea3bb38c076138bb..237caed3256cefa87fdc4fb85596c3f1e3a8a0a7 100644 (file)
@@ -36,8 +36,7 @@ class PythonInterpreter;
 class PythonLanguage : public ScriptLanguage
 {
 public:
-       typedef shared_ptr<PythonLanguage> Ptr;
-       typedef weak_ptr<PythonLanguage> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(PythonLanguage);
 
        PythonLanguage(void);
        ~PythonLanguage(void);
index c8e7eee6460da4d07a5a246d362324a07e8b088b..e813ef578d1cc0c29c29e2ab86179301e2bf46a6 100644 (file)
@@ -40,8 +40,7 @@ class EndpointManager;
 class I2_REMOTING_API Endpoint : public DynamicObject
 {
 public:
-       typedef shared_ptr<Endpoint> Ptr;
-       typedef weak_ptr<Endpoint> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(Endpoint);
 
        typedef void (Callback)(const Endpoint::Ptr&, const Endpoint::Ptr&, const RequestMessage&);
 
index c98c9265ed139459903f9bcfa4e2b60a80ebcf90..7de7385410c0d1018631904df7e3bfda2659bd37 100644 (file)
@@ -39,8 +39,7 @@ namespace icinga
 class I2_REMOTING_API EndpointManager : public Object
 {
 public:
-       typedef shared_ptr<EndpointManager> Ptr;
-       typedef weak_ptr<EndpointManager> WeakPtr;
+       DECLARE_PTR_TYPEDEFS(EndpointManager);
 
        EndpointManager(void);