Function: FunctionEvent Class Reference

Public Member Functions | Static Public Attributes

# FunctionEvent Class Reference

`#include <FunctionEvent.h>`

List of all members.

## Public Member Functions

| FunctionEvent (const FunctionEvent &event)
virtual | ~FunctionEvent ()
FunctionEvent & | operator= (const FunctionEvent &event)
virtual BaseEventSPtr | Clone ()
virtual bool | IsExecutable () const
virtual void | Execute (RuntimeScene &scene, ObjectsConcerned &objectsConcerned)
virtual void | Preprocess (const Game &game, RuntimeScene &scene, std::vector< BaseEventSPtr > &eventList, unsigned int indexOfTheEventInThisList)
virtual void | Launch (RuntimeScene &scene, ObjectsConcerned &objectsConcerned, std::vector< string > parameters_)
void | UnreferenceFunction ()
void | ReferenceFunction (Scene *)
virtual bool | CanHaveSubEvents () const
virtual const vector < BaseEventSPtr > & | GetSubEvents () const
virtual vector< BaseEventSPtr > & | GetSubEvents ()
void | SetSubEvents (vector< BaseEventSPtr > &subEvents_)
const vector< Instruction > & | GetConditions () const
vector< Instruction > & | GetConditions ()
void | SetConditions (vector< Instruction > &conditions_)
const vector< Instruction > & | GetActions () const
vector< Instruction > & | GetActions ()
void | SetActions (vector< Instruction > &actions_)
string | GetName () const
string | GetName ()
void | SetName (string name_)
virtual vector< vector < Instruction > * > | GetAllConditionsVectors ()
virtual vector< vector < Instruction > * > | GetAllActionsVectors ()
virtual void | LoadFromXml (const TiXmlElement *eventElem)

## Static Public Attributes

static std::map< const Scene *, std::map< std::string, FunctionEvent * > > | functionsList
| Static map containing all functions, associated with their game, scene and name.
static std::map< const Scene *, std::vector< std::string > * > | currentFunctionParameter
| Static map containing the parameters of the current function.

## Detailed Description

Function event is an event which is executed by an action ( This action can pass to the function parameters and objects concerned ) Functions are referenced in a (static) std::map so as to let action call them.

## Constructor & Destructor Documentation

FunctionEvent::FunctionEvent | ( | const FunctionEvent & | event | ) |

Custom copy operator

FunctionEvent::~FunctionEvent | ( |  | ) | `[virtual]`

Unregister function when object is destroyed

## Member Function Documentation

void FunctionEvent::Launch | ( | RuntimeScene & | scene,
|  | ObjectsConcerned & | objectsConcerned,
|  | std::vector< string > | parameters |
| ) |  |  | `[virtual]`

Check the conditions, and launch actions and subevents if necessary

FunctionEvent & FunctionEvent::operator= | ( | const FunctionEvent & | event | ) |

Custom assignement operator

void FunctionEvent::Preprocess | ( | const Game & | game,
|  | RuntimeScene & | scene,
|  | std::vector< BaseEventSPtr > & | eventList,
|  | unsigned int | indexOfTheEventInThisList |
| ) |  |  | `[virtual]`

Register function during preprocessing

void FunctionEvent::ReferenceFunction | ( | Scene * | scene | ) |

Add function to functions list

void FunctionEvent::UnreferenceFunction | ( |  | ) |

Suppress function from functions list

## Member Data Documentation

std::map< const Scene *, std::map< std::string, FunctionEvent * > > FunctionEvent::functionsList`[static]`

Static map containing all functions, associated with their game, scene and name.

Game Develop - Function Extension Copyright (c) 2008-2010 Florian Rival (Florian.Rival@gmail.com)

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

3. This notice may not be removed or altered from any source distribution.

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

- FunctionEvent.h
- FunctionEvent.cpp