PeriDyno 1.2.1
Loading...
Searching...
No Matches
dyno::FVar< T > Class Template Reference

#include <Field.h>

Inheritance diagram for dyno::FVar< T >:
Collaboration diagram for dyno::FVar< T >:

Public Types

typedef T VarType
 
typedef T DataType
 
typedef FVar< TFieldType
 
- Public Types inherited from dyno::FBase
enum  FInputPolicy { One , Many }
 Field with a policy of FInputPolicy::Many is not allowed to be connected to FInputPolicy::One Field with policy of FInputPolicy::One can either be connected to a field of FInputPolicy::One or FInputPolicy::Many. More...
 

Public Member Functions

 FVar ()
 
 FVar (std::string name, std::string description, FieldTypeEnum fieldType, OBase *parent)
 
 FVar (T value, std::string name, std::string description, FieldTypeEnum fieldType, OBase *parent)
 
 ~FVar () override
 
const std::string getTemplateName () override
 
const std::string getClassName () override
 
uint size () override
 
void setValue (T val, bool notify=true)
 set the value
 
T getValue ()
 
std::string serialize () override
 
bool deserialize (const std::string &str) override
 
bool isEmpty () override
 
bool connect (FieldType *dst)
 
bool connect (FBase *dst) override
 
DataType getData ()
 
std::shared_ptr< DataType > & constDataPtr ()
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
std::string serialize ()
 
bool deserialize (const std::string &str)
 
- Public Member Functions inherited from dyno::FBase
 FBase ()
 
 FBase (std::string name, std::string description, FieldTypeEnum type=FieldTypeEnum::Param, OBase *parent=nullptr)
 
virtual ~FBase ()
 
std::string getObjectName ()
 
std::string getDescription ()
 
virtual DeviceType getDeviceType ()
 
void setObjectName (std::string name)
 
void setDescription (std::string description)
 
void setParent (OBase *owner)
 
OBaseparent ()
 
bool isDerived ()
 
bool isAutoDestroyable ()
 
void setAutoDestroy (bool autoDestroy)
 
void setDerived (bool derived)
 
uint sizeOfSinks ()
 
uint sizeOfValidSources ()
 
void requestValidSources (std::vector< FBase * > &src)
 
FBasegetSource ()
 
FBasegetTopField ()
 
std::vector< FBase * > & getSources ()
 
std::vector< FBase * > & getSinks ()
 
bool isModified ()
 
bool isActive ()
 A variable to control the visibility of the field.
 
void setActive (bool b)
 
void tick ()
 
void tack ()
 
bool isOptional ()
 
void tagOptional (bool optional)
 
float getMin ()
 
void setMin (float min_val)
 
float getMax ()
 
void setMax (float max_val)
 
void setRange (float min_val, float max_val)
 
FieldTypeEnum getFieldType ()
 
virtual bool disconnect (FBase *dst)
 
virtual FInputPolicy inputPolicy ()
 
FBasepromoteOuput ()
 Display a state field as an ouput field.
 
FBasepromoteInput ()
 Display a state field as an input field.
 
FBasedemoteOuput ()
 Hide a state field from outputs.
 
FBasedemoteInput ()
 Hide a state field from inputs.
 
virtual void update ()
 
void attach (std::shared_ptr< FCallBackFunc > func)
 
void detach (std::shared_ptr< FCallBackFunc > func)
 

Private Member Functions

std::shared_ptr< DataType > & getDataPtr ()
 

Private Attributes

std::shared_ptr< DataTypem_data = nullptr
 

Additional Inherited Members

- Protected Member Functions inherited from dyno::FBase
void setSource (FBase *source)
 
bool addSink (FBase *f)
 
bool removeSink (FBase *f)
 
bool addSource (FBase *f)
 
bool removeSource (FBase *f)
 
bool connectField (FBase *dst)
 
bool disconnectField (FBase *dst)
 
- Protected Attributes inherited from dyno::FBase
FieldTypeEnum m_fType = FieldTypeEnum::Param
 

Detailed Description

template<typename T>
class dyno::FVar< T >

Definition at line 33 of file Field.h.

Member Typedef Documentation

◆ DataType

template<typename T>
typedef T dyno::FVar< T >::DataType

Definition at line 37 of file Field.h.

◆ FieldType

template<typename T>
typedef FVar<T> dyno::FVar< T >::FieldType

Definition at line 38 of file Field.h.

◆ VarType

template<typename T>
typedef T dyno::FVar< T >::VarType

Definition at line 36 of file Field.h.

Constructor & Destructor Documentation

◆ FVar() [1/3]

template<typename T>
dyno::FVar< T >::FVar ( )
inline

Definition at line 40 of file Field.h.

Here is the call graph for this function:

◆ FVar() [2/3]

template<typename T>
dyno::FVar< T >::FVar ( std::string name,
std::string description,
FieldTypeEnum fieldType,
OBase * parent )
inline

Definition at line 41 of file Field.h.

Here is the call graph for this function:

◆ FVar() [3/3]

template<typename T>
dyno::FVar< T >::FVar ( T value,
std::string name,
std::string description,
FieldTypeEnum fieldType,
OBase * parent )

Definition at line 104 of file Field.h.

Here is the call graph for this function:

◆ ~FVar()

template<typename T>
dyno::FVar< T >::~FVar ( )
override

Definition at line 111 of file Field.h.

Member Function Documentation

◆ connect() [1/2]

template<typename T>
bool dyno::FVar< T >::connect ( FBase * dst)
inlineoverridevirtual

Implements dyno::FBase.

Definition at line 73 of file Field.h.

Here is the call graph for this function:

◆ connect() [2/2]

template<typename T>
bool dyno::FVar< T >::connect ( FieldType * dst)
inline

Definition at line 67 of file Field.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ constDataPtr()

template<typename T>
std::shared_ptr< DataType > & dyno::FVar< T >::constDataPtr ( )
inline

Definition at line 85 of file Field.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deserialize() [1/16]

bool dyno::FVar< Color >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 23 of file Color.inl.

◆ deserialize() [2/16]

bool dyno::FVar< Curve >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 33 of file Curve.inl.

◆ deserialize() [3/16]

bool dyno::FVar< FilePath >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 19 of file FilePath.inl.

◆ deserialize() [4/16]

bool dyno::FVar< Ramp >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 33 of file Ramp.inl.

◆ deserialize() [5/16]

bool dyno::FVar< VehicleBind >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 120 of file VehicleInfo.inl.

◆ deserialize() [6/16]

bool dyno::FVar< std::vector< Animation2JointConfig > >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 433 of file VehicleInfo.inl.

◆ deserialize() [7/16]

bool dyno::FVar< bool >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 16 of file FSerialization.inl.

◆ deserialize() [8/16]

bool dyno::FVar< int >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 42 of file FSerialization.inl.

◆ deserialize() [9/16]

bool dyno::FVar< uint >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 68 of file FSerialization.inl.

◆ deserialize() [10/16]

bool dyno::FVar< float >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 94 of file FSerialization.inl.

◆ deserialize() [11/16]

bool dyno::FVar< double >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 120 of file FSerialization.inl.

◆ deserialize() [12/16]

bool dyno::FVar< Vec3f >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 146 of file FSerialization.inl.

◆ deserialize() [13/16]

bool dyno::FVar< Vec3i >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 184 of file FSerialization.inl.

◆ deserialize() [14/16]

bool dyno::FVar< Vec3d >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 221 of file FSerialization.inl.

◆ deserialize() [15/16]

bool dyno::FVar< std::string >::deserialize ( const std::string & str)
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 277 of file FSerialization.inl.

◆ deserialize() [16/16]

template<typename T>
bool dyno::FVar< T >::deserialize ( const std::string & str)
inlineoverridevirtual

Reimplemented from dyno::FBase.

Definition at line 61 of file Field.h.

◆ getClassName()

template<typename T>
const std::string dyno::FVar< T >::getClassName ( )
inlineoverridevirtual

Reimplemented from dyno::FBase.

Definition at line 48 of file Field.h.

◆ getData()

template<typename T>
DataType dyno::FVar< T >::getData ( )
inline

Definition at line 79 of file Field.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDataPtr()

template<typename T>
std::shared_ptr< DataType > & dyno::FVar< T >::getDataPtr ( )
inlineprivate

Definition at line 93 of file Field.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTemplateName()

template<typename T>
const std::string dyno::FVar< T >::getTemplateName ( )
inlineoverridevirtual

Reimplemented from dyno::FBase.

Definition at line 47 of file Field.h.

◆ getValue()

template<typename T>
T dyno::FVar< T >::getValue ( )

Definition at line 136 of file Field.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isEmpty()

template<typename T>
bool dyno::FVar< T >::isEmpty ( )
inlineoverridevirtual

Implements dyno::FBase.

Definition at line 63 of file Field.h.

Here is the call graph for this function:

◆ serialize() [1/16]

std::string dyno::FVar< Color >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 9 of file Color.inl.

◆ serialize() [2/16]

std::string dyno::FVar< Curve >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 10 of file Curve.inl.

◆ serialize() [3/16]

std::string dyno::FVar< FilePath >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 8 of file FilePath.inl.

◆ serialize() [4/16]

std::string dyno::FVar< Ramp >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 10 of file Ramp.inl.

◆ serialize() [5/16]

std::string dyno::FVar< VehicleBind >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 101 of file VehicleInfo.inl.

◆ serialize() [6/16]

std::string dyno::FVar< std::vector< Animation2JointConfig > >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 418 of file VehicleInfo.inl.

◆ serialize() [7/16]

std::string dyno::FVar< bool >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 6 of file FSerialization.inl.

◆ serialize() [8/16]

std::string dyno::FVar< int >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 28 of file FSerialization.inl.

◆ serialize() [9/16]

std::string dyno::FVar< uint >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 54 of file FSerialization.inl.

◆ serialize() [10/16]

std::string dyno::FVar< float >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 80 of file FSerialization.inl.

◆ serialize() [11/16]

std::string dyno::FVar< double >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 106 of file FSerialization.inl.

◆ serialize() [12/16]

std::string dyno::FVar< Vec3f >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 132 of file FSerialization.inl.

◆ serialize() [13/16]

std::string dyno::FVar< Vec3i >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 170 of file FSerialization.inl.

◆ serialize() [14/16]

std::string dyno::FVar< Vec3d >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 207 of file FSerialization.inl.

◆ serialize() [15/16]

std::string dyno::FVar< std::string >::serialize ( )
inlinevirtual

Reimplemented from dyno::FBase.

Definition at line 266 of file FSerialization.inl.

◆ serialize() [16/16]

template<typename T>
std::string dyno::FVar< T >::serialize ( )
inlineoverridevirtual

Reimplemented from dyno::FBase.

Definition at line 60 of file Field.h.

◆ setValue()

template<typename T>
void dyno::FVar< T >::setValue ( T val,
bool notify = true )

set the value

notify: call the callback function when the value is true

Definition at line 116 of file Field.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ size()

template<typename T>
uint dyno::FVar< T >::size ( )
inlineoverridevirtual

Implements dyno::FBase.

Definition at line 50 of file Field.h.

Member Data Documentation

◆ m_data

template<typename T>
std::shared_ptr<DataType> dyno::FVar< T >::m_data = nullptr
private

Definition at line 100 of file Field.h.


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