RAVE
rave_properties.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2025 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_PROPERTIES_H
27#define RAVE_PROPERTIES_H
28#include "rave_value.h"
29#include "rave_object.h"
30#include "odim_sources.h"
31
36
41
48//RaveProperties_t* RaveProperties_load(const char* filename);
49
56int RaveProperties_set(RaveProperties_t* self, const char* name, RaveValue_t* value);
57
64RaveValue_t* RaveProperties_get(RaveProperties_t* self, const char* name);
65
72int RaveProperties_hasProperty(RaveProperties_t* self, const char* name);
73
79void RaveProperties_remove(RaveProperties_t* self, const char* name);
80
87
94
100
101#endif /* RAVE_PROPERTIES */
Provides support for reading the odim sources from an xml-file This object supports RAVE_OBJECT_CLONE...
struct _OdimSources_t OdimSources_t
Defines the odim sources.
Definition odim_sources.h:35
Generic implementation of an object that is used within rave.
struct _raveobjecttype RaveCoreObjectType
The rave object type definition.
RaveCoreObjectType RaveProperties_TYPE
Type definition to use when creating a rave object.
Definition rave_properties.c:157
void RaveProperties_remove(RaveProperties_t *self, const char *name)
Removes the property from the set.
Definition rave_properties.c:123
OdimSources_t * RaveProperties_getOdimSources(RaveProperties_t *self)
Definition rave_properties.c:146
struct _RaveProperties_t RaveProperties_t
Defines the area registry.
Definition rave_properties.h:35
void RaveProperties_setOdimSources(RaveProperties_t *self, OdimSources_t *sources)
Sets the odim sources to the rave properties.
Definition rave_properties.c:137
int RaveProperties_size(RaveProperties_t *self)
Returns the number of properties.
Definition rave_properties.c:131
int RaveProperties_hasProperty(RaveProperties_t *self, const char *name)
Returns if the set contains the specified property.
Definition rave_properties.c:117
RaveValue_t * RaveProperties_get(RaveProperties_t *self, const char *name)
Returns the value with specified name.
Definition rave_properties.c:111
int RaveProperties_set(RaveProperties_t *self, const char *name, RaveValue_t *value)
Simplified loading function, takes filename and a projection registry.
Definition rave_properties.c:101
A value object that can represent standard types like int, double, .
struct _RaveValue_t RaveValue_t
Defines a rave value.
Definition rave_value.h:47
Represents the registry.
Definition rave_properties.c:38
OdimSources_t * sources
odim sources
Definition rave_properties.c:41