zeus::AbstractFunctionTypeClass< ZEUS_RETURN, ZEUS_CLASS_TYPE, ZEUS_TYPES > Class Template Reference

#include <AbstractFunctionTypeClass.hpp>

Inheritance diagram for zeus::AbstractFunctionTypeClass< ZEUS_RETURN, ZEUS_CLASS_TYPE, ZEUS_TYPES >:
zeus::AbstractFunction

Public Types

using functionType = ZEUS_RETURN(ZEUS_CLASS_TYPE::*)(ZEUS_TYPES...)
 
- Public Types inherited from zeus::AbstractFunction
enum  type {
  type::unknow, type::global, type::local, type::service,
  type::object
}
 

Public Member Functions

 AbstractFunctionTypeClass (const std::string &_name, functionType _fptr)
 
std::string getPrototypeReturn () const override
 
std::vector< std::string > getPrototypeParam () const override
 
void execute (ememory::SharedPtr< zeus::WebServer > _interfaceClient, ememory::SharedPtr< zeus::BufferCall > _obj, void *_class) override
 
- Public Member Functions inherited from zeus::AbstractFunction
virtual ~AbstractFunction ()=default
 
enum type getType () const
 
void setType (enum type _type)
 
const std::string & getName () const
 
const std::string & getDescription () const
 
void setDescription (const std::string &_desc)
 
void setParam (int32_t _idParam, const std::string &_name, const std::string &_desc)
 
void addParam (const std::string &_name, const std::string &_desc)
 
void setReturn (const std::string &_desc)
 
std::string getPrototype () const
 
virtual std::string getSignature () const
 

Public Attributes

functionType m_function
 

Static Protected Attributes

static const ParamType m_returnType = createType<ZEUS_RETURN>()
 
static const ParamType m_paramType [sizeof...(ZEUS_TYPES)] = {createType<ZEUS_TYPES>()...}
 

Additional Inherited Members

- Protected Member Functions inherited from zeus::AbstractFunction
 AbstractFunction (const std::string &_name)
 
- Protected Attributes inherited from zeus::AbstractFunction
enum type m_type
 
std::string m_name
 
std::string m_description
 
std::vector< std::pair< std::string, std::string > > m_paramsDescription
 
std::string m_returnDescription
 

Detailed Description

template<class ZEUS_RETURN, class ZEUS_CLASS_TYPE, class... ZEUS_TYPES>
class zeus::AbstractFunctionTypeClass< ZEUS_RETURN, ZEUS_CLASS_TYPE, ZEUS_TYPES >

Chass that permit to declare a function that call intanced element or a class element.

Constructor & Destructor Documentation

§ AbstractFunctionTypeClass()

template<class ZEUS_RETURN , class ZEUS_CLASS_TYPE , class... ZEUS_TYPES>
zeus::AbstractFunctionTypeClass< ZEUS_RETURN, ZEUS_CLASS_TYPE, ZEUS_TYPES >::AbstractFunctionTypeClass ( const std::string &  _name,
functionType  _fptr 
)
inline

Constructor.

Parameters
[in]_nameName of the function
[in]_fptrPointer on the function

Member Function Documentation

§ execute()

template<class ZEUS_RETURN , class ZEUS_CLASS_TYPE , class... ZEUS_TYPES>
void zeus::AbstractFunctionTypeClass< ZEUS_RETURN, ZEUS_CLASS_TYPE, ZEUS_TYPES >::execute ( ememory::SharedPtr< zeus::WebServer _interfaceClient,
ememory::SharedPtr< zeus::BufferCall _obj,
void *  _class 
)
inlineoverridevirtual

Execute the function with all parameter properties.

Parameters
[in]_interfaceClientWeb interface to anser values
[in]_objCall object
[in]_classPointer on the object that might be call (note: brut cast)

Implements zeus::AbstractFunction.

§ getPrototypeParam()

template<class ZEUS_RETURN , class ZEUS_CLASS_TYPE , class... ZEUS_TYPES>
std::vector<std::string> zeus::AbstractFunctionTypeClass< ZEUS_RETURN, ZEUS_CLASS_TYPE, ZEUS_TYPES >::getPrototypeParam ( ) const
inlineoverridevirtual

Get the list of type of the parameter.

Returns
List of types (zeus singature mode)

Implements zeus::AbstractFunction.

§ getPrototypeReturn()

template<class ZEUS_RETURN , class ZEUS_CLASS_TYPE , class... ZEUS_TYPES>
std::string zeus::AbstractFunctionTypeClass< ZEUS_RETURN, ZEUS_CLASS_TYPE, ZEUS_TYPES >::getPrototypeReturn ( ) const
inlineoverridevirtual

Get the string of the type of the return value.

Returns
type string of the return value

Implements zeus::AbstractFunction.


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