|
RAVE
|
This is a general file object. More...
#include "rave_object.h"#include "rave_value.h"#include "rave_types.h"#include "rave_list.h"#include "raveobject_list.h"#include "lazy_dataset.h"#include "rave_data2d.h"Go to the source code of this file.
Typedefs | |
| typedef enum FileObjectRestrictionMode | FileObjectRestrictionMode |
| typedef struct _FileObject_t | FileObject_t |
| Defines a general file object. | |
Enumerations | |
| enum | FileObjectRestrictionMode { FileObjectRestrictionMode_NONE =0 , FileObjectRestrictionMode_ODIM =1 } |
Functions | |
| FileObject_t * | FileObject_createRoot (void) |
| Creates the root group to get started. | |
| int | FileObject_setName (FileObject_t *self, const char *name) |
| Sets the name of this file object. | |
| const char * | FileObject_getName (FileObject_t *self) |
| int | FileObject_areNamesSet (FileObject_t *self) |
| Verifies that all names are set in self and all child groups. | |
| char * | FileObject_toString (FileObject_t *self) |
| Creates a string representation of the file object including subgroups and attributes. | |
| void | FileObject_setRestrictionMode (FileObject_t *self, FileObjectRestrictionMode mode) |
| Sets a restriction mode on the file object structure. | |
| FileObjectRestrictionMode | FileObject_getRestrictionMode (FileObject_t *self) |
| FileObject_t * | FileObject_get (FileObject_t *self, const char *name) |
| Gets the subgroup within self. | |
| FileObject_t * | FileObject_create (FileObject_t *self, const char *name) |
| Gets (or creates) the subgroup within self. | |
| size_t | FileObject_numberOfGroups (FileObject_t *self) |
| FileObject_t * | FileObject_getByIndex (FileObject_t *self, int index) |
| Returns the sub group at specified index. | |
| int | FileObject_exists (FileObject_t *self, const char *name) |
| RaveObjectList_t * | FileObject_groups (FileObject_t *self) |
| Returns the sub groups. | |
| RaveValue_t * | FileObject_attributes (FileObject_t *self) |
| Returns the attributes as a RaveValueHash. | |
| int | FileObject_addAttribute (FileObject_t *self, const char *name, RaveValue_t *value) |
| Adds an attribute to this group. | |
| RaveData2D_t * | FileObject_getData (FileObject_t *self) |
| int | FileObject_setData (FileObject_t *self, RaveData2D_t *data) |
| int | FileObject_isDataset (FileObject_t *self) |
| Returns if this group is a dataset node. | |
| int | FileObject_isDatasetLoaded (FileObject_t *self) |
| Checks if the data 2d field has been set. | |
| long | FileObject_getDatasetX (FileObject_t *self) |
| If this object is a dataset then this will return the xsize of the dataset. | |
| long | FileObject_getDatasetY (FileObject_t *self) |
| If this object is a dataset then this will return the ysize of the dataset. | |
| RaveDataType | FileObject_getDatasetType (FileObject_t *self) |
| If this object is a dataset then this will return the data type of the dataset. | |
| int | FileObject_setLazyDataset (FileObject_t *self, LazyDataset_t *lazyDataset) |
| Sets a lazy dataset in the file object. | |
Variables | |
| RaveCoreObjectType | FileObject_TYPE |
| Type definition to use when creating a rave object. | |
| typedef struct _FileObject_t FileObject_t |
Defines a general file object.
| int FileObject_addAttribute | ( | FileObject_t * | self, |
| const char * | name, | ||
| RaveValue_t * | value ) |
Adds an attribute to this group.
| [in] | self | - self |
| [in] | name | - name of the attribute |
| [in] | value | - the value that should be added |
| int FileObject_areNamesSet | ( | FileObject_t * | self | ) |
Verifies that all names are set in self and all child groups.
The root group is allowed to have an empty string as name. All childs must have a name != "".
| [in] | self | - self |
| RaveValue_t * FileObject_attributes | ( | FileObject_t * | self | ) |
Returns the attributes as a RaveValueHash.
| [in] | self | - self |
| FileObject_t * FileObject_create | ( | FileObject_t * | self, |
| const char * | name ) |
Gets (or creates) the subgroup within self.
Can specify more than one level of subgroup, for example it is allowed to call FileObject_get(self, "/this/that/group1"). Note, it is only group/dataset names that can be handled.
| [in] | self | - self |
| [in] | name | - name of group wanted |
| FileObject_t * FileObject_createRoot | ( | void | ) |
Creates the root group to get started.
| int FileObject_exists | ( | FileObject_t * | self, |
| const char * | name ) |
| [in] | self | - self |
| [in] | name | - name of the node that should be checked for |
| FileObject_t * FileObject_get | ( | FileObject_t * | self, |
| const char * | name ) |
Gets the subgroup within self.
Can specify more than one level of subgroup, for example it is allowed to call FileObject_get(self, "/this/that/group1"). Note, it is only group/dataset names that can be handled.
| [in] | self | - self |
| [in] | name | - name of group wanted |
| FileObject_t * FileObject_getByIndex | ( | FileObject_t * | self, |
| int | index ) |
Returns the sub group at specified index.
| [in] | self | - self |
| [in] | index | - index of group |
| RaveData2D_t * FileObject_getData | ( | FileObject_t * | self | ) |
| [in] | self | - self |
| RaveDataType FileObject_getDatasetType | ( | FileObject_t * | self | ) |
If this object is a dataset then this will return the data type of the dataset.
Can be useful if lazy loading is used and data not loaded.
| [in] | self | - self |
| long FileObject_getDatasetX | ( | FileObject_t * | self | ) |
If this object is a dataset then this will return the xsize of the dataset.
Can be useful if lazy loading is used and data not loaded.
| [in] | self | - self |
| long FileObject_getDatasetY | ( | FileObject_t * | self | ) |
If this object is a dataset then this will return the ysize of the dataset.
Can be useful if lazy loading is used and data not loaded.
| [in] | self | - self |
| const char * FileObject_getName | ( | FileObject_t * | self | ) |
| [in] | self | - self |
| FileObjectRestrictionMode FileObject_getRestrictionMode | ( | FileObject_t * | self | ) |
| [in] | self | - self |
| RaveObjectList_t * FileObject_groups | ( | FileObject_t * | self | ) |
Returns the sub groups.
| [in] | self |
| int FileObject_isDataset | ( | FileObject_t * | self | ) |
Returns if this group is a dataset node.
Can either be that the data 2d field is set or that a lazy dataset instance has been set in this object
| [in] | self | - self |
| int FileObject_isDatasetLoaded | ( | FileObject_t * | self | ) |
Checks if the data 2d field has been set.
I.e. if lazy dataset has been set but not loaded, then this method will return 0
| [in] | self | - self |
| size_t FileObject_numberOfGroups | ( | FileObject_t * | self | ) |
| [in] | self | - self |
| int FileObject_setData | ( | FileObject_t * | self, |
| RaveData2D_t * | data ) |
| [in] | self | - self |
| [in] | data | - the 2d data field |
| int FileObject_setLazyDataset | ( | FileObject_t * | self, |
| LazyDataset_t * | lazyDataset ) |
Sets a lazy dataset in the file object.
| [in] | self | - self |
| [in] | lazyDataset | - the lazy dataset |
| int FileObject_setName | ( | FileObject_t * | self, |
| const char * | name ) |
Sets the name of this file object.
| [in] | self | - self |
| [in] | name | - name of the file object. Must not contain '/'. |
| void FileObject_setRestrictionMode | ( | FileObject_t * | self, |
| FileObjectRestrictionMode | mode ) |
Sets a restriction mode on the file object structure.
For example if specifying ODIM, then datasets are not allowed to contain subgroups.
| [in] | self | - self |
| [in] | mode | - the mode to use |
| char * FileObject_toString | ( | FileObject_t * | self | ) |
Creates a string representation of the file object including subgroups and attributes.
Arrays in attributes and dataset values are not displayed.
| [in] | self | - self |
|
extern |
Type definition to use when creating a rave object.