Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
orxonox::PlayerTrigger Class Reference

PlayerTrigger is an interface if implemented by a specific trigger can be used to recover the Player (or the Pawn) that triggered it. More...

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

Inheritance diagram for orxonox::PlayerTrigger:
orxonox::OrxonoxInterface orxonox::Configurable orxonox::Destroyable orxonox::Listable orxonox::Identifiable orxonox::DistanceTrigger orxonox::MultiTriggerContainer orxonox::CheckPoint

Public Member Functions

 PlayerTrigger ()
 
virtual ~PlayerTrigger ()
 
PawngetTriggeringPawn (void) const
 Returns the Pawn that triggered the PlayerTrigger. More...
 
PlayerInfogetTriggeringPlayer (void) const
 Returns the player that triggered the PlayerTrigger. More...
 
bool isForPlayer (void) const
 Checks whether the PlayerTrigger normally returns a Pawn/PlayerInfo. 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...
 

Protected Member Functions

void setForPlayer (bool isForPlayer)
 Set whether the PlayerTrigger normally is triggered by Pawns. More...
 
void setTriggeringPawn (Pawn *pawn)
 Set the player that triggered the PlayerTrigger. More...
 
- 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...
 

Private Attributes

bool isForPlayer_
 Is true when the PlayerTrigger should be set to normally be triggered by Pawns. More...
 
WeakPtr< Pawnpawn_
 The Pawn that triggered the PlayerTrigger. More...
 
WeakPtr< PlayerInfoplayer_
 The player that triggered the PlayerTrigger. More...
 

Detailed Description

PlayerTrigger is an interface if implemented by a specific trigger can be used to recover the Player (or the Pawn) that triggered it.

Author
Damian 'Mozork' Frick

Constructor & Destructor Documentation

orxonox::PlayerTrigger::PlayerTrigger ( )
virtual orxonox::PlayerTrigger::~PlayerTrigger ( )
inlinevirtual

Member Function Documentation

Pawn* orxonox::PlayerTrigger::getTriggeringPawn ( void  ) const
inline

Returns the Pawn that triggered the PlayerTrigger.

Returns
Returns a pointer to the Pawn that triggered the PlayerTrigger.
PlayerInfo* orxonox::PlayerTrigger::getTriggeringPlayer ( void  ) const
inline

Returns the player that triggered the PlayerTrigger.

Returns
Returns a pointer to the PlayerInfo that triggered the PlayerTrigger.
bool orxonox::PlayerTrigger::isForPlayer ( void  ) const
inline

Checks whether the PlayerTrigger normally returns a Pawn/PlayerInfo.

Returns
Returns true if the PlayerTrigger normally returns a Pawn/PlayerInfo.
void orxonox::PlayerTrigger::setForPlayer ( bool  isForPlayer)
inlineprotected

Set whether the PlayerTrigger normally is triggered by Pawns.

Parameters
isForPlayerShould be true when the PlayerTrigger should be set to normally be triggered by Pawns, false if not.
void orxonox::PlayerTrigger::setTriggeringPawn ( Pawn pawn)
protected

Set the player that triggered the PlayerTrigger.

This is normally done by classes inheriting vom PlayerTrigger.

Parameters
pawnA pointer to the Pawn that triggered the PlayerTrigger.

Member Data Documentation

bool orxonox::PlayerTrigger::isForPlayer_
private

Is true when the PlayerTrigger should be set to normally be triggered by Pawns.

WeakPtr<Pawn> orxonox::PlayerTrigger::pawn_
private

The Pawn that triggered the PlayerTrigger.

WeakPtr<PlayerInfo> orxonox::PlayerTrigger::player_
private

The player that triggered the PlayerTrigger.


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