orxonox::AddQuestHint Class Reference

Adds a QuestHint, resp. activates the QuestHint of the given id for the player the QuestEffect is invoked on. More...

#include <src/orxonox/objects/quest/AddQuestHint.h>

Inheritance diagram for orxonox::AddQuestHint:

orxonox::QuestEffect orxonox::BaseObject orxonox::OrxonoxClass

List of all members.

Public Member Functions

 AddQuestHint (BaseObject *creator)
 Constructor. Registers the object.
virtual bool invoke (PlayerInfo *player)
 Invokes the QuestEffect.
virtual void XMLPort (Element &xmlelement, XMLPort::Mode mode)
 Method for creating a AddQuestHint object through XML.
virtual ~AddQuestHint ()
 Destructor.

Private Member Functions

const std::stringgetHintId (void) const
 Returns the id of the QuestHint.
bool setHintId (const std::string &id)
 Sets the id of the QuestHint.

Private Attributes

std::string hintId_
 The id of the QuestHint.


Detailed Description

Adds a QuestHint, resp. activates the QuestHint of the given id for the player the QuestEffect is invoked on.

Creating a AddQuestHint through XML goes as follows:

<AddQuestHint hintid="id"> //Where id is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information, and identifies the QuestHint that should be added.

Author:
Damian 'Mozork' Frick

Constructor & Destructor Documentation

orxonox::AddQuestHint::AddQuestHint ( BaseObject creator  ) 

Constructor. Registers the object.

References RegisterObject.

orxonox::AddQuestHint::~AddQuestHint (  )  [virtual]

Destructor.


Member Function Documentation

const std::string& orxonox::AddQuestHint::getHintId ( void   )  const [inline, private]

Returns the id of the QuestHint.

Returns:
Returns the id of the QuestHint.

Referenced by invoke(), and XMLPort().

bool orxonox::AddQuestHint::invoke ( PlayerInfo player  )  [virtual]

Invokes the QuestEffect.

Parameters:
player The player.
Returns:
Returns true if the QuestEffect was successfully invoked.

< NULL-pointers are evil!

Implements orxonox::QuestEffect.

References COUT, orxonox::QuestManager::findHint(), orxonox::Exception::getFullDescription(), getHintId(), orxonox::QuestManager::getInstance(), hintId_, and orxonox::QuestHint::setActive().

bool orxonox::AddQuestHint::setHintId ( const std::string id  )  [private]

Sets the id of the QuestHint.

Sets the id of the QuestHint to be added to the player the QuestEffect is invoked on.

Parameters:
id The QuestHint id.
Returns true if successful.

References COUT, hintId_, and orxonox::QuestItem::isId().

Referenced by XMLPort().

void orxonox::AddQuestHint::XMLPort ( Element &  xmlelement,
XMLPort::Mode  mode 
) [virtual]

Method for creating a AddQuestHint object through XML.

Reimplemented from orxonox::BaseObject.

References COUT, getHintId(), setHintId(), SUPER, and XMLPortParam.


Member Data Documentation

The id of the QuestHint.

Referenced by invoke(), and setHintId().


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

Generated on Tue Jul 28 16:22:20 2009 for Orxonox by  doxygen 1.5.6