Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Static Public Member Functions | List of all members
orxonox::PickupListener Class Reference

The PickupListener class facilitates the flow of information regarding the picking up, dropping, using and unusing of Pickupables to interested parties (such as the PickupManager). More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/orxonox/interfaces/PickupListener.h>

Inheritance diagram for orxonox::PickupListener:
orxonox::OrxonoxInterface orxonox::Configurable orxonox::Destroyable orxonox::Listable orxonox::Identifiable orxonox::PickupManager

Public Member Functions

 PickupListener ()
 Constructor. More...
 
virtual ~PickupListener ()
 Destructor. More...
 
virtual void pickupChangedPickedUp (Pickupable *pickup, bool pickedUp)
 Method that can be overloaded by any PickupListener to be notified of a change in the pickedUp status of a Pickupable. More...
 
virtual void pickupChangedUsed (Pickupable *pickup, bool used)
 Method that can be overloaded by any PickupListener to be notified of a change in the used status of a Pickupable. More...
 
- Public Member Functions inherited from orxonox::OrxonoxInterface
 OrxonoxInterface ()
 
- Public Member Functions inherited from orxonox::Configurable
 Configurable ()
 
void setConfigValues ()
 Function to collect the SetConfigValue-macro calls. More...
 
- Public Member Functions inherited from orxonox::Listable
 Listable ()
 Constructor: Allocates space in the element list. More...
 
 Listable (Context *context)
 Constructor: Allocates space in the element list and assigns the context. More...
 
virtual ~Listable ()
 Destructor: Removes the object from the object-lists. More...
 
ContextgetContext () const
 
void setContext (Context *context)
 Changes the context. More...
 
void unregisterObject ()
 Removes this object from the object-lists. More...
 
- Public Member Functions inherited from orxonox::Identifiable
 Identifiable ()
 Constructor: Sets the default values. More...
 
virtual ~Identifiable ()
 
ORX_FORCEINLINE voidgetDerivedPointer (unsigned int classID)
 Returns a valid pointer of any derived type that is registered in the class hierarchy. More...
 
template<class T >
ORX_FORCEINLINE T * getDerivedPointer (unsigned int classID)
 Version of getDerivedPointer with template. More...
 
template<class T >
ORX_FORCEINLINE const T * getDerivedPointer (unsigned int classID) const
 Const version of getDerivedPointer with template. More...
 
IdentifiergetIdentifier () const
 Returns the Identifier of the object. More...
 
bool isA (const Identifier *identifier)
 Returns true if the object's class is of the given type or a derivative. More...
 
template<class B >
bool isA (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is of the given type or a derivative. More...
 
bool isA (const Identifiable *object)
 Returns true if the object's class is of the given type or a derivative. More...
 
bool isChildOf (const Identifier *identifier)
 Returns true if the object's class is a child of the given type. More...
 
template<class B >
bool isChildOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a child of the given type. More...
 
bool isChildOf (const Identifiable *object)
 Returns true if the object's class is a child of the given type. More...
 
bool isDirectChildOf (const Identifier *identifier)
 Returns true if the object's class is a direct child of the given type. More...
 
template<class B >
bool isDirectChildOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a direct child of the given type. More...
 
bool isDirectChildOf (const Identifiable *object)
 Returns true if the object's class is a direct child of the given type. More...
 
bool isDirectParentOf (const Identifier *identifier)
 Returns true if the object's class is a direct parent of the given type. More...
 
template<class B >
bool isDirectParentOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a direct parent of the given type. More...
 
bool isDirectParentOf (const Identifiable *object)
 Returns true if the object's class is a direct child of the given type. More...
 
bool isExactlyA (const Identifier *identifier)
 Returns true if the object's class is exactly of the given type. More...
 
template<class B >
bool isExactlyA (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is exactly of the given type. More...
 
bool isExactlyA (const Identifiable *object)
 Returns true if the object's class is exactly of the given type. More...
 
bool isParentOf (const Identifier *identifier)
 Returns true if the object's class is a parent of the given type. More...
 
template<class B >
bool isParentOf (const SubclassIdentifier< B > *identifier)
 Returns true if the object's class is a parent of the given type. More...
 
bool isParentOf (const Identifiable *object)
 Returns true if the object's class is a parent of the given type. More...
 
- Public Member Functions inherited from orxonox::Destroyable
 Destroyable ()
 Constructor: Sets the default values. More...
 
virtual ~Destroyable ()
 Destructor: Notifies all DestructionListener (for example weak pointers) that this object is being deleted. More...
 
void destroy ()
 Deletes the object if no strong pointers point to this object. More...
 
void destroyLater ()
 Works like destroy() but doesn't destroy the object until the current tick has ended. More...
 
unsigned int getReferenceCount () const
 Returns the number of strong pointers that point to this object. More...
 

Static Public Member Functions

static void broadcastPickupChangedPickedUp (Pickupable *pickup, bool pickedUp)
 Static method that is used to notify the PickupListener itself of the change in the pickedUp status of a Pickupable. More...
 
static void broadcastPickupChangedUsed (Pickupable *pickup, bool used)
 Static method that is used to notify the PickupListener itself of the change in the used status of a Pickupable. More...
 

Additional Inherited Members

- Protected Member Functions inherited from orxonox::Destroyable
virtual void preDestroy ()
 This virtual function is called if destroy() is called and no StrongPtr points to this object. More...
 

Detailed Description

The PickupListener class facilitates the flow of information regarding the picking up, dropping, using and unusing of Pickupables to interested parties (such as the PickupManager).

All you need to to do be notified is to inherit from PickupListener and implement the two methods pickupChangedUsed() and pickupChangedPickedUp().

Author
Damian 'Mozork' Frick

Constructor & Destructor Documentation

orxonox::PickupListener::PickupListener ( )

Constructor.

Registers the object.

orxonox::PickupListener::~PickupListener ( )
virtual

Destructor.

Member Function Documentation

void orxonox::PickupListener::broadcastPickupChangedPickedUp ( Pickupable pickup,
bool  pickedUp 
)
static

Static method that is used to notify the PickupListener itself of the change in the pickedUp status of a Pickupable.

This is called in Pickupable.

Parameters
pickupThe Pickupable that has changed its pickedUp status.
pickedUpThse value the status has changed to.
void orxonox::PickupListener::broadcastPickupChangedUsed ( Pickupable pickup,
bool  used 
)
static

Static method that is used to notify the PickupListener itself of the change in the used status of a Pickupable.

This is called in Pickupable.

Parameters
pickupThe Pickupable that has changed its used status.
usedThse value the status has changed to.
virtual void orxonox::PickupListener::pickupChangedPickedUp ( Pickupable pickup,
bool  pickedUp 
)
inlinevirtual

Method that can be overloaded by any PickupListener to be notified of a change in the pickedUp status of a Pickupable.

Parameters
pickupThe Pickupable, whose pickedUp status has changed.
pickedUpThe value the pickedUp status has changed to.

Reimplemented in orxonox::PickupManager.

virtual void orxonox::PickupListener::pickupChangedUsed ( Pickupable pickup,
bool  used 
)
inlinevirtual

Method that can be overloaded by any PickupListener to be notified of a change in the used status of a Pickupable.

Parameters
pickupThe Pickupable, whose used status has changed.
usedThe value the used status has changed to.

Reimplemented in orxonox::PickupManager.


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