tblite
Light-weight tight-binding framework
|
Provides a representation of a generic table data structure. More...
Go to the source code of this file.
Macros | |
#define | tblite_table_set_value(error, table, key, value, ...) |
Typedefs | |
typedef struct _tblite_table * | tblite_table |
Functions | |
TBLITE_API_ENTRY tblite_table TBLITE_API_CALL | tblite_new_table (tblite_table *table) |
TBLITE_API_ENTRY void TBLITE_API_CALL | tblite_delete_table (tblite_table *table) |
TBLITE_API_ENTRY void TBLITE_API_CALL | tblite_table_set_double (tblite_error error, tblite_table table, char key[], double *value, int n) |
TBLITE_API_ENTRY void TBLITE_API_CALL | tblite_table_set_int64_t (tblite_error error, tblite_table table, char key[], int64_t *value, int n) |
TBLITE_API_ENTRY void TBLITE_API_CALL | tblite_table_set_bool (tblite_error error, tblite_table table, char key[], bool *value, int n) |
TBLITE_API_ENTRY void TBLITE_API_CALL | tblite_table_set_char (tblite_error error, tblite_table table, char key[], char(*value)[], int n) |
TBLITE_API_ENTRY tblite_table TBLITE_API_CALL | tblite_table_add_table (tblite_error error, tblite_table table, char key[]) |
Provides a representation of a generic table data structure.
Used to mirror the data available in the tblite_param object. It aims to provide a programmatic accessible representation of the parametrization records.
#define tblite_table_set_value | ( | error, | |
table, | |||
key, | |||
value, | |||
... ) |
Generic setter based on the type of the value
error | Error handle |
table | Table data structure |
key | Key to set value at |
value | Value to set at key |
typedef struct _tblite_table* tblite_table |
Handle for holding a table data structure
The table can either own its data or reference another table. Table references can be created from existing table data structures or by adding new table entries into an existing table, which returns a reference to the newly created table.
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_delete_table | ( | tblite_table * | table | ) |
Delete a data table object
table | Table object to be deleted |
TBLITE_API_ENTRY tblite_table TBLITE_API_CALL tblite_new_table | ( | tblite_table * | table | ) |
Create new data table object
table | Table object to reference in new table (optional) |
TBLITE_API_ENTRY tblite_table TBLITE_API_CALL tblite_table_add_table | ( | tblite_error | error, |
tblite_table | table, | ||
char | key[] ) |
Create new subtable in existing data table
error | Error handle |
table | Table data structure |
key | Key to add new subtable at |
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_table_set_bool | ( | tblite_error | error, |
tblite_table | table, | ||
char | key[], | ||
bool * | value, | ||
int | n ) |
Set boolean value to data table
error | Error handle |
table | Table data structure |
key | Key to set value at |
value | Boolean value or array to add to table |
n | Number of entries to add, 0 for adding scalars |
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_table_set_char | ( | tblite_error | error, |
tblite_table | table, | ||
char | key[], | ||
char(*) | value[], | ||
int | n ) |
Set character string to data table
error | Error handle |
table | Table data structure |
key | Key to set value at |
value | Character value or array to add to table |
n | Number of entries to add, 0 for adding scalars |
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_table_set_double | ( | tblite_error | error, |
tblite_table | table, | ||
char | key[], | ||
double * | value, | ||
int | n ) |
Set floating point number to data table
error | Error handle |
table | Table data structure |
key | Key to set value at |
value | Double value or array to add to table |
n | Number of entries to add, 0 for adding scalars |
TBLITE_API_ENTRY void TBLITE_API_CALL tblite_table_set_int64_t | ( | tblite_error | error, |
tblite_table | table, | ||
char | key[], | ||
int64_t * | value, | ||
int | n ) |
Set integer number to data table (use int64_t rather than long)
error | Error handle |
table | Table data structure |
key | Key to set value at |
value | Integer value or array to add to table |
n | Number of entries to add, 0 for adding scalars |