#include <HBhvSensor.h>
Public Member Functions | |
virtual void | Evaluate (bool &and_flag, bool &or_flag) |
virtual HBhvSensor * | GetSensor () |
HBhvCondition (const char *target, const char *hevent, bool invert, HBhvSensor *sensor) | |
virtual void | Register () |
virtual void | Serialize (HUtilityXMLGenerator *xmlgen) |
virtual void | Serialize (HUtilityXMLGenerator *xmlgen, HUtilityXMLTag *xmlt) |
virtual void | SetTarget (const char *target) |
virtual void | UnRegister () |
Static Public Member Functions | |
static void * | XMLCallback (HUtilityXMLTag *xt, bool open, void *m_pExtraData) |
Protected Attributes | |
bool | m_bConditionMet |
bool | m_bInvert |
char | m_Event [256] |
HBhvSensor * | m_pSensor |
HBhvTargetObject * | m_pTarget |
char | m_Value [256] |
HBhvCondition::HBhvCondition | ( | const char * | target, | |
const char * | hevent, | |||
bool | invert, | |||
HBhvSensor * | sensor | |||
) |
Constructs an HBhvCondition object.
target | The segment path of the target for this condition. | |
hevent | The event type. | |
invert | Pass true to invert the condition. In other words, this condition will return true if the condition evaluates to false and false if the condition evaluates to true. | |
sensor | A pointer to the HBhvSensor object that this condition belongs to. |
virtual void HBhvCondition::Evaluate | ( | bool & | and_flag, | |
bool & | or_flag | |||
) | [virtual] |
Evaluates the condition.
and_flag | Result of evaluation | |
or_flag | Result of evaluation |
Reimplemented in HBhvConditionAnimationRunning, and HBhvConditionSensorActive.
virtual HBhvSensor* HBhvCondition::GetSensor | ( | ) | [inline, virtual] |
virtual void HBhvCondition::Register | ( | ) | [inline, virtual] |
Registers the condition with event manager (if applicable)
Reimplemented in HBhvConditionMouse, HBhvConditionAnimation, and HBhvConditionSensor.
virtual void HBhvCondition::Serialize | ( | HUtilityXMLGenerator * | xmlgen | ) | [virtual] |
Writes XML data to a buffer.
Reimplemented in HBhvConditionAnimationRunning, HBhvConditionSensorActive, HBhvConditionSensorActivated, HBhvConditionSensorAction, HBhvConditionAnimationFinished, HBhvConditionONLCLICK, HBhvConditionONMOUSEENTER, and HBhvConditionONMOUSELEAVE.
virtual void HBhvCondition::Serialize | ( | HUtilityXMLGenerator * | xmlgen, | |
HUtilityXMLTag * | xmlt | |||
) | [virtual] |
Writes XML data to a buffer.
virtual void HBhvCondition::SetTarget | ( | const char * | target | ) | [virtual] |
Sets a target for this condition.
target | The segment path of the targetfor this condition. |
virtual void HBhvCondition::UnRegister | ( | ) | [inline, virtual] |
Unregisters condition from event manager (if applicable)
Reimplemented in HBhvConditionMouse, HBhvConditionAnimation, HBhvConditionSensor, HBhvConditionONMOUSEENTER, and HBhvConditionONMOUSELEAVE.
static void* HBhvCondition::XMLCallback | ( | HUtilityXMLTag * | xt, | |
bool | open, | |||
void * | m_pExtraData | |||
) | [static] |
This is XML read callback which parses XML data and then populates the member variables with the associated values.
bool HBhvCondition::m_bConditionMet [protected] |
The value is true if the condition was met or false if the condition was not met.
bool HBhvCondition::m_bInvert [protected] |
The value is true if you want the condition inverted.
char HBhvCondition::m_Event[256] [protected] |
The event type.
HBhvSensor* HBhvCondition::m_pSensor [protected] |
The parent sensor.
HBhvTargetObject* HBhvCondition::m_pTarget [protected] |
A pointer to the target object.
char HBhvCondition::m_Value[256] [protected] |
Extra data for the conditon.