RAVE
rave_attribute_table.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2009 Swedish Meteorological and Hydrological Institute, SMHI,
3
4This file is part of RAVE.
5
6RAVE is free software: you can redistribute it and/or modify
7it under the terms of the GNU Lesser General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
10
11RAVE is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU Lesser General Public License for more details.
15
16You should have received a copy of the GNU Lesser General Public License
17along with RAVE. If not, see <http://www.gnu.org/licenses/>.
18------------------------------------------------------------------------*/
26#ifndef RAVE_ATTRIBUTE_TABLE_H
27#define RAVE_ATTRIBUTE_TABLE_H
28
29#include "rave_object.h"
31#include "rave_attribute.h"
32#include "rave_types.h"
33
38
43
53
62
71
81
89
98
105
112int RaveAttributeTable_hasAttribute(RaveAttributeTable_t* self, const char* key);
113
121
127
137
148
156
165
166
173
181int RaveAttributeTable_shiftAttribute(RaveAttributeTable_t* self, const char* name, int nx);
182
190int RaveAttributeTable_shiftAttributeIfExists(RaveAttributeTable_t* self, const char* name, int nx);
191
197
198
199#endif /* RAVE_ATTRIBUTE_TABLE_H */
Used for keeping track on attributes.
RaveObjectList_t * RaveAttributeTable_getValues(RaveAttributeTable_t *self)
Returns the values for the table.
Definition rave_attribute_table.c:509
RaveCoreObjectType RaveAttributeTable_TYPE
Type definition to use when creating a rave object.
Definition rave_attribute_table.c:597
int RaveAttributeTable_setVersion(RaveAttributeTable_t *self, RaveIO_ODIM_Version version)
Sets the default version to use for the attribute tables.
Definition rave_attribute_table.c:168
int RaveAttributeTable_shiftAttributeIfExists(RaveAttributeTable_t *self, const char *name, int nx)
Performs a circular shift of an array attribute if it exists.
Definition rave_attribute_table.c:573
RaveObjectList_t * RaveAttributeTable_getValuesVersion(RaveAttributeTable_t *self, RaveIO_ODIM_Version version)
Returns the values for the table.
Definition rave_attribute_table.c:515
int RaveAttributeTable_addAttributeVersion(RaveAttributeTable_t *self, RaveAttribute_t *attr, RaveIO_ODIM_Version version, RaveAttribute_t **translation)
Adds an attribute to the attribute table.
Definition rave_attribute_table.c:190
RaveAttribute_t * RaveAttributeTable_getAttribute(RaveAttributeTable_t *self, const char *attrname)
Returns an attribute from the attribute table according to default version.
Definition rave_attribute_table.c:309
int RaveAttributeTable_addAttribute(RaveAttributeTable_t *self, RaveAttribute_t *attr, RaveAttribute_t **translation)
Adds an attribute to the attribute table.
Definition rave_attribute_table.c:184
RaveList_t * RaveAttributeTable_getAttributeNames(RaveAttributeTable_t *self)
Returns the keys for the table at the current state.
Definition rave_attribute_table.c:493
int RaveAttributeTable_size(RaveAttributeTable_t *self)
Returns the number of items in this table.
Definition rave_attribute_table.c:469
RaveList_t * RaveAttributeTable_getAttributeNamesVersion(RaveAttributeTable_t *self, RaveIO_ODIM_Version version)
Returns the keys for the table at the current state.
Definition rave_attribute_table.c:499
RaveObjectList_t * RaveAttributeTable_getInternalValues(RaveAttributeTable_t *self)
Returns the internal values for the table.
Definition rave_attribute_table.c:550
RaveAttribute_t * RaveAttributeTable_removeAttribute(RaveAttributeTable_t *self, const char *key)
Removes the item with the specified key and returns it.
Definition rave_attribute_table.c:481
int RaveAttributeTable_hasAttribute(RaveAttributeTable_t *self, const char *key)
Returns if the specified key exists or not.
Definition rave_attribute_table.c:475
void RaveAttributeTable_destroyKeyList(RaveList_t *l)
Helper function to destroy the returned list of keys.
Definition rave_attribute_table.c:590
RaveIO_ODIM_Version RaveAttributeTable_getVersion(RaveAttributeTable_t *self)
Returns the default version to use for the attribute tables.
Definition rave_attribute_table.c:178
int RaveAttributeTable_shiftAttribute(RaveAttributeTable_t *self, const char *name, int nx)
Performs a circular shift of an array attribute.
Definition rave_attribute_table.c:556
void RaveAttributeTable_clear(RaveAttributeTable_t *self)
Clears all entries in the table.
Definition rave_attribute_table.c:487
RaveAttribute_t * RaveAttributeTable_getAttributeVersion(RaveAttributeTable_t *self, const char *attrname, RaveIO_ODIM_Version version)
Returns an attribute from the attribute table according to specified version.
Definition rave_attribute_table.c:315
Generic implementation of an object that is used within rave.
Type definitions for RAVE.
RaveIO_ODIM_Version
The /Conventions version in a ODIM HDF5 file.
Definition rave_types.h:43
Implementation of a rave object hashtable that maps between strings and rave core objects.
Represents one scan in a volume.
Definition rave_attribute_table.c:39
RAVE_OBJECT_HEAD RaveIO_ODIM_Version version
Always on top.
Definition rave_attribute_table.c:41
Represents one scan in a volume.
Definition rave_attribute.c:46
Represents a list.
Definition rave_list.c:36
Represents a list.
Definition raveobject_list.c:35
The rave object type definition.
Definition rave_object.h:52