Classdesc 3.44
RESTProcess_t Struct Reference

REST processor registry. More...

#include <RESTProcess_base.h>

Inheritance diagram for RESTProcess_t:
Inheritance graph
Collaboration diagram for RESTProcess_t:
Collaboration graph

Public Member Functions

template<class T>
 RESTProcess_t (T &obj)
 RESTProcess_t (const RPPtr &p)
 Construct from an object that RPPPtr wraps.
void add (string d, RESTProcessBase *rp)
 ownership of rp is passed
void add (string d, RESTProcessFunctionBase *rp)
 ownership of rp is passed
RPPtr process (const std::string &query, const REST_PROCESS_BUFFER &jin)
template<class F>
void defineFunctionArgTypes ()
 define all arguments of F
template<class T, class... Args>
void addFactory (const std::string &typeName, const std::function< void(const std::string &objName)> &callback=nullptr)

Detailed Description

REST processor registry.

Constructor & Destructor Documentation

◆ RESTProcess_t()

template<class T>
RESTProcess_t ( T & obj)

populate this map with the members of obj. T must be a classdescified type, otherwise this is equivalent to a default contructor

Member Function Documentation

◆ addFactory()

template<class T, class... A>
void addFactory ( const std::string & typeName,
const std::function< void(const std::string &objName)> & callback = nullptr )

adds a factory function for creating objects of type T.

Template Parameters
Ttype of objects this factory will create
Argsare the types of arguments to be passed to T's constructor
Parameters
typeNamealias for the factory - usually the unqualified type name
callbackan optional callback that is run whenever a new object is created The factory gets called with a string argument giving the new objects name in the registry, followed by the arguments for T's constructor, if any

References add().


The documentation for this struct was generated from the following files: