Program: bbtk
Module: $RCSfile: bbtkObject.h,v $
Language: C++
- Date: $Date: 2008/04/22 08:29:09 $
- Version: $Revision: 1.2 $
+ 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
#ifndef __bbtkObject_h__
#define __bbtkObject_h__
+#include <bbtkSystem.h>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <set>
{
// The top class of bbtk class hierarchy
- class Object
+ class BBTK_EXPORT Object
{
public:
typedef boost::shared_ptr<Object> Pointer;
static void PrintObjectListInfo(const std::string& name);
// static void PrintObjectInfo(const std::string& name);
static void PrintObjectInfo(const Pointer& o);
+
+ 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);
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; \
//=======================================================================
// 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;
};