9#ifndef CLASSDESC_POLYRESTPROCESS_H
10#define CLASSDESC_POLYRESTPROCESS_H
11#include "RESTProcess_base.h"
12#include "polyRESTProcessBase.h"
16 template <
class T,
class Base=PolyRESTProcessBase>
19 void RESTProcess(
RESTProcess_t& rp,
const string& d)
const override
20 {::RESTProcess(rp,d,
dynamic_cast<const T&
>(*
this));}
22 {::RESTProcess(rp,d,
dynamic_cast<T&
>(*
this));}
27 static std::string name()
28 {
return "classdesc::PolyRESTProcessBase";}
32 static std::string name()
33 {
return "classdesc::PolyRESTProcess<"+typeName<T>()+
">";}
38 rProcess(
T& a,
const string& remainder,
const REST_PROCESS_BUFFER& arguments)
44 return i->second->process(remainder,arguments);
46 return std::make_shared<RESTProcessVoid>();
50 typename enable_if<Not<is_base_of<PolyRESTProcessBase, T>>, RPPtr>::T
51 rProcess(T& a,
const string& remainder,
const REST_PROCESS_BUFFER& arguments)
53 return RESTProcessObject<T>(a).process(remainder, arguments);
Contains definitions related to classdesc functionality.
Definition polyRESTProcessBase.h:15
Definition polyRESTProcess.h:18
REST processor registry.
Definition RESTProcess_base.h:351
controlled template specialisation: stolen from boost::enable_if.
Definition classdesc.h:282
Definition classdesc.h:571