Planeshift
psQuestPrereqOpVariable Class Reference

Variable set prerequisite operator. More...

#include <psquestprereqops.h>

Public Member Functions

virtual bool Check (psCharacter *character)
 Check if the character has the variable defined. More...
 
virtual csPtr< psQuestPrereqOpCopy ()
 Copy the prerequisite operator. More...
 
virtual csString GetScriptOp ()
 Convert the prerequisite operator to a xml string. More...
 
 psQuestPrereqOpVariable (const char *name)
 Construct a variable operator. More...
 
 psQuestPrereqOpVariable (const char *name, const char *value)
 
 psQuestPrereqOpVariable (const char *name, double minv, double maxv)
 
 psQuestPrereqOpVariable (const psQuestPrereqOpVariable &other)
 
virtual ~psQuestPrereqOpVariable ()
 
- Public Member Functions inherited from psQuestPrereqOp
virtual csString GetScript ()
 Convert the prerequisite script to a xml string. More...
 
virtual ~psQuestPrereqOp ()
 Destructor for the prerequisite operator. More...
 

Protected Attributes

double max
 
double min
 
csString variableName
 
csString variableValue
 

Detailed Description

Variable set prerequisite operator.

The character must have the specified variable set.

Definition at line 1238 of file psquestprereqops.h.

Constructor & Destructor Documentation

psQuestPrereqOpVariable::psQuestPrereqOpVariable ( const char *  name)
inline

Construct a variable operator.

Parameters
variableNameThe variable to check for assignment.

Definition at line 1252 of file psquestprereqops.h.

psQuestPrereqOpVariable::psQuestPrereqOpVariable ( const char *  name,
const char *  value 
)
inline

Definition at line 1256 of file psquestprereqops.h.

psQuestPrereqOpVariable::psQuestPrereqOpVariable ( const char *  name,
double  minv,
double  maxv 
)
inline

Definition at line 1260 of file psquestprereqops.h.

psQuestPrereqOpVariable::psQuestPrereqOpVariable ( const psQuestPrereqOpVariable other)
inline

Definition at line 1264 of file psquestprereqops.h.

virtual psQuestPrereqOpVariable::~psQuestPrereqOpVariable ( )
inlinevirtual

Definition at line 1270 of file psquestprereqops.h.

Member Function Documentation

virtual bool psQuestPrereqOpVariable::Check ( psCharacter character)
virtual

Check if the character has the variable defined.

Parameters
characterThe character that are checking for a prerequisite.
Returns
True if the variable we are searching for was found.

Implements psQuestPrereqOp.

virtual csPtr<psQuestPrereqOp> psQuestPrereqOpVariable::Copy ( )
virtual

Copy the prerequisite operator.

Override this function to return a copy of the prerequisite operator.

Returns
Copy of the prerequisite operator.

Implements psQuestPrereqOp.

virtual csString psQuestPrereqOpVariable::GetScriptOp ( )
virtual

Convert the prerequisite operator to a xml string.

Convert the operator into the xml string: <variable name="variablename"/>

Returns
XML string for the prerequisite operator.

Implements psQuestPrereqOp.

Member Data Documentation

double psQuestPrereqOpVariable::max
protected

Definition at line 1243 of file psquestprereqops.h.

double psQuestPrereqOpVariable::min
protected

Definition at line 1243 of file psquestprereqops.h.

csString psQuestPrereqOpVariable::variableName
protected

Definition at line 1241 of file psquestprereqops.h.

csString psQuestPrereqOpVariable::variableValue
protected

Definition at line 1242 of file psquestprereqops.h.


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