Classdesc 3.44
|
interface for the REST processor More...
#include <RESTProcess_base.h>
Public Member Functions | |
virtual RPPtr | process (const string &path, const REST_PROCESS_BUFFER &arguments)=0 |
virtual REST_PROCESS_BUFFER | asBuffer () const =0 |
virtual std::vector< Signature > | signature () const =0 |
return signature(s) of the operations | |
virtual RESTProcess_t | list () const =0 |
return list of subcommands to this | |
virtual std::string | type () const =0 |
return type name of this | |
virtual void | populate (RESTProcess_t &map) const |
populate map from the object wrapped by this, if any | |
template<class F> | |
Signature | functionSignature () const |
return signature for a function type F | |
template<class T> | |
T * | getObject () |
returns a pointer to the underlying object if it is one of type T, otherwise null | |
virtual bool | isObject () const |
virtual bool | isConst () const |
true if this is a const object, a const member function or static/free function | |
virtual unsigned | arity () const |
arity if this is a function, 0 otherwise | |
virtual size_t | size () const |
size if this is a container, 0 otherwise | |
virtual RPPtr | getElem (const REST_PROCESS_BUFFER &) |
get element by position for sequences, by key for associative containers | |
virtual RPPtr | setElem (const REST_PROCESS_BUFFER &index, const REST_PROCESS_BUFFER &value) |
virtual void | insert (const REST_PROCESS_BUFFER &value) |
append to end of a sequence, or inserts key into an associative container | |
virtual void | erase (const REST_PROCESS_BUFFER &index) |
erase an element - by position for sequences, by key for associative containers | |
virtual bool | contains (const REST_PROCESS_BUFFER &key) const |
returns true if an associative container contains key | |
virtual RPPtr | keys () const |
returns a list of keys if this is an associative container, otherwise void | |
virtual object * | getClassdescObject () |
returns a classdesc object if referring to an object derived from classdesc::object | |
virtual const object * | getConstClassdescObject () |
Protected Member Functions | |
template<class T> | |
enable_if< is_base_of< object, T >, constobject * >::T | getClassdescObjectImpl (T &obj) |
implementation of upcasting to a classdesc::object | |
template<class T> | |
enable_if< Not< is_base_of< object, T > >, constobject * >::T | getClassdescObjectImpl (T &obj) |
interface for the REST processor
|
inlinevirtual |
arity if this is a function, 0 otherwise
Reimplemented in RESTProcessFunction< F, R >, and RESTProcessFunction< F, std::unique_ptr< R > >.
|
inlinevirtual |
returns true if an associative container contains key
Reimplemented in RESTProcessAssociativeContainer< T >.
|
inlinevirtual |
erase an element - by position for sequences, by key for associative containers
Reimplemented in RESTProcessAssociativeContainer< T >, RESTProcessSequence< T >, and RESTProcessSequence< classdesc::MultiArray< T, 1 > >.
|
inlinevirtual |
returns a classdesc object if referring to an object derived from classdesc::object
Reimplemented in RESTProcessObject< T >, RESTProcessPtr< T >, RESTProcessPtr< classdesc::weak_ptr< T > >, RESTProcessPtr< const classdesc::weak_ptr< T > >, RESTProcessPtr< std::unique_ptr< T > >, RESTProcessWeakPtr< T >, RESTProcessWeakPtr< classdesc::weak_ptr< T > >, and RESTProcessWeakPtr< const classdesc::weak_ptr< T > >.
|
inlinevirtual |
get element by position for sequences, by key for associative containers
Reimplemented in RESTProcessAssociativeContainer< T >, RESTProcessMultiArray< T >, RESTProcessMultiArray< classdesc::MultiArray< T, 1 > >, RESTProcessMultiArray< classdesc::MultiArray< T, 1 > >, RESTProcessMultiArray< MultiArray< T, NumArgs< Args... >::value > >, RESTProcessObject< T >, RESTProcessSequence< T >, and RESTProcessSequence< classdesc::MultiArray< T, 1 > >.
Referenced by RESTProcessObject< T >::getElem(), and setElem().
|
inlinevirtual |
append to end of a sequence, or inserts key into an associative container
Reimplemented in RESTProcessAssociativeContainer< T >, RESTProcessSequence< T >, and RESTProcessSequence< classdesc::MultiArray< T, 1 > >.
|
inlinevirtual |
true if this is a const object, a const member function or static/free function
Reimplemented in RESTProcessFunction< F, R >, RESTProcessFunction< F, std::unique_ptr< R > >, RESTProcessObject< T >, and RESTProcessVoid.
|
inlinevirtual |
true if this is an object, not a function
Reimplemented in RESTProcessAssociativeContainer< T >, RESTProcessFunction< F, R >, RESTProcessFunction< F, std::unique_ptr< R > >, RESTProcessHeapObject< T >, RESTProcessMultiArray< T >, RESTProcessMultiArray< classdesc::MultiArray< T, 1 > >, RESTProcessMultiArray< MultiArray< T, NumArgs< Args... >::value > >, RESTProcessObject< T >, RESTProcessPtr< T >, RESTProcessPtr< classdesc::weak_ptr< T > >, RESTProcessPtr< const classdesc::weak_ptr< T > >, RESTProcessPtr< std::unique_ptr< T > >, RESTProcessSequence< T >, RESTProcessSequence< classdesc::MultiArray< T, 1 > >, RESTProcessWeakPtr< T >, RESTProcessWeakPtr< classdesc::weak_ptr< T > >, and RESTProcessWeakPtr< const classdesc::weak_ptr< T > >.
|
inlinevirtual |
returns a list of keys if this is an associative container, otherwise void
Reimplemented in RESTProcessAssociativeContainer< T >.
|
pure virtual |
return list of subcommands to this
Implemented in RESTProcessAssociativeContainer< T >, RESTProcessEnum< E >, RESTProcessFunction< F, R >, RESTProcessFunction< F, std::unique_ptr< R > >, RESTProcessFunction< F, std::unique_ptr< R > >, RESTProcessMultiArray< T >, RESTProcessMultiArray< classdesc::MultiArray< T, 1 > >, RESTProcessMultiArray< MultiArray< T, NumArgs< Args... >::value > >, RESTProcessObject< T >, RESTProcessOverloadedFunction, RESTProcessPtr< T >, RESTProcessPtr< classdesc::weak_ptr< T > >, RESTProcessPtr< const classdesc::weak_ptr< T > >, RESTProcessPtr< std::unique_ptr< T > >, RESTProcessSequence< T >, RESTProcessSequence< classdesc::MultiArray< T, 1 > >, RESTProcessVoid, RESTProcessWeakPtr< T >, RESTProcessWeakPtr< classdesc::weak_ptr< T > >, and RESTProcessWeakPtr< const classdesc::weak_ptr< T > >.
|
inlinevirtual |
populate map from the object wrapped by this, if any
Reimplemented in RESTProcessObject< T >.
|
pure virtual |
perform the REST operation, with path being the path string and arguments as body text result of operation is returned as an object, and can be serialised into REST_PROCESS_BUFFER using asBuffer
Implemented in RESTProcessAssociativeContainer< T >, RESTProcessEnum< E >, RESTProcessFactory< F >, RESTProcessFunction< F, R >, RESTProcessFunction< F, std::unique_ptr< R > >, RESTProcessFunction< F, std::unique_ptr< R > >, RESTProcessMultiArray< T >, RESTProcessMultiArray< classdesc::MultiArray< T, 1 > >, RESTProcessMultiArray< MultiArray< T, NumArgs< Args... >::value > >, RESTProcessObject< T >, RESTProcessOverloadedFunction, RESTProcessPtr< T >, RESTProcessPtr< classdesc::weak_ptr< T > >, RESTProcessPtr< const classdesc::weak_ptr< T > >, RESTProcessPtr< std::unique_ptr< T > >, RESTProcessSequence< T >, RESTProcessSequence< classdesc::MultiArray< T, 1 > >, RESTProcessVoid, RESTProcessWeakPtr< T >, RESTProcessWeakPtr< classdesc::weak_ptr< T > >, and RESTProcessWeakPtr< const classdesc::weak_ptr< T > >.
|
inlinevirtual |
sets element indexed/keyed by index to value
Reimplemented in RESTProcessAssociativeContainer< T >, RESTProcessMultiArray< T >, RESTProcessMultiArray< classdesc::MultiArray< T, 1 > >, RESTProcessMultiArray< classdesc::MultiArray< T, 1 > >, RESTProcessMultiArray< MultiArray< T, NumArgs< Args... >::value > >, RESTProcessObject< T >, RESTProcessSequence< T >, and RESTProcessSequence< classdesc::MultiArray< T, 1 > >.
References getElem().
Referenced by RESTProcessObject< T >::setElem().
|
pure virtual |
return signature(s) of the operations
Implemented in RESTProcessAssociativeContainer< T >, RESTProcessEnum< E >, RESTProcessFunction< F, R >, RESTProcessFunction< F, std::unique_ptr< R > >, RESTProcessFunction< F, std::unique_ptr< R > >, RESTProcessMultiArray< T >, RESTProcessMultiArray< classdesc::MultiArray< T, 1 > >, RESTProcessMultiArray< MultiArray< T, NumArgs< Args... >::value > >, RESTProcessObject< T >, RESTProcessOverloadedFunction, RESTProcessPtr< T >, RESTProcessPtr< classdesc::weak_ptr< T > >, RESTProcessPtr< const classdesc::weak_ptr< T > >, RESTProcessPtr< std::unique_ptr< T > >, RESTProcessSequence< T >, RESTProcessSequence< classdesc::MultiArray< T, 1 > >, RESTProcessVoid, RESTProcessWeakPtr< T >, RESTProcessWeakPtr< classdesc::weak_ptr< T > >, and RESTProcessWeakPtr< const classdesc::weak_ptr< T > >.
Referenced by RESTProcess_t::add().
|
inlinevirtual |
size if this is a container, 0 otherwise
Reimplemented in RESTProcessAssociativeContainer< T >, RESTProcessMultiArray< T >, RESTProcessMultiArray< classdesc::MultiArray< T, 1 > >, RESTProcessMultiArray< classdesc::MultiArray< T, 1 > >, RESTProcessMultiArray< MultiArray< T, NumArgs< Args... >::value > >, RESTProcessObject< T >, RESTProcessSequence< T >, and RESTProcessSequence< classdesc::MultiArray< T, 1 > >.
|
pure virtual |
return type name of this
Implemented in RESTProcessAssociativeContainer< T >, RESTProcessEnum< E >, RESTProcessFunction< F, R >, RESTProcessFunction< F, std::unique_ptr< R > >, RESTProcessFunction< F, std::unique_ptr< R > >, RESTProcessMultiArray< T >, RESTProcessMultiArray< classdesc::MultiArray< T, 1 > >, RESTProcessMultiArray< MultiArray< T, NumArgs< Args... >::value > >, RESTProcessObject< T >, RESTProcessOverloadedFunction, RESTProcessPtr< T >, RESTProcessPtr< classdesc::weak_ptr< T > >, RESTProcessPtr< const classdesc::weak_ptr< T > >, RESTProcessPtr< std::unique_ptr< T > >, RESTProcessSequence< T >, RESTProcessSequence< classdesc::MultiArray< T, 1 > >, RESTProcessVoid, RESTProcessWeakPtr< T >, RESTProcessWeakPtr< classdesc::weak_ptr< T > >, and RESTProcessWeakPtr< const classdesc::weak_ptr< T > >.