RAVE
compositegeneratorfactory.h File Reference

Interface for defining your own compositing factory. More...

#include "compositearguments.h"
#include "cartesian.h"
#include "rave_object.h"
#include "rave_types.h"
#include "raveobject_list.h"
#include "rave_field.h"
#include "rave_properties.h"

Go to the source code of this file.

Classes

struct  _CompositeGeneratorFactory_t
 The basic composite algorithm that can be cast into a subclassed processor. More...
 

Macros

#define COMPOSITE_GENERATOR_FACTORY_HEAD
 The head part for a CompositeGeneratorFactory subclass.
 
#define CompositeGeneratorFactory_getName(self)
 Macro expansion for calling the name function.
 
#define CompositeGeneratorFactory_getDefaultId(self)
 Macro expansion for calling the default id function.
 
#define CompositeGeneratorFactory_canHandle(self, args)
 Macro expansion if this plugin supports generate or not.
 
#define CompositeGeneratorFactory_setProperties(self, properties)
 Macro expansion for calling the set properties function.
 
#define CompositeGeneratorFactory_getProperties(self)
 Macro expansion for calling the get properties function.
 
#define CompositeGeneratorFactory_generate(self, args)
 Macro expansion for calling the generate function.
 
#define CompositeGeneratorFactory_create(self)
 Macro expansion for initializing the plugin.
 

Typedefs

typedef const char *(* composite_generator_factory_getName_fun) (struct _CompositeGeneratorFactory_t *self)
 
typedef const char *(* composite_generator_factory_getDefaultId_fun) (struct _CompositeGeneratorFactory_t *self)
 
typedef int(* composite_generator_factory_canHandle_fun) (struct _CompositeGeneratorFactory_t *self, CompositeArguments_t *arguments)
 
typedef int(* composite_generator_factory_setProperties_fun) (struct _CompositeGeneratorFactory_t *self, RaveProperties_t *properties)
 Sets properties in the factory.
 
typedef RaveProperties_t *(* composite_generator_factory_getProperties_fun) (struct _CompositeGeneratorFactory_t *self)
 
typedef Cartesian_t *(* composite_generator_factory_generate_fun) (struct _CompositeGeneratorFactory_t *self, CompositeArguments_t *arguments)
 
typedef struct _CompositeGeneratorFactory_t *(* composite_generator_factory_create_fun) (struct _CompositeGeneratorFactory_t *self)
 The factory creation method for the generator.
 
typedef struct _CompositeGeneratorFactory_t CompositeGeneratorFactory_t
 The basic composite algorithm that can be cast into a subclassed processor.
 

Detailed Description

Interface for defining your own compositing factory.

If CompositeGeneratorFactory_canHandle(...) returns true, then CompositeGeneratorFactory_generate(....) will be called.

NOTE! It is essential that the factory implements the copy constructor since the factory will be set in the manager and the manager keeps a list of instances.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2024-10-10

Macro Definition Documentation

◆ COMPOSITE_GENERATOR_FACTORY_HEAD

#define COMPOSITE_GENERATOR_FACTORY_HEAD
Value:
RaveProperties_t *(* composite_generator_factory_getProperties_fun)(struct _CompositeGeneratorFactory_t *self)
Definition compositegeneratorfactory.h:69
int(* composite_generator_factory_setProperties_fun)(struct _CompositeGeneratorFactory_t *self, RaveProperties_t *properties)
Sets properties in the factory.
Definition compositegeneratorfactory.h:64
Cartesian_t *(* composite_generator_factory_generate_fun)(struct _CompositeGeneratorFactory_t *self, CompositeArguments_t *arguments)
Definition compositegeneratorfactory.h:74
const char *(* composite_generator_factory_getName_fun)(struct _CompositeGeneratorFactory_t *self)
Definition compositegeneratorfactory.h:49
const char *(* composite_generator_factory_getDefaultId_fun)(struct _CompositeGeneratorFactory_t *self)
Definition compositegeneratorfactory.h:54
struct _CompositeGeneratorFactory_t *(* composite_generator_factory_create_fun)(struct _CompositeGeneratorFactory_t *self)
The factory creation method for the generator.
Definition compositegeneratorfactory.h:82
int(* composite_generator_factory_canHandle_fun)(struct _CompositeGeneratorFactory_t *self, CompositeArguments_t *arguments)
Definition compositegeneratorfactory.h:59

The head part for a CompositeGeneratorFactory subclass.

Should be placed directly under RAVE_OBJECT_HEAD like in CompositeGeneratorFactory_t.

◆ CompositeGeneratorFactory_canHandle

#define CompositeGeneratorFactory_canHandle ( self,
args )
Value:
((CompositeGeneratorFactory_t*)self)->canHandle((CompositeGeneratorFactory_t*)self, args)
struct _CompositeGeneratorFactory_t CompositeGeneratorFactory_t
The basic composite algorithm that can be cast into a subclassed processor.

Macro expansion if this plugin supports generate or not.

◆ CompositeGeneratorFactory_create

#define CompositeGeneratorFactory_create ( self)
Value:

Macro expansion for initializing the plugin.

Parameters
[in]self- self
Returns
1 on success otherwise 0

◆ CompositeGeneratorFactory_generate

#define CompositeGeneratorFactory_generate ( self,
args )
Value:

Macro expansion for calling the generate function.

Parameters
[in]self- self
Returns
The cartesian product on success

◆ CompositeGeneratorFactory_getDefaultId

#define CompositeGeneratorFactory_getDefaultId ( self)
Value:

Macro expansion for calling the default id function.

Parameters
[in]self- self
Returns
the default id for this factory

◆ CompositeGeneratorFactory_getName

#define CompositeGeneratorFactory_getName ( self)
Value:

Macro expansion for calling the name function.

Parameters
[in]self- self
Returns
the unique name for this algorithm

◆ CompositeGeneratorFactory_getProperties

#define CompositeGeneratorFactory_getProperties ( self)
Value:

Macro expansion for calling the get properties function.

Parameters
[in]self- self
Returns
the properties or NULL

◆ CompositeGeneratorFactory_setProperties

#define CompositeGeneratorFactory_setProperties ( self,
properties )
Value:
((CompositeGeneratorFactory_t*)self)->setProperties((CompositeGeneratorFactory_t*)self, properties)

Macro expansion for calling the set properties function.

Parameters
[in]self- self
[in]properties- properties
Returns
1 on success otherwise 0

Typedef Documentation

◆ composite_generator_factory_canHandle_fun

typedef int(* composite_generator_factory_canHandle_fun) (struct _CompositeGeneratorFactory_t *self, CompositeArguments_t *arguments)
Returns
if this factory can handle the generator request

◆ composite_generator_factory_create_fun

typedef struct _CompositeGeneratorFactory_t *(* composite_generator_factory_create_fun) (struct _CompositeGeneratorFactory_t *self)

The factory creation method for the generator.

Should return a (new) instance of the factory. After a factory has been registered in the composite generator it will create a new factory of this same instance each time a call to generate is called.

Returns
1 on success otherwise 0

◆ composite_generator_factory_generate_fun

typedef Cartesian_t *(* composite_generator_factory_generate_fun) (struct _CompositeGeneratorFactory_t *self, CompositeArguments_t *arguments)
Returns
the result from the generation

◆ composite_generator_factory_getDefaultId_fun

typedef const char *(* composite_generator_factory_getDefaultId_fun) (struct _CompositeGeneratorFactory_t *self)
Returns
the default id for this this composite generator factory

◆ composite_generator_factory_getName_fun

typedef const char *(* composite_generator_factory_getName_fun) (struct _CompositeGeneratorFactory_t *self)
Returns
the unique name for this composite generator factory

◆ composite_generator_factory_getProperties_fun

typedef RaveProperties_t *(* composite_generator_factory_getProperties_fun) (struct _CompositeGeneratorFactory_t *self)
Returns
properties from the factory

◆ composite_generator_factory_setProperties_fun

typedef int(* composite_generator_factory_setProperties_fun) (struct _CompositeGeneratorFactory_t *self, RaveProperties_t *properties)

Sets properties in the factory.

◆ CompositeGeneratorFactory_t

The basic composite algorithm that can be cast into a subclassed processor.