mkRPG
Public Member Functions | Protected Member Functions | Protected Attributes
InheritableObject Class Reference

The InheritableObject class is the base class for every objects that can inherit attributes from an other InheritableObject. More...

#include <gameobject.h>

Inheritance diagram for InheritableObject:
GameObject GameObjectType TypedObject< T > TypedObject< CellType > TypedObject< EntityType > TypedObject< MapType > TypedObject< ObjectType > Type< T > Type< CellType > Type< EntityType > Type< MapType > Type< ObjectType > Cell Entity Map Object

Public Member Functions

bool hasAncestor () const
InheritableObjectancestor ()
virtual bool isInheritedParam (const QString &param) const
virtual bool isRedefiniedParam (const QString &param) const
virtual int getParamMin (const QString &param) const
virtual int getParamMax (const QString &param) const
virtual void setParam (const QString &param, int value)
virtual int getParam (const QString &param) const
virtual bool hasParam (const QString &param) const
virtual QList< QString > params () const
virtual QList< QString > properParams () const
HierarchicalAttr paramTree () const
virtual bool isInheritedFlag (const QString &flag) const
virtual bool isRedefiniedFlag (const QString &flag) const
virtual bool getFlag (const QString &flag) const
virtual bool hasFlag (const QString &flag) const
virtual QList< QString > flags () const
virtual QList< QString > properFlags () const
HierarchicalAttr flagTree () const
virtual bool isInheritedEvent (const QString &event) const
virtual bool hasEvent (const QString &event) const
virtual EventgetEvent (const QString &event) const
virtual QList< QString > events () const
virtual QList< QString > properEvents () const
HierarchicalAttr eventTree () const
virtual bool isInheritedOrder (const QString &order) const
virtual bool hasOrder (const QString &order) const
virtual OrdergetOrder (const QString &order) const
virtual QList< QString > orders () const
virtual QList< QString > properOrders () const
HierarchicalAttr orderTree () const

Protected Member Functions

 InheritableObject (GameObject &parent, InheritableObject *ancestor=nullptr)

Protected Attributes

InheritableObjectaAncestor

Detailed Description

The InheritableObject class is the base class for every objects that can inherit attributes from an other InheritableObject.

Note:
The ancerstor of the object can be modified after instanciation.

It is the base class of Type and TypedObject.

See also:
Type, TypedObject

Member Function Documentation

Returns the object from with the current instance inherits

See also:
hasAncestor
QList< QString > InheritableObject::events ( ) const [virtual]

Returns the list of the events of the object, both proper and inherited.

See also:
properEvents, eventTree, params, flags, orders

Reimplemented from GameObject.

Returns the hierarchy of event, that is the list of ancestors and which event they define.

See also:
events, properEvents, paramTree, flagTree, orderTree
QList< QString > InheritableObject::flags ( ) const [virtual]

Returns the list of the flags of the object, both proper and inherited.

See also:
properFlags, flagTree, params, events, orders

Reimplemented from GameObject.

Returns the hierarchy of flags, that is the list of ancestors and which flags they define.

See also:
flags, properFlags, paramTree, eventTree, orderTree
Event & InheritableObject::getEvent ( const QString &  event) const [virtual]

Returns the event event, loocking for it in the different ancestors if not found.

See also:
hasEvent, GameObject::getEvent, getParam, getFlag, getOrder

Reimplemented from GameObject.

bool InheritableObject::getFlag ( const QString &  flag) const [virtual]

Returns the value of the flag flag, loocking for it in the different ancestors if not found.

See also:
hasEvent, GameObject::getEvent, getParam, getEvent, getOrder

Reimplemented from GameObject.

Order & InheritableObject::getOrder ( const QString &  order) const [virtual]

Returns the order order, loocking for it in the different ancestors if not found.

See also:
hasOrder, GameObject::getEvent, getParam, getFlag, getEvent

Reimplemented from GameObject.

int InheritableObject::getParam ( const QString &  param) const [virtual]

Returns the value of the param parameter, loocking for it in the different ancestors if not found.

See also:
hasEvent, GameObject::getEvent, getFlag, getEvent, getOrder

Reimplemented from GameObject.

int InheritableObject::getParamMax ( const QString &  param) const [virtual]

Returns the upeer bound of the param parameter if it exists (or is inherited).

Note:
If the param param is not defined, a default value is returned (100).
See also:
getParamMax

Reimplemented from GameObject.

int InheritableObject::getParamMin ( const QString &  param) const [virtual]

Returns the lower bound of the param parameter if it exists (or is inherited).

Note:
If the param param is not defined, a default value is returned (0).
See also:
getParamMax

Reimplemented from GameObject.

Returns true if the object inherits from an other one.

See also:
ancestor
bool InheritableObject::hasEvent ( const QString &  event) const [virtual]

Returns true if the event event is defined in the object or one of its ancestors.

See also:
getEvent, GameObject::hasEvent, hasParam, hasFlag, hasOrder

Reimplemented from GameObject.

bool InheritableObject::hasFlag ( const QString &  flag) const [virtual]

Returns true if the flag flag is defined in the object or one of its ancestors.

See also:
getFlag, GameObject::hasFlag, hasParam, hasEvent, hasOrder

Reimplemented from GameObject.

bool InheritableObject::hasOrder ( const QString &  order) const [virtual]

Returns true if the order order is defined in the object or one of its ancestors.

See also:
getOrder, GameObject::hasOrder, hasParam, hasFlag, hasEvent

Reimplemented from GameObject.

bool InheritableObject::hasParam ( const QString &  param) const [virtual]

Returns true if the param parameter is defined in the object or one of its ancestors.

See also:
getParam, GameObject::hasParam, hasFlag, hasEvent, hasOrder

Reimplemented from GameObject.

bool InheritableObject::isInheritedEvent ( const QString &  event) const [virtual]

Returns true if the event event is define in one of the ancestors of the object.

See also:
isInheritedParam, isInheritedFlag, isInheritedOrder
bool InheritableObject::isInheritedFlag ( const QString &  flag) const [virtual]

Returns true if the flag flag is define in one of the ancestors of the object.

See also:
isRedefiniedFlag, isInheritedParam isInheritedEvent, isInheritedOrder
bool InheritableObject::isInheritedOrder ( const QString &  order) const [virtual]

Returns true if the order order is define in one of the ancestors of the object.

See also:
isInheritedParam, isInheritedFlag isInheritedEvent
bool InheritableObject::isInheritedParam ( const QString &  param) const [virtual]

Returns true if the param parameter is define in one of the ancestors of the object.

See also:
isRedefiniedParam, isInheritedFlag isInheritedEvent, isInheritedOrder
bool InheritableObject::isRedefiniedFlag ( const QString &  flag) const [virtual]

Returns true if the flag flag is an inherited flag with a object proper value.

See also:
isInheritedFlag, isRedefiniedParam
bool InheritableObject::isRedefiniedParam ( const QString &  param) const [virtual]

Returns true if the param parameter is an inherited parameter with a object proper value.

See also:
isInheritedParam, isRedefiniedFlag
QList< QString > InheritableObject::orders ( ) const [virtual]

Returns the list of the orders of the object, both proper and inherited.

See also:
properOrders, orderTree, params, flags, events

Reimplemented from GameObject.

Returns the hierarchy of orders, that is the list of ancestors and which orders they define.

See also:
orders, properOrders, paramTree, flagTree, eventTree
QList< QString > InheritableObject::params ( ) const [virtual]

Returns the list of the parameters of the object, both proper and inherited.

See also:
properParams, paramTree, flags, events, orders

Reimplemented from GameObject.

Returns the hierarchy of parameters, that is the list of ancestors and which parameters they define.

See also:
params, properParams, flagTree, eventTree, orderTree
QList< QString > InheritableObject::properEvents ( ) const [virtual]

Returns the list of the events that are only defined in the object (the uninherited events)

See also:
events, eventTree, properParams, properFlags, properOrders
QList< QString > InheritableObject::properFlags ( ) const [virtual]

Returns the list of the flags that are only defined in the object (the uninherited flags)

See also:
flags, flagTree, properParams, properEvents, properOrders
QList< QString > InheritableObject::properOrders ( ) const [virtual]

Returns the list of the orders that are only defined in the object (the uninherited orders)

See also:
orders, orderTree, properParams, properFlags, properEvents
QList< QString > InheritableObject::properParams ( ) const [virtual]

Returns the list of the parameters that are only defined in the object (the uninherited parameters)

See also:
params, paramTree, properFlags, properEvents, properOrders
void InheritableObject::setParam ( const QString &  param,
int  value 
) [virtual]

Reimplemented function.

See also:
GameObject::setParam

Reimplemented from GameObject.


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Defines