CEL: Crystal Entity Layer: iQuestFactory Struct Reference (CEL: Crystal Entity Layer Public API Reference)

| ## 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 void | ClearDefaultParameters ()=0
| Clear all default parameters on this factory.
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 * | GetDefaultParameter (const char *name) const =0
| Get a default parameter from 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.
virtual void | SetDefaultParameter (const char *name, const char *value)=0
| Set a default parameter on this factory.

## 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 547 of file questmanager.h.

## Member Function Documentation

virtual void iQuestFactory::ClearDefaultParameters | ( |  | ) | `[pure virtual]`

Clear all default parameters on this factory.

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::GetDefaultParameter | ( | const char * | name | ) | const`[pure virtual]`

Get a default parameter from this factory.

Return 0 if the parameter does not exist.

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).

virtual void iQuestFactory::SetDefaultParameter | ( | const char * | name,
|  | const char * | value |
| ) |  |  | `[pure virtual]`

Set a default parameter on this factory.

If the parameter exists it will be overwritten.

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

- tools/questmanager.h