Particle Universe  1.2
ParticleUniverse::ScriptTranslator Class Reference

#include <ParticleUniverseScriptDeserializer.h>

Inherits Ogre::ScriptTranslator.

Inherited by ParticleUniverse::AffectorTranslator, ParticleUniverse::AliasTranslator, ParticleUniverse::AlignAffectorTranslator, ParticleUniverse::BaseColliderTranslator, ParticleUniverse::BaseForceAffectorTranslator, ParticleUniverse::BeamRendererTranslator, ParticleUniverse::BehaviourTranslator, ParticleUniverse::BillboardRendererTranslator, ParticleUniverse::BoxColliderExternTranslator, ParticleUniverse::BoxColliderTranslator, ParticleUniverse::BoxEmitterTranslator, ParticleUniverse::CameraDependencyTranslator, ParticleUniverse::CircleEmitterTranslator, ParticleUniverse::CollisionAvoidanceAffectorTranslator, ParticleUniverse::ColourAffectorTranslator, ParticleUniverse::DoAffectorEventHandlerTranslator, ParticleUniverse::DoEnableComponentEventHandlerTranslator, ParticleUniverse::DoPlacementParticleEventHandlerTranslator, ParticleUniverse::DoScaleEventHandlerTranslator, ParticleUniverse::DynamicAttributeTranslator, ParticleUniverse::EmitterTranslator, ParticleUniverse::EntityRendererTranslator, ParticleUniverse::ExternTranslator, ParticleUniverse::ForceFieldAffectorTranslator, ParticleUniverse::GeometryRotatorTranslator, ParticleUniverse::GravityAffectorTranslator, ParticleUniverse::GravityExternTranslator, ParticleUniverse::InterParticleColliderTranslator, ParticleUniverse::JetAffectorTranslator, ParticleUniverse::LightRendererTranslator, ParticleUniverse::LineAffectorTranslator, ParticleUniverse::LinearForceAffectorTranslator, ParticleUniverse::LineEmitterTranslator, ParticleUniverse::MeshSurfaceEmitterTranslator, ParticleUniverse::ObserverTranslator, ParticleUniverse::OnCountObserverTranslator, ParticleUniverse::OnEventFlagObserverTranslator, ParticleUniverse::OnPositionObserverTranslator, ParticleUniverse::OnRandomObserverTranslator, ParticleUniverse::OnTimeObserverTranslator, ParticleUniverse::OnVelocityObserverTranslator, ParticleUniverse::ParticleEventHandlerTranslator, ParticleUniverse::ParticleFollowerTranslator, ParticleUniverse::PathFollowerTranslator, ParticleUniverse::PlaneColliderTranslator, ParticleUniverse::PositionEmitterTranslator, ParticleUniverse::RandomiserTranslator, ParticleUniverse::RendererSetTranslator, ParticleUniverse::RendererTranslator, ParticleUniverse::RibbonTrailRendererTranslator, ParticleUniverse::ScaleAffectorTranslator, ParticleUniverse::ScaleVelocityAffectorTranslator, ParticleUniverse::SceneDecoratorExternTranslator, ParticleUniverse::SineForceAffectorTranslator, ParticleUniverse::SlaveEmitterTranslator, ParticleUniverse::SphereColliderExternTranslator, ParticleUniverse::SphereColliderTranslator, ParticleUniverse::SphereSurfaceEmitterTranslator, ParticleUniverse::SystemTranslator, ParticleUniverse::TechniqueTranslator, ParticleUniverse::TextureAnimatorTranslator, ParticleUniverse::TextureRotatorTranslator, ParticleUniverse::VelocityMatchingAffectorTranslator, ParticleUniverse::VertexEmitterTranslator, ParticleUniverse::VortexAffectorTranslator, and ParticleUniverse::VortexExternTranslator.

Public Types

enum  ValidationType {
  VAL_REAL, VAL_BOOL, VAL_UINT, VAL_INT,
  VAL_STRING, VAL_VECTOR2, VAL_VECTOR3, VAL_VECTOR4,
  VAL_COLOURVALUE, VAL_QUATERNION
}
 

Public Member Functions

 ScriptTranslator (void)
 
virtual ~ScriptTranslator (void)
 
virtual void translate (ScriptCompiler *compiler, const AbstractNodePtr &node)
 
virtual bool translateChildProperty (ScriptCompiler *compiler, const AbstractNodePtr &node)
 
virtual bool translateChildObject (ScriptCompiler *compiler, const AbstractNodePtr &node)
 
bool getVector2 (AbstractNodeList::const_iterator i, AbstractNodeList::const_iterator end, Vector2 *result, int maxEntries=2)
 
bool getVector3 (AbstractNodeList::const_iterator i, AbstractNodeList::const_iterator end, Vector3 *result, int maxEntries=3)
 
bool getVector4 (AbstractNodeList::const_iterator i, AbstractNodeList::const_iterator end, Vector4 *result, int maxEntries=4)
 
bool getQuaternion (AbstractNodeList::const_iterator i, AbstractNodeList::const_iterator end, Quaternion *result, int maxEntries=4)
 
bool passValidateProperty (ScriptCompiler *compiler, PropertyAbstractNode *prop, const String &token, ValidationType validationType)
 
bool passValidatePropertyNoValues (ScriptCompiler *compiler, PropertyAbstractNode *prop, const String &token)
 
bool passValidatePropertyNumberOfValues (ScriptCompiler *compiler, PropertyAbstractNode *prop, const String &token, ushort numberOfValues)
 
bool passValidatePropertyNumberOfValuesRange (ScriptCompiler *compiler, PropertyAbstractNode *prop, const String &token, ushort minNumberOfValues, ushort maxNumberOfValues)
 
bool passValidatePropertyValidReal (ScriptCompiler *compiler, PropertyAbstractNode *prop)
 
bool passValidatePropertyValidInt (ScriptCompiler *compiler, PropertyAbstractNode *prop)
 
bool passValidatePropertyValidUint (ScriptCompiler *compiler, PropertyAbstractNode *prop)
 
bool passValidatePropertyValidBool (ScriptCompiler *compiler, PropertyAbstractNode *prop)
 
bool passValidatePropertyValidVector2 (ScriptCompiler *compiler, PropertyAbstractNode *prop)
 
bool passValidatePropertyValidVector3 (ScriptCompiler *compiler, PropertyAbstractNode *prop)
 
bool passValidatePropertyValidVector4 (ScriptCompiler *compiler, PropertyAbstractNode *prop)
 
bool passValidatePropertyValidQuaternion (ScriptCompiler *compiler, PropertyAbstractNode *prop)
 
void errorUnexpectedToken (ScriptCompiler *compiler, AbstractNodePtr node)
 
void errorUnexpectedProperty (ScriptCompiler *compiler, PropertyAbstractNode *prop)
 

Detailed Description

ScriptTranslator subclasses the ScriptTranslator and adds some plumbing functions.

Member Enumeration Documentation

Enumerator
VAL_REAL 
VAL_BOOL 
VAL_UINT 
VAL_INT 
VAL_STRING 
VAL_VECTOR2 
VAL_VECTOR3 
VAL_VECTOR4 
VAL_COLOURVALUE 
VAL_QUATERNION 

Constructor & Destructor Documentation

ParticleUniverse::ScriptTranslator::ScriptTranslator ( void  )
virtual ParticleUniverse::ScriptTranslator::~ScriptTranslator ( void  )
inlinevirtual

Member Function Documentation

void ParticleUniverse::ScriptTranslator::errorUnexpectedProperty ( ScriptCompiler compiler,
PropertyAbstractNode prop 
)

Adds an error to the compiler: An unknown property is read.

void ParticleUniverse::ScriptTranslator::errorUnexpectedToken ( ScriptCompiler compiler,
AbstractNodePtr  node 
)

Adds an error to the compiler: An unknown token is read.

bool ParticleUniverse::ScriptTranslator::getQuaternion ( AbstractNodeList::const_iterator  i,
AbstractNodeList::const_iterator  end,
Quaternion result,
int  maxEntries = 4 
)

Parse Quaternion

bool ParticleUniverse::ScriptTranslator::getVector2 ( AbstractNodeList::const_iterator  i,
AbstractNodeList::const_iterator  end,
Vector2 result,
int  maxEntries = 2 
)

Parse Vector2

bool ParticleUniverse::ScriptTranslator::getVector3 ( AbstractNodeList::const_iterator  i,
AbstractNodeList::const_iterator  end,
Vector3 result,
int  maxEntries = 3 
)

Parse Vector3

bool ParticleUniverse::ScriptTranslator::getVector4 ( AbstractNodeList::const_iterator  i,
AbstractNodeList::const_iterator  end,
Vector4 result,
int  maxEntries = 4 
)

Parse Vector4

bool ParticleUniverse::ScriptTranslator::passValidateProperty ( ScriptCompiler compiler,
PropertyAbstractNode prop,
const String token,
ValidationType  validationType 
)

Validate a property.

bool ParticleUniverse::ScriptTranslator::passValidatePropertyNoValues ( ScriptCompiler compiler,
PropertyAbstractNode prop,
const String token 
)

Validate whether a property has values.

bool ParticleUniverse::ScriptTranslator::passValidatePropertyNumberOfValues ( ScriptCompiler compiler,
PropertyAbstractNode prop,
const String token,
ushort  numberOfValues 
)

Validate whether the number of values is correct.

bool ParticleUniverse::ScriptTranslator::passValidatePropertyNumberOfValuesRange ( ScriptCompiler compiler,
PropertyAbstractNode prop,
const String token,
ushort  minNumberOfValues,
ushort  maxNumberOfValues 
)

Validate whether the number of values is between a range.

bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidBool ( ScriptCompiler compiler,
PropertyAbstractNode prop 
)

Validate whether the value is a correct bool.

bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidInt ( ScriptCompiler compiler,
PropertyAbstractNode prop 
)

Validate whether the value is a correct int.

bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidQuaternion ( ScriptCompiler compiler,
PropertyAbstractNode prop 
)

Validate whether the value is a correct Quaternion.

bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidReal ( ScriptCompiler compiler,
PropertyAbstractNode prop 
)

Validate whether the value is a correct Real.

bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidUint ( ScriptCompiler compiler,
PropertyAbstractNode prop 
)

Validate whether the value is a correct uint.

bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidVector2 ( ScriptCompiler compiler,
PropertyAbstractNode prop 
)

Validate whether the value is a correct Vector2.

bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidVector3 ( ScriptCompiler compiler,
PropertyAbstractNode prop 
)

Validate whether the value is a correct Vector3.

bool ParticleUniverse::ScriptTranslator::passValidatePropertyValidVector4 ( ScriptCompiler compiler,
PropertyAbstractNode prop 
)

Validate whether the value is a correct Vector4.

virtual bool ParticleUniverse::ScriptTranslator::translateChildObject ( ScriptCompiler compiler,
const AbstractNodePtr node 
)
inlinevirtual

Only parses a certain child objec

Reimplemented in ParticleUniverse::BoxColliderExternTranslator, ParticleUniverse::GravityExternTranslator, ParticleUniverse::SceneDecoratorExternTranslator, ParticleUniverse::SphereColliderExternTranslator, ParticleUniverse::VortexExternTranslator, ParticleUniverse::AlignAffectorTranslator, ParticleUniverse::BaseColliderTranslator, ParticleUniverse::BaseForceAffectorTranslator, ParticleUniverse::BoxColliderTranslator, ParticleUniverse::CollisionAvoidanceAffectorTranslator, ParticleUniverse::ColourAffectorTranslator, ParticleUniverse::ForceFieldAffectorTranslator, ParticleUniverse::GeometryRotatorTranslator, ParticleUniverse::GravityAffectorTranslator, ParticleUniverse::InterParticleColliderTranslator, ParticleUniverse::JetAffectorTranslator, ParticleUniverse::LineAffectorTranslator, ParticleUniverse::LinearForceAffectorTranslator, ParticleUniverse::ParticleFollowerTranslator, ParticleUniverse::PathFollowerTranslator, ParticleUniverse::PlaneColliderTranslator, ParticleUniverse::RandomiserTranslator, ParticleUniverse::ScaleAffectorTranslator, ParticleUniverse::ScaleVelocityAffectorTranslator, ParticleUniverse::SineForceAffectorTranslator, ParticleUniverse::SphereColliderTranslator, ParticleUniverse::TextureAnimatorTranslator, ParticleUniverse::TextureRotatorTranslator, ParticleUniverse::VelocityMatchingAffectorTranslator, ParticleUniverse::VortexAffectorTranslator, ParticleUniverse::BoxEmitterTranslator, ParticleUniverse::CircleEmitterTranslator, ParticleUniverse::LineEmitterTranslator, ParticleUniverse::MeshSurfaceEmitterTranslator, ParticleUniverse::PositionEmitterTranslator, ParticleUniverse::SlaveEmitterTranslator, ParticleUniverse::SphereSurfaceEmitterTranslator, ParticleUniverse::VertexEmitterTranslator, ParticleUniverse::DoAffectorEventHandlerTranslator, ParticleUniverse::DoEnableComponentEventHandlerTranslator, ParticleUniverse::DoPlacementParticleEventHandlerTranslator, ParticleUniverse::DoScaleEventHandlerTranslator, ParticleUniverse::OnCountObserverTranslator, ParticleUniverse::OnEventFlagObserverTranslator, ParticleUniverse::OnPositionObserverTranslator, ParticleUniverse::OnRandomObserverTranslator, ParticleUniverse::OnTimeObserverTranslator, ParticleUniverse::OnVelocityObserverTranslator, ParticleUniverse::BeamRendererTranslator, ParticleUniverse::BillboardRendererTranslator, ParticleUniverse::EntityRendererTranslator, ParticleUniverse::LightRendererTranslator, and ParticleUniverse::RibbonTrailRendererTranslator.

virtual bool ParticleUniverse::ScriptTranslator::translateChildProperty ( ScriptCompiler compiler,
const AbstractNodePtr node 
)
inlinevirtual

Only parses a certain child property

Reimplemented in ParticleUniverse::BoxColliderExternTranslator, ParticleUniverse::GravityExternTranslator, ParticleUniverse::SceneDecoratorExternTranslator, ParticleUniverse::SphereColliderExternTranslator, ParticleUniverse::VortexExternTranslator, ParticleUniverse::AlignAffectorTranslator, ParticleUniverse::BaseColliderTranslator, ParticleUniverse::BaseForceAffectorTranslator, ParticleUniverse::BoxColliderTranslator, ParticleUniverse::CollisionAvoidanceAffectorTranslator, ParticleUniverse::ColourAffectorTranslator, ParticleUniverse::ForceFieldAffectorTranslator, ParticleUniverse::GeometryRotatorTranslator, ParticleUniverse::GravityAffectorTranslator, ParticleUniverse::InterParticleColliderTranslator, ParticleUniverse::JetAffectorTranslator, ParticleUniverse::LineAffectorTranslator, ParticleUniverse::LinearForceAffectorTranslator, ParticleUniverse::ParticleFollowerTranslator, ParticleUniverse::PathFollowerTranslator, ParticleUniverse::PlaneColliderTranslator, ParticleUniverse::RandomiserTranslator, ParticleUniverse::ScaleAffectorTranslator, ParticleUniverse::ScaleVelocityAffectorTranslator, ParticleUniverse::SineForceAffectorTranslator, ParticleUniverse::SphereColliderTranslator, ParticleUniverse::TextureAnimatorTranslator, ParticleUniverse::TextureRotatorTranslator, ParticleUniverse::VelocityMatchingAffectorTranslator, ParticleUniverse::VortexAffectorTranslator, ParticleUniverse::BoxEmitterTranslator, ParticleUniverse::CircleEmitterTranslator, ParticleUniverse::LineEmitterTranslator, ParticleUniverse::MeshSurfaceEmitterTranslator, ParticleUniverse::PositionEmitterTranslator, ParticleUniverse::SlaveEmitterTranslator, ParticleUniverse::SphereSurfaceEmitterTranslator, ParticleUniverse::VertexEmitterTranslator, ParticleUniverse::DoAffectorEventHandlerTranslator, ParticleUniverse::DoEnableComponentEventHandlerTranslator, ParticleUniverse::DoPlacementParticleEventHandlerTranslator, ParticleUniverse::DoScaleEventHandlerTranslator, ParticleUniverse::OnCountObserverTranslator, ParticleUniverse::OnEventFlagObserverTranslator, ParticleUniverse::OnPositionObserverTranslator, ParticleUniverse::OnRandomObserverTranslator, ParticleUniverse::OnTimeObserverTranslator, ParticleUniverse::OnVelocityObserverTranslator, ParticleUniverse::BeamRendererTranslator, ParticleUniverse::BillboardRendererTranslator, ParticleUniverse::EntityRendererTranslator, ParticleUniverse::LightRendererTranslator, and ParticleUniverse::RibbonTrailRendererTranslator.


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