sisi4s
Loading...
Searching...
No Matches
Algorithm.hpp File Reference
#include <Data.hpp>
#include <string>
#include <vector>
#include <sstream>
#include <util/Tensor.hpp>
Include dependency graph for Algorithm.hpp:

Go to the source code of this file.

Classes

class  sisi4s::Argument
 
class  sisi4s::Algorithm
 
class  sisi4s::AlgorithmFactory
 
class  sisi4s::AlgorithmRegistrar< AlgorithmType >
 Class to be statically instantiated by an algorithm to register it in the AlgorithmFactory. Registered algorithms can be instantiated from the sisi4s control language. More...
 

Namespaces

namespace  sisi4s
 

Macros

#define ALGORITHM_REGISTRAR_DECLARATION(NAME)
 Auxiliary macro declaring the algorithm registrar for the algorithm type of the given name. This macro is to be used in the algorith declaration within the .hpp file. Note that name is a symbol name not a string.
 
#define ALGORITHM_REGISTRAR_DEFINITION(NAME)    sisi4s::AlgorithmRegistrar<NAME> NAME::registrar_(#NAME)
 Auxiliary macro defining the algorithm registrar for the algorithm type of the given name. This macro is to be used in the algorithm definition within the .cxx file. Note that name is a symbol name not a string.
 
#define IMPLEMENT_ALGORITHM(NAME)
 
#define DEFINE_ALGORITHM_HEADER(NAME, ...)
 

Functions

template<typename AlgorithmType >
Algorithmsisi4s::createAlgorithm (std::vector< Argument > const &arguments)
 template function creating an instance of the given class.
 

Macro Definition Documentation

◆ ALGORITHM_REGISTRAR_DECLARATION

#define ALGORITHM_REGISTRAR_DECLARATION (   NAME)
Value:
virtual std::string getName() { return #NAME; } \
Class to be statically instantiated by an algorithm to register it in the AlgorithmFactory....
Definition Algorithm.hpp:151

Auxiliary macro declaring the algorithm registrar for the algorithm type of the given name. This macro is to be used in the algorith declaration within the .hpp file. Note that name is a symbol name not a string.

◆ ALGORITHM_REGISTRAR_DEFINITION

#define ALGORITHM_REGISTRAR_DEFINITION (   NAME)     sisi4s::AlgorithmRegistrar<NAME> NAME::registrar_(#NAME)

Auxiliary macro defining the algorithm registrar for the algorithm type of the given name. This macro is to be used in the algorithm definition within the .cxx file. Note that name is a symbol name not a string.

◆ DEFINE_ALGORITHM_HEADER

#define DEFINE_ALGORITHM_HEADER (   NAME,
  ... 
)
Value:
class NAME : public Algorithm { \
public: \
ALGORITHM_REGISTRAR_DECLARATION(NAME); \
NAME(std::vector<Argument> const &argumentList) \
: Algorithm(argumentList) {} \
~NAME() {} \
virtual void run(); \
__VA_ARGS__ \
}

◆ IMPLEMENT_ALGORITHM

#define IMPLEMENT_ALGORITHM (   NAME)
Value:
void NAME::run()
#define ALGORITHM_REGISTRAR_DEFINITION(NAME)
Auxiliary macro defining the algorithm registrar for the algorithm type of the given name....
Definition Algorithm.hpp:178