Top | ![]() |
![]() |
![]() |
![]() |
BData * | b_data_dup () |
BData * | b_data_dup_to_simple () |
gint64 | b_data_get_timestamp () |
char * | b_data_serialize () |
void | b_data_emit_changed () |
gboolean | b_data_has_value () |
char | b_data_get_n_dimensions () |
unsigned int | b_data_get_n_values () |
GObject ╰── GInitiallyUnowned ╰── BData ├── BMatrix ├── BVector ├── BScalar ╰── BStruct
Abstract base class for data classes, including BScalar, BVector, and BMatrix, representing single numbers or arrays of numbers, respectively.
Data objects can maintain a cache for fast access. When the underlying data
changes, the "changed" signal is emitted, and the default signal handler
invalidates the cache. Subsequent calls to "get_values" will refill the
cache. The size of the array and minimum and maximum values are also cached.
Depending on the implementation, the get_value()
functions (for getting
single values) may not refill the cache.
Data objects also maintain a timestamp that updates when the "changed" signal is emitted.
BData *
b_data_dup_to_simple (BData *src
);
Duplicates a BData object, creating a simple data object of the same size and contents. So for example, any subclass of BVector is duplicated as a BValVector.
gint64
b_data_get_timestamp (BData *data
);
Returns a timestamp (microseconds since January 1, 1970, UTC) giving the last time the data changed.
gboolean
b_data_has_value (BData *data
);
Returns whether data
contains a finite value.
char
b_data_get_n_dimensions (BData *data
);
Get the number of dimensions in data
, i.e. 0 for a scalar, 1 for a vector,
and 2 for a matrix. Returns -1 for a struct.
struct BDataClass { GObjectClass base; BData *(*dup) (BData * src); char *(*serialize) (BData * dat, gpointer user); char (*get_sizes) (BData * data, unsigned int *sizes); gboolean (*has_value) (BData *data); /* signals */ void (*emit_changed) (BData * data); };
Class for BData.
base class. |
||
duplicates the BData. |
||
serializes to text. |
||
gets the size of each dimension and returns the number of dimensions. |
||
returns whether data has a finite value. |
||
changed signal default handler |
“changed”
signalvoid user_function (BData *BData, gpointer user_data)
The ::changed signal is emitted when the data changes.
BData |
the data object that changed |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Recursion