RAVE
arearegistry.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2010 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------------------------------------------------------------------------*/
27#ifndef AREAREGISTRY_H
28#define AREAREGISTRY_H
29#include "area.h"
30#include "rave_object.h"
31#include "projectionregistry.h"
32
37
42
49AreaRegistry_t* AreaRegistry_load(const char* filename, ProjectionRegistry_t* pRegistry);
50
60int AreaRegistry_add(AreaRegistry_t* self, Area_t* area);
61
68
75Area_t* AreaRegistry_get(AreaRegistry_t* self, int index);
76
83Area_t* AreaRegistry_getByName(AreaRegistry_t* self, const char* id);
84
90void AreaRegistry_remove(AreaRegistry_t* self, int index);
91
97void AreaRegistry_removeByName(AreaRegistry_t* self, const char* id);
98
105
112
119int AreaRegistry_write(AreaRegistry_t* self, const char* filename);
120
121#endif /* AREAREGISTRY_H */
Defines an area, the extent, projection, etc.
RaveCoreObjectType AreaRegistry_TYPE
Type definition to use when creating a rave object.
Definition arearegistry.c:685
AreaRegistry_t * AreaRegistry_load(const char *filename, ProjectionRegistry_t *pRegistry)
Simplified loading function, takes filename and a projection registry.
Definition arearegistry.c:526
Area_t * AreaRegistry_get(AreaRegistry_t *self, int index)
Returns the area at specified index.
Definition arearegistry.c:557
Area_t * AreaRegistry_getByName(AreaRegistry_t *self, const char *id)
Returns the area with the specified id.
Definition arearegistry.c:563
void AreaRegistry_remove(AreaRegistry_t *self, int index)
Removes the area at the specified index.
Definition arearegistry.c:583
int AreaRegistry_add(AreaRegistry_t *self, Area_t *area)
Adds an area to the registry.
Definition arearegistry.c:541
void AreaRegistry_removeByName(AreaRegistry_t *self, const char *id)
Removes the area with the specified id.
Definition arearegistry.c:589
void AreaRegistry_setProjectionRegistry(AreaRegistry_t *self, ProjectionRegistry_t *registry)
Sets a projection registry to be able to fetch projections.
Definition arearegistry.c:608
ProjectionRegistry_t * AreaRegistry_getProjectionRegistry(AreaRegistry_t *self)
Sets a projection registry to be able to fetch projections.
Definition arearegistry.c:615
int AreaRegistry_write(AreaRegistry_t *self, const char *filename)
Writes the current registry to a xml file.
Definition arearegistry.c:621
int AreaRegistry_size(AreaRegistry_t *self)
Returns the number of registered areas.
Definition arearegistry.c:551
Provides support for reading and writing projections to and from an xml-file.
Generic implementation of an object that is used within rave.
Represents the registry.
Definition arearegistry.c:38
Represents the area.
Definition area.c:34
Represents the registry.
Definition projectionregistry.c:36
The rave object type definition.
Definition rave_object.h:52