X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkObject.h;h=ac9a5b98003025f61f6b1be2b996633253c7b7c6;hb=d8041d1ef54a73acc2306557435f6b04edf60daf;hp=27ed132e5c90d23c9c842fe70535945bc53e86da;hpb=13304e56deca37fe54072b423bc1214687ec503a;p=bbtk.git diff --git a/kernel/src/bbtkObject.h b/kernel/src/bbtkObject.h index 27ed132..ac9a5b9 100644 --- a/kernel/src/bbtkObject.h +++ b/kernel/src/bbtkObject.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkObject.h,v $ Language: C++ - Date: $Date: 2008/04/24 11:49:59 $ - Version: $Revision: 1.3 $ + Date: $Date: 2008/05/06 13:45:12 $ + Version: $Revision: 1.4 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See doc/license.txt or @@ -24,6 +24,7 @@ #ifndef __bbtkObject_h__ #define __bbtkObject_h__ +#include #include #include #include @@ -32,7 +33,7 @@ namespace bbtk { // The top class of bbtk class hierarchy - class Object + class BBTK_EXPORT Object { public: typedef boost::shared_ptr Pointer; @@ -58,7 +59,7 @@ namespace bbtk static long GetObjectsCount() { return mgObjectList.size(); } /// Default objects deleter : removes object from list on deletion - struct Deleter + struct BBTK_EXPORT Deleter { Deleter() : mPointer() {} virtual void operator() (Object* p); @@ -159,6 +160,15 @@ protected: \ CLASS(const CLASS&); \ ~CLASS(); +#define BBTK_OBJECT_INTERFACE_NO_CONDES(CLASS) \ + BBTK_OBJECT_MINIMAL_INTERFACE_WITH_SELF(CLASS); \ +public: \ + std::string GetObjectName() const; \ + std::string GetObjectInfo() const ; \ + size_t GetObjectSize() const ; \ + size_t GetObjectInternalSize() const ; \ + size_t GetObjectRecursiveSize() const ; + #define BBTK_ABSTRACT_OBJECT_INTERFACE(CLASS) \ public : typedef CLASS Self; \ BBTK_OBJECT_MINIMAL_INTERFACE; \ @@ -170,15 +180,16 @@ protected: \ //======================================================================= // A struct with one static instance // just to print object list info after main - struct StaticInitTime + class BBTK_EXPORT StaticInitTime { + public: StaticInitTime(); ~StaticInitTime(); static bool PrintObjectListInfo; private: - static Object mObject; + static bbtk::Object mObject; };