RAVE
compositegeneratorfactory.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2024 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------------------------------------------------------------------------*/
30#ifndef COMPOSITE_GENERATOR_FACTORY_H
31#define COMPOSITE_GENERATOR_FACTORY_H
32
33#include "compositearguments.h"
34#include "cartesian.h"
35#include "rave_object.h"
36#include "rave_types.h"
37#include "raveobject_list.h"
38#include "rave_field.h"
39#include "rave_properties.h"
40
45
49typedef const char*(*composite_generator_factory_getName_fun)(struct _CompositeGeneratorFactory_t* self);
50
54typedef const char*(*composite_generator_factory_getDefaultId_fun)(struct _CompositeGeneratorFactory_t* self);
55
60
65
69 typedef RaveProperties_t*(*composite_generator_factory_getProperties_fun)(struct _CompositeGeneratorFactory_t* self);
70
74typedef Cartesian_t*(*composite_generator_factory_generate_fun)(struct _CompositeGeneratorFactory_t* self, CompositeArguments_t* arguments);
75
82typedef struct _CompositeGeneratorFactory_t*(*composite_generator_factory_create_fun)(struct _CompositeGeneratorFactory_t* self);
83
88#define COMPOSITE_GENERATOR_FACTORY_HEAD \
89 composite_generator_factory_getName_fun getName; \
90 composite_generator_factory_getDefaultId_fun getDefaultId; \
91 composite_generator_factory_canHandle_fun canHandle; \
92 composite_generator_factory_setProperties_fun setProperties; \
93 composite_generator_factory_getProperties_fun getProperties; \
94 composite_generator_factory_generate_fun generate; \
95 composite_generator_factory_create_fun create;
96
104
110#define CompositeGeneratorFactory_getName(self) \
111 ((CompositeGeneratorFactory_t*)self)->getName((CompositeGeneratorFactory_t*)self)
112
118#define CompositeGeneratorFactory_getDefaultId(self) \
119 ((CompositeGeneratorFactory_t*)self)->getDefaultId((CompositeGeneratorFactory_t*)self)
120
124#define CompositeGeneratorFactory_canHandle(self, args) \
125 ((CompositeGeneratorFactory_t*)self)->canHandle((CompositeGeneratorFactory_t*)self, args)
126
133#define CompositeGeneratorFactory_setProperties(self, properties) \
134((CompositeGeneratorFactory_t*)self)->setProperties((CompositeGeneratorFactory_t*)self, properties)
135
141 #define CompositeGeneratorFactory_getProperties(self) \
142 ((CompositeGeneratorFactory_t*)self)->getProperties((CompositeGeneratorFactory_t*)self)
143
149#define CompositeGeneratorFactory_generate(self, args) \
150 ((CompositeGeneratorFactory_t*)self)->generate((CompositeGeneratorFactory_t*)self, args)
151
157#define CompositeGeneratorFactory_create(self) \
158 ((CompositeGeneratorFactory_t*)self)->create((CompositeGeneratorFactory_t*)self)
159
160#endif /* COMPOSITE_GENERATOR_FACTORY_H */
Defines the functions available when working with cartesian products.
struct _Cartesian_t Cartesian_t
Defines a Cartesian product.
Definition cartesian.h:43
The arguments that should be passed on to the composite generator.
struct _CompositeArguments_t CompositeArguments_t
Defines a Geographical Area.
Definition compositearguments.h:41
int(* composite_generator_factory_setProperties_fun)(struct _CompositeGeneratorFactory_t *self, RaveProperties_t *properties)
Sets properties in the factory.
Definition compositegeneratorfactory.h:64
struct _CompositeGeneratorFactory_t CompositeGeneratorFactory_t
The basic composite algorithm that can be cast into a subclassed processor.
int(* composite_generator_factory_canHandle_fun)(struct _CompositeGeneratorFactory_t *self, CompositeArguments_t *arguments)
Definition compositegeneratorfactory.h:59
#define COMPOSITE_GENERATOR_FACTORY_HEAD
The head part for a CompositeGeneratorFactory subclass.
Definition compositegeneratorfactory.h:88
Generic field that only provides a 2-dim data field and a number of dynamic attributes.
Generic implementation of an object that is used within rave.
#define RAVE_OBJECT_HEAD
Always should be at top of a struct that implements a RaveObject.
Definition rave_object.h:33
Property handling This object supports RAVE_OBJECT_CLONE.
struct _RaveProperties_t RaveProperties_t
Defines the area registry.
Definition rave_properties.h:35
Type definitions for RAVE.
Implementation of a rave object list that ensures that the objects contained within the list are rele...
The basic composite algorithm that can be cast into a subclassed processor.
Definition compositegeneratorfactory.h:100