Orxonox: orxonox::ChangeQuestStatus Class Reference

# 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:

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::string & | getQuestId (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]`

Returns the id of the Quest.

Returns:
  Returns the id of the Quest.

Referenced by orxonox::FailQuest::invoke(), orxonox::CompleteQuest::invoke(), orxonox::AddQuest::invoke(), orxonox::FailQuest::XMLPort(), orxonox::CompleteQuest::XMLPort(), XMLPort(), and orxonox::AddQuest::XMLPort().

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

Invokes the QuestEffect.

Implements orxonox::QuestEffect.

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

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

std::string orxonox::ChangeQuestStatus::questId_`[private]`

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:

- src/orxonox/objects/quest/ChangeQuestStatus.h
- src/orxonox/objects/quest/ChangeQuestStatus.cc