Cafu Engine
cf::GameSys::ComponentMoverT::VarTrajFuncT Class Reference

A variable of type int that describes the base function that is used to compute the mover's trajectory. More...

#include "CompMover.hpp"

Inheritance diagram for cf::GameSys::ComponentMoverT::VarTrajFuncT:

Public Types

enum  { TRAJFUNC_LINEAR = 0, TRAJFUNC_SINE }
 

Public Member Functions

 VarTrajFuncT (const char *Name, const int &Value, const char *Flags[]=NULL)
 
void GetChoices (ArrayT< std::string > &Strings, ArrayT< int > &Values) const override
 This method returns a list of acceptable input values for this variable, along with a string representation of each. More...
 
- Public Member Functions inherited from cf::TypeSys::VarT< int >
 VarT (const char *Name, const int &Value, const char *Flags[]=NULL)
 The constructor. More...
 
const int & Get () const
 Returns the value of this variable. More...
 
virtual void Set (const int &v)
 Sets the value of this variable to the given value v. More...
 
void Serialize (Network::OutStreamT &Stream) const
 Stores the value of this variable in the given Stream. More...
 
void Deserialize (Network::InStreamT &Stream)
 Restores the value of this variable from the given Stream. More...
 
void accept (VisitorT &Visitor)
 
void accept (VisitorConstT &Visitor) const
 
- Public Member Functions inherited from cf::TypeSys::VarBaseT
 VarBaseT (const char *Name, const char *Flags[])
 
const char * GetName () const
 
const char ** GetFlags () const
 
bool HasFlag (const char *Flag) const
 
const char * GetFlag (const char *Flag, unsigned int Nr, const char *Default=NULL) const
 
virtual std::string GetExtraMessage () const
 Sometimes actions on variables generate extra messages that are relevant to the user. More...
 

Detailed Description

A variable of type int that describes the base function that is used to compute the mover's trajectory.

Member Function Documentation

void ComponentMoverT::VarTrajFuncT::GetChoices ( ArrayT< std::string > &  Strings,
ArrayT< int > &  Values 
) const
overridevirtual

This method returns a list of acceptable input values for this variable, along with a string representation of each.

The relevancy of the returned tuples is limited: They are intended to create helpful user interfaces in our graphical editors and to provide extra information in scripts, but if Set() is called with a value that is not in Values, it will work and is not an error. If the method returns no tuples at all, it means that user input is free and any value is acceptable.

Reimplemented from cf::TypeSys::VarT< int >.


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