OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ak::aObject Class Reference

This class is used to store the main information of any object used Information contained is the UID and the reference counter. More...

#include "aObject.h"

Inheritance diagram for ak::aObject:
KeyboardCommandHandler ak::aAction ak::aTimer ak::aTreeWidgetItem ak::aTtbContainer ak::aWidget ak::aWindow ak::aWindowManager

Public Member Functions

 aObject (objectType _type=otNone, UID _UID=ak::invalidUID)
 Constructor.
 
 aObject (const aObject &_other)
 Copy constructor.
 
aObjectoperator= (const aObject &_other)
 Assignment operator.
 
virtual ~aObject ()
 Deconstructor.
 
virtual void removeChildObject (aObject *_child)
 Will remove the child from this object (not destroy it) This function should be called from the deconstructor of a child.
 
virtual void addChildObject (aObject *_child)
 Will add the child to this object.
 
void setUniqueName (const QString &_name)
 Will set this objects unique name.
 
virtual void setParentObject (aObject *_parentObject)
 Will set the parent object of this object.
 
QString uniqueName (void) const
 Will return the unique name of this object.
 
aObjectparentObject (void) const
 Will return a pointer to the parent object.
 
int childObjectCount (void) const
 Will return the count of sub objects.
 
aObjectchildObject (UID _childUID)
 Will return the child with the specified UID.
 
void setOwner (aObject *_object)
 Will set the owner of this object.
 
aObjectowner (void) const
 Will return the owner of this object.
 
void setUid (UID _UID)
 Will set the objects UID.
 
UID uid (void) const
 Returns the objects UID.
 
objectType type (void) const
 Returns the objects type.
 
virtual bool isWidgetType (void) const
 Returns true if the object is an object derived from aWidget.
 

Protected Attributes

UID m_uid
 
int m_references
 The objects UID.
 
objectType m_objectType
 The objects references.
 
QString m_uniqueName
 The object type of this object.
 
aObjectm_parentObject
 
aObjectm_owner
 
std::map< UID, aObject * > m_childObjects
 

Detailed Description

This class is used to store the main information of any object used Information contained is the UID and the reference counter.

Constructor & Destructor Documentation

◆ aObject() [1/2]

ak::aObject::aObject ( objectType _type = otNone,
UID _UID = ak::invalidUID )

Constructor.

Parameters
_UIDThe initial UID of this object
_referencesThe initial reference count for this object

◆ aObject() [2/2]

ak::aObject::aObject ( const aObject & _other)

Copy constructor.

Parameters
_otherThe other object

◆ ~aObject()

ak::aObject::~aObject ( )
virtual

Deconstructor.

Member Function Documentation

◆ addChildObject()

void ak::aObject::addChildObject ( aObject * _child)
virtual

Will add the child to this object.

Parameters
_childThe child to add

◆ childObject()

ak::aObject * ak::aObject::childObject ( UID _childUID)

Will return the child with the specified UID.

Parameters
_childUIDThe UID of the child object

◆ childObjectCount()

int ak::aObject::childObjectCount ( void ) const

Will return the count of sub objects.

◆ isWidgetType()

bool ak::aObject::isWidgetType ( void ) const
virtual

Returns true if the object is an object derived from aWidget.

Reimplemented in ak::aWidget.

◆ operator=()

ak::aObject & ak::aObject::operator= ( const aObject & _other)

Assignment operator.

Parameters
_otherThe other object

◆ owner()

ak::aObject * ak::aObject::owner ( void ) const

Will return the owner of this object.

◆ parentObject()

ak::aObject * ak::aObject::parentObject ( void ) const

Will return a pointer to the parent object.

◆ removeChildObject()

void ak::aObject::removeChildObject ( aObject * _child)
virtual

Will remove the child from this object (not destroy it) This function should be called from the deconstructor of a child.

Parameters
_childThe child to remove

Reimplemented in ak::aTtbGroup, ak::aTtbPage, ak::aTtbSubGroup, and ak::aWindowManager.

◆ setOwner()

void ak::aObject::setOwner ( aObject * _object)

Will set the owner of this object.

Parameters
_objectThe to set as owner

◆ setParentObject()

void ak::aObject::setParentObject ( aObject * _parentObject)
virtual

Will set the parent object of this object.

◆ setUid()

void ak::aObject::setUid ( UID _UID)

Will set the objects UID.

◆ setUniqueName()

void ak::aObject::setUniqueName ( const QString & _name)
inline

Will set this objects unique name.

Parameters
_nameThe name of this object

◆ type()

ak::objectType ak::aObject::type ( void ) const

Returns the objects type.

◆ uid()

ak::UID ak::aObject::uid ( void ) const

Returns the objects UID.

◆ uniqueName()

QString ak::aObject::uniqueName ( void ) const
inline

Will return the unique name of this object.

Member Data Documentation

◆ m_childObjects

std::map<UID, aObject *> ak::aObject::m_childObjects
protected

◆ m_objectType

objectType ak::aObject::m_objectType
protected

The objects references.

◆ m_owner

aObject* ak::aObject::m_owner
protected

◆ m_parentObject

aObject* ak::aObject::m_parentObject
protected

◆ m_references

int ak::aObject::m_references
protected

The objects UID.

◆ m_uid

UID ak::aObject::m_uid
protected

◆ m_uniqueName

QString ak::aObject::m_uniqueName
protected

The object type of this object.


The documentation for this class was generated from the following files: