Class
NumCosmoMathSerialize
Description [src]
final class NumCosmoMath.Serialize : GObject.Object
{
/* No available fields */
}
Serialization, deserialization and duplication object.
This object provides serialization, deserialization and duplication of objects. The serialization process is based on the GObject object system.
Serialization is the process of converting an object into a stream of bytes to store the object or transmit it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization.
One support for serialized data GVariant. The GVariant is a type-safe, reference counted, immutable, and memory-efficient container for arbitrary data. It is a generic container that can hold any type of data, including basic types such as integers and floating point numbers, strings, and byte arrays, as well as more complex types such as tuples, dictionaries, and variants. The GVariant type system is designed to be extensible, so that new types can be added in the future. A serialized GVariant object can be stored in binary or text format.
Functions
ncm_serialize_global_count_saved_serializations
Global version of ncm_serialize_count_saved_serializations().
ncm_serialize_global_reset
Releases all objects in global NcmSerialize and erase
all serialized objects.
ncm_serialize_global_variant_to_yaml
Global version of ncm_serialize_variant_to_yaml(). Converts a GObject serialized to a GVariant to a YAML string.
Instance methods
ncm_serialize_array_from_key_file
Loads a NcmObjArray from a file using a NcmSerialize and a GKeyFile.
ncm_serialize_array_from_yaml
Parses the serialized string in yaml_obj and returns an array of newly created objects.
ncm_serialize_array_from_yaml_file
Parses the YAML in filename and returns an array of newly created objects.
ncm_serialize_array_to_yaml_file
Saves a NcmObjArray to a file using a NcmSerialize and a YAML string.
ncm_serialize_clear_instances
Releases all objects in ser. If autosave_only is TRUE
it will release only autosaved objects.
ncm_serialize_dict_int_from_yaml
Parses the serialized string in yaml_obj and returns a NcmObjDictInt containing
the object names as keys and the serialized objects as values.
ncm_serialize_dict_int_from_yaml_file
Parses the YAML in filename and returns a NcmObjDictInt containing.
ncm_serialize_dict_int_to_yaml_file
Saves a NcmObjDictInt to a file using a NcmSerialize and a YAML string.
ncm_serialize_dict_str_from_binfile
Parses the serialized binary data in filename and returns the newly created NcmObjDictStr.
ncm_serialize_dict_str_from_yaml
Parses the serialized string in yaml_obj and returns a NcmObjDictStr containing
the object names as keys and the serialized objects as values.
ncm_serialize_dict_str_from_yaml_file
Parses the YAML in filename and returns a NcmObjDictStr containing.
ncm_serialize_dict_str_to_yaml_file
Saves a NcmObjDictStr to a file using a NcmSerialize and a YAML string.
ncm_serialize_from_binfile
Parses the serialized binary data in filename and returns the newly created object.
ncm_serialize_from_file
Parses the serialized string in filename and returns the newly created object.
ncm_serialize_from_name_params
Parses the serialized parameters and returns the newly created object using them.
ncm_serialize_from_yaml
Parses the serialized string in yaml_obj and returns the newly created object.
ncm_serialize_get_by_name
Gets a new reference for the instance name or null if there isn’t a instance named name.
ncm_serialize_is_named
Checks if serobj is a named serialized object, if so sets its name in name
and returns TRUE.
ncm_serialize_peek_name
Gets the named associated to the instance obj, it is an error to call this function
when the obj is not contained in ser.
ncm_serialize_remove_ser
Removes the object obj to ser using name, it does nothing
if the instance obj is not present in ser.
ncm_serialize_reset
Releases all objects in ser and erase all serialized
objects. If autosave_only is TRUE it will release only
autosaved objects.
ncm_serialize_set_property_from_key_file
Deserializes the set of object properties in prop_file and sets the obj.
ncm_serialize_unset
Removes the object obj to ser using name, it does nothing
if the instance obj is not present in ser.
ncm_serialize_var_dict_from_variant_file
Parses the serialized string in filename and returns a NcmVarDict containing
the object names as keys and the serialized objects as values.
ncm_serialize_var_dict_from_yaml
Parses the serialized string in yaml_obj and returns a NcmVarDict containing
the object names as keys and the serialized objects as values.
ncm_serialize_var_dict_from_yaml_file
Parses the YAML in filename and returns a NcmVarDict containing
the element names as keys and their values.
ncm_serialize_var_dict_to_yaml_file
Saves a NcmVarDict to a file using a NcmSerialize and a YAML string.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.