#include <datatable.h>
Inheritance diagram for ScEng::DataTable:

Public Types | |
| enum | CHUNKS { ID_TO_INDEX_SIZE_CHUNKID = 0x00000010, ID_TO_INDEX_CHUNKID = 0x00000015, DATA_TABLE_SIZE_CHUNKID = 0x00000020 } |
| Enum Chunks. More... | |
Public Member Functions | |
| DataTable (bool create_dependencies) | |
| Constructor. | |
| bool | AddDataFloat (int id, float dv, int size) |
| Adds a DataFloat to the data_table. | |
| bool | AddDataInt (int id, int dv, int size) |
| Adds a DataInt to the data_table. | |
| bool | AddDataBool (int id, bool dv, int size) |
| Adds a DataBool to the data_table. | |
| bool | AddDataPoint3F (int id, GMT::Point3F dv, int size) |
| Adds a DataPoint3F to the data_table. | |
| bool | AddDataColor (int id, GMT::Color dv, int size) |
| Adds a DataColor to the data_table. | |
| void | UpdateIDToIndex () |
| Updates the id_to_index table. | |
| bool | GetValue (int id, float &value, int time=0, int item=0) |
| Gets the specified value. | |
| bool | GetValue (int id, int &value, int time=0, int item=0) |
| Gets the specified value. | |
| bool | GetValue (int id, bool &value, int time=0, int item=0) |
| Gets the specified value. | |
| bool | GetValue (int id, GMT::Point3F &value, int time=0, int item=0) |
| Gets the specified value. | |
| bool | GetValue (int id, GMT::Point3I &value, int time=0, int item=0) |
| Gets the specified value. | |
| bool | GetValue (int id, GMT::Color &value, int time=0, int item=0) |
| Gets the specified value. | |
| float | GetFloat (int id, int time=0, int item=0) |
| Returns the specified value. | |
| int | GetInt (int id, int time=0, int item=0) |
| Returns the specified value. | |
| bool | GetBool (int id, int time=0, int item=0) |
| Returns the specified value. | |
| GMT::Point3F | GetPoint3F (int id, int time=0, int item=0) |
| Returns the specified value. | |
| GMT::Point3I | GetPoint3I (int id, int time=0, int item=0) |
| Returns the specified value. | |
| GMT::Color | GetColor (int id, int time=0, int item=0) |
| Returns the specified value. | |
| std::string | GetDataName (int id) |
| Returns the name for the specified Data. | |
| Controller * | GetAnimationContoller (int id, int item=0) |
| Returns the Controller for the specified data. | |
| bool | SetValue (int id, float &value, int time=0, int item=0) |
| Sets the specified value. | |
| bool | SetValue (int id, int &value, int time=0, int item=0) |
| Sets the specified value. | |
| bool | SetValue (int id, bool &value, int time=0, int item=0) |
| Sets the specified value. | |
| bool | SetValue (int id, GMT::Point3F &value, int time=0, int item=0) |
| Sets the specified value. | |
| bool | SetValue (int id, GMT::Point3I &value, int time=0, int item=0) |
| Sets the specified value. | |
| bool | SetValue (int id, GMT::Color &value, int time=0, int item=0) |
| Sets the specified value. | |
| bool | SetDataName (int id, std::string name) |
| Sets the name for the specified Data. | |
| bool | SetController (int id, Controller *control, int item=0) |
| Sets the Controller for the specified Data. | |
| std::string | GetClassName () |
| Returns the name for this class. | |
| int | Properties () |
| Returns the Properties for this block. | |
| BlockType | GetBlockType () |
| Returns the BlockType for this class. | |
| int | NumDependencies () |
| Returns the number of Dependencies for this class. | |
| void | SetDependency (int id, Block *dependency) |
| Sets a Dependency. | |
| Block * | GetDependency (int id) |
| Returns the specified dependency. | |
| std::string | GetDependencyName (int id) |
| Gets the name for the specified dependency. | |
| int | GetNumDataTables () |
| This class has no DataTables. | |
| DataTable * | GetDataTable (int id=0) |
| This class has no DataTables. | |
| void | SetDataTable (DataTable *d, int i=0) |
| Sets the i_th data table. | |
| void | UpdateDataTable (int id=0) |
| This class has no DataTables. | |
| Block * | Clone () |
| Creates a copy of this object and return it. | |
| int | Save (SceneSave *scene_save) |
| Saves the info for this class. | |
| int | Load (SceneLoad *scene_load) |
| Loads the info for this class. | |
| void | DeleteThis () |
| Deletes this class. | |
| void | ActionBegin (int time, int action) |
| void | ActionEnd (int time, int action) |
| void | Update (int time) |
| void | DependancyChanged (Block *dependancy, unsigned int message=0, unsigned int parameters=0) |
| int | GetLastDataChanged () |
| Returns the id of the last data that changed in this DataTable. | |
Public Attributes | |
| std::vector< Data * > | data_table |
| The table of Data. | |
| std::vector< int > | id_to_index |
| Keeps the relationship between the ids and the indexes. | |
Static Public Attributes | |
| static BlockType | block_type |
All the Data objects must be in this class.
| bool ScEng::DataTable::AddDataFloat | ( | int | id, | |
| float | dv, | |||
| int | size | |||
| ) |
| bool ScEng::DataTable::AddDataInt | ( | int | id, | |
| int | dv, | |||
| int | size | |||
| ) |
| bool ScEng::DataTable::AddDataBool | ( | int | id, | |
| bool | dv, | |||
| int | size | |||
| ) |
| bool ScEng::DataTable::AddDataPoint3F | ( | int | id, | |
| GMT::Point3F | dv, | |||
| int | size | |||
| ) |
Adds a DataPoint3F to the data_table.
| id | the id for the data to be added | |
| dv | the default value for this data | |
| size | the size for the DataPoint3F |
| bool ScEng::DataTable::AddDataColor | ( | int | id, | |
| GMT::Color | dv, | |||
| int | size | |||
| ) |
| bool ScEng::DataTable::GetValue | ( | int | id, | |
| float & | value, | |||
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
Gets the specified value.
| id | the id for the requested value | |
| value | here will be stored the data | |
| time | the time to get the value | |
| item | the specified item in the DataFloat |
| bool ScEng::DataTable::GetValue | ( | int | id, | |
| int & | value, | |||
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
Gets the specified value.
| id | the id for the requested value | |
| value | here will be stored the data | |
| time | the time to get the value | |
| item | the specified item in the DataInt |
| bool ScEng::DataTable::GetValue | ( | int | id, | |
| bool & | value, | |||
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
Gets the specified value.
| id | the id for the requested value | |
| value | here will be stored the data | |
| time | the time to get the value | |
| item | the specified item in the DataBool |
| bool ScEng::DataTable::GetValue | ( | int | id, | |
| GMT::Point3F & | value, | |||
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
Gets the specified value.
| id | the id for the requested value | |
| value | here will be stored the data | |
| time | the time to get the value | |
| item | the specified item in the DataPoint3F |
| bool ScEng::DataTable::GetValue | ( | int | id, | |
| GMT::Point3I & | value, | |||
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
Gets the specified value.
| id | the id for the requested value | |
| value | here will be stored the data | |
| time | the time to get the value | |
| item | the specified item in the DataPoint3I |
| bool ScEng::DataTable::GetValue | ( | int | id, | |
| GMT::Color & | value, | |||
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
Gets the specified value.
| id | the id for the requested value | |
| value | here will be stored the data | |
| time | the time to get the value | |
| item | the specified item in the DataColor |
| float ScEng::DataTable::GetFloat | ( | int | id, | |
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
Returns the specified value.
| id | the id for the requested value | |
| time | the time to get the value | |
| item | the specified item in the DataFloat |
| int ScEng::DataTable::GetInt | ( | int | id, | |
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
Returns the specified value.
| id | the id for the requested value | |
| time | the time to get the value | |
| item | the specified item in the DataInt |
| bool ScEng::DataTable::GetBool | ( | int | id, | |
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
Returns the specified value.
| id | the id for the requested value | |
| time | the time to get the value | |
| item | the specified item in the DataBool |
| GMT::Point3F ScEng::DataTable::GetPoint3F | ( | int | id, | |
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
Returns the specified value.
| id | the id for the requested value | |
| time | the time to get the value | |
| item | the specified item in the DataPoint3F |
| GMT::Point3I ScEng::DataTable::GetPoint3I | ( | int | id, | |
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
Returns the specified value.
| id | the id for the requested value | |
| time | the time to get the value | |
| item | the specified item in the DataPoint3I |
| GMT::Color ScEng::DataTable::GetColor | ( | int | id, | |
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
Returns the specified value.
| id | the id for the requested value | |
| time | the time to get the value | |
| item | the specified item in the DataColor |
| std::string ScEng::DataTable::GetDataName | ( | int | id | ) |
| Controller * ScEng::DataTable::GetAnimationContoller | ( | int | id, | |
| int | item = 0 | |||
| ) |
Returns the Controller for the specified data.
| id | the id for the requested Controller |
| bool ScEng::DataTable::SetValue | ( | int | id, | |
| float & | value, | |||
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
| bool ScEng::DataTable::SetValue | ( | int | id, | |
| int & | value, | |||
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
| bool ScEng::DataTable::SetValue | ( | int | id, | |
| bool & | value, | |||
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
| bool ScEng::DataTable::SetValue | ( | int | id, | |
| GMT::Point3F & | value, | |||
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
Sets the specified value.
| id | the id for the DataPoint3F to be set | |
| value | this is the data that will be set | |
| time | the time to set the value | |
| item | the specified item in the DataPoint3F |
| bool ScEng::DataTable::SetValue | ( | int | id, | |
| GMT::Point3I & | value, | |||
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
Sets the specified value.
| id | the id for the DataPoint3I to be set | |
| value | this is the data that will be set | |
| time | the time to set the value | |
| item | the specified item in the DataPoint3I |
| bool ScEng::DataTable::SetValue | ( | int | id, | |
| GMT::Color & | value, | |||
| int | time = 0, |
|||
| int | item = 0 | |||
| ) |
| bool ScEng::DataTable::SetDataName | ( | int | id, | |
| std::string | name | |||
| ) |
| bool ScEng::DataTable::SetController | ( | int | id, | |
| Controller * | control, | |||
| int | item = 0 | |||
| ) |
Sets the Controller for the specified Data.
| id | the id for the Data |
| std::string ScEng::DataTable::GetClassName | ( | ) | [virtual] |
| int ScEng::DataTable::Properties | ( | ) | [inline, virtual] |
| BlockType ScEng::DataTable::GetBlockType | ( | ) | [virtual] |
Returns the BlockType for this class.
Implements ScEng::Block.
| int ScEng::DataTable::NumDependencies | ( | ) | [virtual] |
Returns the number of Dependencies for this class.
Implements ScEng::Block.
| void ScEng::DataTable::SetDependency | ( | int | id, | |
| Block * | dependency | |||
| ) | [virtual] |
Sets a Dependency.
Sets the specified data.
| id | the ID for data in the data_table | |
| dependency | the dependency |
Implements ScEng::Block.
| Block * ScEng::DataTable::GetDependency | ( | int | id | ) | [virtual] |
Returns the specified dependency.
| id | the ID for the data. |
Implements ScEng::Block.
| DataTable* ScEng::DataTable::GetDataTable | ( | int | id = 0 |
) | [inline, virtual] |
| Block * ScEng::DataTable::Clone | ( | ) | [virtual] |
Creates a copy of this object and return it.
The caller of this function is responsible to add this block to the DAG or to delete it.
Implements ScEng::Block.
| void ScEng::DataTable::ActionBegin | ( | int | time, | |
| int | action | |||
| ) | [inline, virtual] |
Informs the block that an action will begin
| time | the time at which the action begins. more details about the action, for example, it can be a RENDER_ACTION, or a SAVE_ACTION. |
Reimplemented from ScEng::Block.
| void ScEng::DataTable::ActionEnd | ( | int | time, | |
| int | action | |||
| ) | [inline, virtual] |
Informs the block that an action will end.
| time | the time at which the action ends. more details about the action, for example, it can be a RENDER_ACTION, or a SAVE_ACTION. |
Reimplemented from ScEng::Block.
| void ScEng::DataTable::Update | ( | int | time | ) | [inline, virtual] |
Informs the block that it needs to update its data. For example, texture and material blocks usually move all their animated parameters from the data_table to int or float variables. This is specially useful when rendering, so there is no need to interpolate a data_value every time.
| time | the time at which the block needs to update its data. |
Reimplemented from ScEng::Block.
| void ScEng::DataTable::DependancyChanged | ( | Block * | dependancy, | |
| unsigned int | message = 0, |
|||
| unsigned int | parameters = 0 | |||
| ) | [inline, virtual] |
A block receives this message when one of its dependencies has changed.
| dependency | The dependancy that changed | |
| message | A message about the change |
Reimplemented from ScEng::Block.
BlockType ScEng::DataTable::block_type [static] |
The type of this block BlockType DataTable::block_type( BlockType::DATA, 0x01000000,0x00000020 )
1.5.1-p1