Classdesc 3.44
RESTProcessSequence< T > Class Template Reference
Inheritance diagram for RESTProcessSequence< T >:
Inheritance graph
Collaboration diagram for RESTProcessSequence< T >:
Collaboration graph

Public Member Functions

 RESTProcessSequence (T &obj)
RPPtr process (const string &remainder, const REST_PROCESS_BUFFER &arguments) 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
REST_PROCESS_BUFFER asBuffer () const override
bool isObject () const override
RPPtr getElem (const REST_PROCESS_BUFFER &index) override
 get element by position for sequences, by key for associative containers
RPPtr setElem (const REST_PROCESS_BUFFER &index, const REST_PROCESS_BUFFER &value) override
size_t size () const override
 size if this is a container, 0 otherwise
void insert (const REST_PROCESS_BUFFER &value) override
 append to end of a sequence, or inserts key into an associative container
void erase (const REST_PROCESS_BUFFER &index) override
 erase an element - by position for sequences, by key for associative containers
Public Member Functions inherited from RESTProcessBase
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>
TgetObject ()
 returns a pointer to the underlying object if it is one of type T, otherwise null
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 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 objectgetClassdescObject ()
 returns a classdesc object if referring to an object derived from classdesc::object
virtual const objectgetConstClassdescObject ()

Protected Member Functions

transfer_const< T, typenameT::value_type >::typeelem (size_t idx)
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)

Member Function Documentation

◆ asBuffer()

template<class T>
REST_PROCESS_BUFFER asBuffer ( ) const
inlineoverridevirtual

Implements RESTProcessBase.

◆ erase()

template<class T>
void erase ( const REST_PROCESS_BUFFER & index)
inlineoverridevirtual

erase an element - by position for sequences, by key for associative containers

Reimplemented from RESTProcessBase.

References classdesc::idx().

◆ 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 classdesc::idx(), and classdesc::makeRESTProcessRef().

◆ insert()

template<class T>
void insert ( const REST_PROCESS_BUFFER & value)
inlineoverridevirtual

append to end of a sequence, or inserts key into an associative container

Reimplemented from RESTProcessBase.

References insert().

Referenced by insert().

◆ 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.

◆ process()

template<class T>
RPPtr process ( const string & path,
const REST_PROCESS_BUFFER & arguments )
overridevirtual

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.

References classdesc::makeRESTProcessRef().

◆ setElem()

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

sets element indexed/keyed by index to value

Returns
updated element

Reimplemented from RESTProcessBase.

References classdesc::idx(), and classdesc::makeRESTProcessRef().

◆ 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
inlineoverridevirtual

return type name of this

Implements RESTProcessBase.


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