CEL

Public API Reference

iParameterManager Struct Reference

This interface provides a generic functions for the evaluation of any type of parameter (constant, dynamic, or expression). More...

#include <tools/parameters.h>

Inheritance diagram for iParameterManager:

List of all members.

Public Member Functions

virtual csPtr< iParameterGetParameter (const char *param, celDataType type=CEL_DATA_NONE)=0
 Get a parameter that can be evalulated later on an as-needed basis.
virtual csPtr< iParameterGetParameter (iCelParameterBlock *params, const char *param, celDataType type=CEL_DATA_NONE)=0
 Get a parameter that can be evalulated later on an as-needed basis.
virtual csRef< iCelEntityListResolveEntityListParameter (iCelPlLayer *pl, iCelParameterBlock *params, iParameter *param)=0
 Conveniance function to get a list of entities out of an iParameter.
virtual iCelEntityResolveEntityParameter (iCelPlLayer *pl, iCelParameterBlock *params, iParameter *param, iCelEntity *ent=0)=0
 Conveniance function to get an entity out of an iParameter.
virtual const char * ResolveEntityParameter (iCelParameterBlock *params, const char *param, uint &entid)=0
 This is a convenience function to resolve a quest parameter during creation of rewards, triggers, and sequence operations and convert the parameter to an entity name or ID.
virtual const char * ResolveParameter (iCelParameterBlock *params, const char *param)=0
 This is a convenience function to resolve a quest parameter during creation of rewards, triggers, and sequence operations.
virtual void SetRememberExpression (bool remember)=0
 Enable remembering of the original expression used to create the parameter.

Detailed Description

This interface provides a generic functions for the evaluation of any type of parameter (constant, dynamic, or expression).

Definition at line 112 of file parameters.h.


Member Function Documentation

virtual csPtr<iParameter> iParameterManager::GetParameter ( const char *  param,
celDataType  type = CEL_DATA_NONE 
) [pure virtual]

Get a parameter that can be evalulated later on an as-needed basis.

This version differs from the previous version in the sense that '$' is also seen as dynamic so '$' and '@' have the same meaning here. If the optional 'type' is given then this function will make a parameter that returns only the given type. Conversion will happen automatically in case it is needed.

virtual csPtr<iParameter> iParameterManager::GetParameter ( iCelParameterBlock params,
const char *  param,
celDataType  type = CEL_DATA_NONE 
) [pure virtual]

Get a parameter that can be evalulated later on an as-needed basis.

Returns 0 for an illegal parameter (error reporting has been done). This version supports '$' (in which case the value of the parameter is fetched from the given 'params' block), '@' (in which case it is a dynamic parameter which will be resolved later), and '=' (in which case it is an expression to be resolved later). In case '$' is used the resulting value will itself be parsed (may contain '@' and '='). If the optional 'type' is given then this function will make a parameter that returns only the given type. Conversion will happen automatically in case it is needed.

virtual csRef<iCelEntityList> iParameterManager::ResolveEntityListParameter ( iCelPlLayer pl,
iCelParameterBlock params,
iParameter param 
) [pure virtual]

Conveniance function to get a list of entities out of an iParameter.

virtual iCelEntity* iParameterManager::ResolveEntityParameter ( iCelPlLayer pl,
iCelParameterBlock params,
iParameter param,
iCelEntity ent = 0 
) [pure virtual]

Conveniance function to get an entity out of an iParameter.

This function accepts an old entity pointer that will be used in case the parameter didn't change (optimization).

virtual const char* iParameterManager::ResolveEntityParameter ( iCelParameterBlock params,
const char *  param,
uint entid 
) [pure virtual]

This is a convenience function to resolve a quest parameter during creation of rewards, triggers, and sequence operations and convert the parameter to an entity name or ID.

This routine knows how to recognize parameter usage (starting with '$') and will in that case try to resolve the parameter by finding it in 'params'. Otherwise it will return the string. This version doesn't support dynamic parameters. If the parameter is a long then it will be treated as an entity ID. In that case the function returns 0 and 'entid' will be set. The string which is returned is relatively short-lived. Store it in a more permanent location if you plan to use it later.

virtual const char* iParameterManager::ResolveParameter ( iCelParameterBlock params,
const char *  param 
) [pure virtual]

This is a convenience function to resolve a quest parameter during creation of rewards, triggers, and sequence operations.

This routine knows how to recognize parameter usage (starting with '$') and will in that case try to resolve the parameter by finding it in 'params'. Otherwise it will just return the unmodified string. This version doesn't support dynamic parameters. The string which is returned is relatively short-lived. Store it in a more permanent location if you plan to use it later.

virtual void iParameterManager::SetRememberExpression ( bool  remember  )  [pure virtual]

Enable remembering of the original expression used to create the parameter.

This is useful for editors where you want to examine the expression used for making this parameter. Disabled by default.


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

Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1