## Public API Reference

- Main Page
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iQuestFactory Struct Reference

A quest factory. More...

`#include <tools/questmanager.h>`

List of all members.

## Public Member Functions

virtual csPtr< iQuest > | CreateQuest (const celQuestParams &params)=0
| Instantiate a quest from this factory.
virtual iQuestSequenceFactory * | CreateSequence (const char *name)=0
| Create a new sequence factory in this factory.
virtual iQuestStateFactory * | CreateState (const char *name)=0
| Create a new state in this factory.
virtual const char * | GetName () const =0
| Get the name of this factory.
virtual iQuestSequenceFactory * | GetSequence (const char *name)=0
| Get a sequence factory in this factory.
virtual iQuestStateFactory * | GetState (const char *name)=0
| Get a state from this factory.
virtual bool | Load (iDocumentNode *node)=0
| Load this factory from a document node.

## Detailed Description

A quest factory.

A quest factory is a template to create a quest from. All interfaces ending with 'Factory' are relevant in the concept of a quest factory.

- A quest factory is made out of a number of quest state factories (iQuestStateFactory) (from which the states in the quest are made).
- Every quest state factory has one or more trigger response factories. These response factories describe how the firing of one trigger (as described by a trigger factory) can cause a number of rewards (as described by reward factories).

Definition at line 550 of file questmanager.h.

## Member Function Documentation

virtual csPtr<iQuest> iQuestFactory::CreateQuest | ( | const celQuestParams & | params | ) | `[pure virtual]`

Instantiate a quest from this factory.

This instance will have the same structure as this factory but it will be made out of non-factory objects (iQuestTrigger, iQuestReward, ...).

Parameters:

  | params | are the parameters with which this quest is instantiated.

virtual iQuestSequenceFactory* iQuestFactory::CreateSequence | ( | const char * | name | ) | `[pure virtual]`

| Create a new sequence factory in this factory. Return 0 on failure (name already exists).

virtual iQuestStateFactory* iQuestFactory::CreateState | ( | const char * | name | ) | `[pure virtual]`

| Create a new state in this factory. Return 0 on failure (name already exists).

virtual const char* iQuestFactory::GetName | ( |  | ) | const`[pure virtual]`

| Get the name of this factory.

virtual iQuestSequenceFactory* iQuestFactory::GetSequence | ( | const char * | name | ) | `[pure virtual]`

| Get a sequence factory in this factory. Return 0 if the factory doesn't exist.

virtual iQuestStateFactory* iQuestFactory::GetState | ( | const char * | name | ) | `[pure virtual]`

| Get a state from this factory. Return 0 if the state doesn't exist.

virtual bool iQuestFactory::Load | ( | iDocumentNode * | node | ) | `[pure virtual]`

Load this factory from a document node.

Parameters:

  | node | is the <quest> node.

Returns:
  false on error (reporter is used to report).

The documentation for this struct was generated from the following file:

- tools/questmanager.h