orxonox::ChangeQuestStatus Class Reference

A QuestEffect which changes the status of a specified Quest for the player invoking the QuestEffect. More...

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

Inheritance diagram for orxonox::ChangeQuestStatus:

orxonox::QuestEffect orxonox::BaseObject orxonox::OrxonoxClass orxonox::AddQuest orxonox::CompleteQuest orxonox::FailQuest

List of all members.

Public Member Functions

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

Protected Member Functions

const std::stringgetQuestId (void) const
 Returns the id of the Quest.

Private Member Functions

bool setQuestId (const std::string &id)
 Sets the id of the Quest.

Private Attributes

std::string questId_
 The id of the Quest the status should be changed of.


Detailed Description

A QuestEffect which changes the status of a specified Quest for the player invoking the QuestEffect.

Author:
Damian 'Mozork' Frick

Constructor & Destructor Documentation

orxonox::ChangeQuestStatus::ChangeQuestStatus ( BaseObject creator  ) 

Constructor. Registers the object.

References RegisterObject.

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

Destructor.


Member Function Documentation

const std::string& orxonox::ChangeQuestStatus::getQuestId ( void   )  const [inline, protected]

virtual bool orxonox::ChangeQuestStatus::invoke ( PlayerInfo player  )  [pure virtual]

bool orxonox::ChangeQuestStatus::setQuestId ( const std::string id  )  [private]

Sets the id of the Quest.

Sets the id of the Quest the Questffect changes the status of.

Parameters:
id The id of the Quest.
Returns:
Returns true if successful.

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

Referenced by XMLPort().

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

Method for creating a ChangeQuestStatus object through XML.

Reimplemented from orxonox::BaseObject.

Reimplemented in orxonox::AddQuest, orxonox::CompleteQuest, and orxonox::FailQuest.

References getQuestId(), setQuestId(), SUPER, and XMLPortParam.


Member Data Documentation

The id of the Quest the status should be changed of.

Referenced by setQuestId().


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

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