Classdesc 3.44
RESTProcessFunctionBase Class Referenceabstract
Inheritance diagram for RESTProcessFunctionBase:
Inheritance graph
Collaboration diagram for RESTProcessFunctionBase:
Collaboration graph

Public Member Functions

virtual unsigned matchScore (const REST_PROCESS_BUFFER &arguments) const =0
 returns how good the match is with arguments, less is best
REST_PROCESS_BUFFER asBuffer () const override
Public Member Functions inherited from RESTProcessBase
virtual RPPtr process (const string &path, const REST_PROCESS_BUFFER &arguments)=0
virtual std::vector< Signaturesignature () 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>
TgetObject ()
 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 objectgetClassdescObject ()
 returns a classdesc object if referring to an object derived from classdesc::object
virtual const objectgetConstClassdescObject ()

Static Public Attributes

static const unsigned maxMatchScore =1000000

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)

Member Function Documentation

◆ asBuffer()

REST_PROCESS_BUFFER asBuffer ( ) const
inlineoverridevirtual

Implements RESTProcessBase.

◆ matchScore()

virtual unsigned matchScore ( const REST_PROCESS_BUFFER & arguments) const
pure virtual

returns how good the match is with arguments, less is best

Implemented in RESTProcessFunction< F, R >, RESTProcessFunction< F, std::unique_ptr< R > >, and RESTProcessFunction< F, std::unique_ptr< R > >.


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