17 #ifndef BERRYOBJECT_H_
18 #define BERRYOBJECT_H_
34 #pragma warning( disable : 4250 4275 4251 )
36 #pragma warning( disable : 4290 )
53 Indent(
int ind = 0) { m_Indent=ind; }
93 static const char* GetStaticClassName();
99 static QList<Reflection::TypeInfo> GetStaticSuperclasses();
105 virtual void Delete();
110 void*
operator new(size_t);
111 void*
operator new[](size_t);
112 void operator delete(
void*);
113 void operator delete[](
void*, size_t);
128 virtual QString ToString()
const;
133 virtual uint HashCode()
const;
139 virtual bool operator<(
const Object*)
const;
142 void Register()
const;
147 void UnRegister(
bool del =
true)
const;
152 return m_ReferenceCount.load();
157 void SetReferenceCount(
int);
160 { m_DestroyMessage += delegate; }
162 { m_DestroyMessage -= delegate; }
171 #ifdef BLUEBERRY_DEBUG_SMARTPOINTER
172 unsigned int GetTraceId()
const;
174 unsigned int m_TraceId;
175 unsigned int& GetTraceIdCounter()
const;
192 virtual QDebug PrintSelf(QDebug os,
Indent indent)
const;
193 virtual QDebug PrintHeader(QDebug os,
Indent indent)
const;
194 virtual QDebug PrintTrailer(QDebug os,
Indent indent)
const;
205 void operator=(
const Self&);
219 if (obj ==
nullptr)
return;
berry::SmartPointer< const Self > ConstPointer
org_blueberry_core_runtime_EXPORT QDebug operator<<(QDebug os, const berry::Object &o)
void UnRegister(bool del=true) const
Light weight base class for most BlueBerry classes.
org_blueberry_core_runtime_EXPORT uint qHash(const berry::Object &o)
berry::WeakPointer< const Self > ConstWeakPtr
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
#define org_blueberry_core_runtime_EXPORT
int GetReferenceCount() const
berry::SmartPointer< Self > Pointer
void AddDestroyListener(const MessageAbstractDelegate<> &delegate) const
static void cleanup(Object *obj)
QAtomicInt m_ReferenceCount
berry::WeakPointer< Self > WeakPtr
Event/message/notification class.
QDebug operator<<(QDebug os, const berry::Indent &ind)
QMutex m_ReferenceCountLock
QList< TypeInfo > GetSuperclasses()
virtual const char * GetClassName() const
void RemoveDestroyListener(const MessageAbstractDelegate<> &delegate) const