Classdesc 3.44
RESTProcessObject< T > Struct Template Reference

handle setting and getting of objects More...

#include <RESTProcess_base.h>

Inheritance diagram for RESTProcessObject< T >:
Inheritance graph
Collaboration diagram for RESTProcessObject< T >:
Collaboration graph

Public Member Functions

 RESTProcessObject (T &obj)
std::shared_ptr< classdesc::RESTProcessBaseprocess (const string &remainder, const REST_PROCESS_BUFFER &arguments) override
REST_PROCESS_BUFFER asBuffer () const override
std::vector< Signaturesignature () const override
 return signature(s) of the operations
RESTProcess_t list () const override
 return list of subcommands to this
std::string type () const override
 return type name of this
void populate (RESTProcess_t &map) const override
 populate map from the object wrapped by this, if any
objectgetClassdescObject () override
 returns a classdesc object if referring to an object derived from classdesc::object
bool isObject () const override
const objectgetConstClassdescObject () override
bool isConst () const override
 true if this is a const object, a const member function or static/free function
size_t size () const override
 size if this is a container, 0 otherwise
RPPtr getElem (const REST_PROCESS_BUFFER &b) override
 get element by position for sequences, by key for associative containers
RPPtr setElem (const REST_PROCESS_BUFFER &b, const REST_PROCESS_BUFFER &value) override
Public Member Functions inherited from RESTProcessBase
template<class F>
Signature functionSignature () const
 return signature for a function type F
template<class T>
TgetObject ()
 returns a pointer to the underlying object if it is one of type T, otherwise null
virtual unsigned arity () const
 arity if this is a function, 0 otherwise
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

Public Attributes

Tobj

Additional Inherited Members

Protected Member Functions inherited from RESTProcessBase
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)

Detailed Description

template<class T>
struct classdesc::RESTProcessObject< T >

handle setting and getting of objects

Member Function Documentation

◆ asBuffer()

template<class T>
REST_PROCESS_BUFFER asBuffer ( ) const
inlineoverridevirtual

Implements RESTProcessBase.

◆ getClassdescObject()

template<class T>
object * getClassdescObject ( )
inlineoverridevirtual

returns a classdesc object if referring to an object derived from classdesc::object

Reimplemented from RESTProcessBase.

References RESTProcessBase::getClassdescObjectImpl().

◆ getConstClassdescObject()

template<class T>
const object * getConstClassdescObject ( )
inlineoverridevirtual

Reimplemented from RESTProcessBase.

◆ getElem()

template<class T>
RPPtr getElem ( const REST_PROCESS_BUFFER & )
inlineoverridevirtual

get element by position for sequences, by key for associative containers

Reimplemented from RESTProcessBase.

References RESTProcessBase::getElem(), and classdesc::makeRESTProcessRef().

◆ isConst()

template<class T>
bool isConst ( ) const
inlineoverridevirtual

true if this is a const object, a const member function or static/free function

Reimplemented from RESTProcessBase.

◆ isObject()

template<class T>
bool isObject ( ) const
inlineoverridevirtual

true if this is an object, not a function

Reimplemented from RESTProcessBase.

◆ list()

template<class T>
RESTProcess_t list ( ) const
overridevirtual

return list of subcommands to this

Implements RESTProcessBase.

Referenced by RESTProcessWeakPtr< T >::list().

◆ populate()

template<class T>
void populate ( RESTProcess_t & map) const
inlineoverridevirtual

populate map from the object wrapped by this, if any

Reimplemented from RESTProcessBase.

References classdesc::RESTProcess().

◆ process()

template<class T>
std::shared_ptr< classdesc::RESTProcessBase > process ( const string & path,
const REST_PROCESS_BUFFER & arguments )
inlineoverridevirtual

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

Implements RESTProcessBase.

◆ setElem()

template<class T>
RPPtr setElem ( const REST_PROCESS_BUFFER & b,
const REST_PROCESS_BUFFER & value )
inlineoverridevirtual

sets element indexed/keyed by index to value

Returns
updated element

Reimplemented from RESTProcessBase.

References classdesc::makeRESTProcessRef(), and RESTProcessBase::setElem().

◆ signature()

template<class T>
std::vector< Signature > signature ( ) const
overridevirtual

return signature(s) of the operations

Implements RESTProcessBase.

◆ size()

template<class T>
size_t size ( ) const
inlineoverridevirtual

size if this is a container, 0 otherwise

Reimplemented from RESTProcessBase.

◆ type()

template<class T>
std::string type ( ) const
overridevirtual

return type name of this

Implements RESTProcessBase.


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