Search Results
#include <AbstractFunction.hpp>

Public Types | |
enum | type { type::unknow, type::global, type::local, type::service, type::object } |
Public Member Functions | |
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 |
virtual std::string | getPrototypeReturn () const =0 |
virtual std::vector< std::string > | getPrototypeParam () const =0 |
virtual void | execute (ememory::SharedPtr< zeus::WebServer > _interfaceClient, ememory::SharedPtr< zeus::BufferCall > _obj, void *_class=nullptr)=0 |
Protected Member Functions | |
AbstractFunction (const std::string &_name) | |
Protected Attributes | |
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
Interface to store a function and call it after with a zeus::Buffer.
Member Enumeration Documentation
§ type
|
strong |
Constructor & Destructor Documentation
§ AbstractFunction()
|
protected |
Constructor.
- Parameters
-
[in] _name Nmae of the function
§ ~AbstractFunction()
|
virtualdefault |
generic virtual destructor
Member Function Documentation
§ addParam()
void zeus::AbstractFunction::addParam | ( | const std::string & | _name, |
const std::string & | _desc | ||
) |
Set the parameter name and description of the last parameter not set (increment id every element)
- Parameters
-
[in] _name Name of the parameter [in] _desc Description of the parameter
§ execute()
|
pure virtual |
Execute the function with all parameter properties.
- Parameters
-
[in] _interfaceClient Web interface to anser values [in] _obj Call object [in] _class Pointer on the object that might be call (note: brut cast)
Implemented in zeus::AbstractFunctionTypeClass< ZEUS_RETURN, ZEUS_CLASS_TYPE, ZEUS_TYPES >, and zeus::AbstractFunctionTypeDirect< ZEUS_RETURN, ZEUS_TYPES >.
§ getDescription()
const std::string& zeus::AbstractFunction::getDescription | ( | ) | const |
Get the description of the function.
- Returns
- The description string of the function (same as doxygen 'brief')
§ getName()
const std::string& zeus::AbstractFunction::getName | ( | ) | const |
Get the name of the function.
- Returns
- Function name
§ getPrototype()
std::string zeus::AbstractFunction::getPrototype | ( | ) | const |
Get the prototype of the function with the parameter name and type.
- Returns
- The fucntion like "void maFonction(int32 parameter_1, vector:string parameter_2);"
§ getPrototypeParam()
|
pure virtual |
Get the list of type of the parameter.
- Returns
- List of types (zeus singature mode)
Implemented in zeus::AbstractFunctionTypeClass< ZEUS_RETURN, ZEUS_CLASS_TYPE, ZEUS_TYPES >, and zeus::AbstractFunctionTypeDirect< ZEUS_RETURN, ZEUS_TYPES >.
§ getPrototypeReturn()
|
pure virtual |
Get the string of the type of the return value.
- Returns
- type string of the return value
Implemented in zeus::AbstractFunctionTypeClass< ZEUS_RETURN, ZEUS_CLASS_TYPE, ZEUS_TYPES >, and zeus::AbstractFunctionTypeDirect< ZEUS_RETURN, ZEUS_TYPES >.
§ getSignature()
|
virtual |
Get the signature of the function.
- Returns
- The signature of the function: "void(int32,vector:string);"
§ getType()
enum type zeus::AbstractFunction::getType | ( | ) | const |
Get the tyope of the call that is needed to do.
- Returns
- Type of the call.
§ setDescription()
void zeus::AbstractFunction::setDescription | ( | const std::string & | _desc | ) |
Set a new description of the function.
- Parameters
-
[in] _desc Descriptive string
§ setParam()
void zeus::AbstractFunction::setParam | ( | int32_t | _idParam, |
const std::string & | _name, | ||
const std::string & | _desc | ||
) |
Set the parameter name and description.
- Parameters
-
[in] _idParam Number of the parameter [in] _name Name of the parameter [in] _desc Description of the parameter
§ setReturn()
void zeus::AbstractFunction::setReturn | ( | const std::string & | _desc | ) |
Set the return description of the Function.
- Parameters
-
[in] _desc Description of the return parameter
§ setType()
void zeus::AbstractFunction::setType | ( | enum type | _type | ) |
Set the type of the call that must be done for this function.
- Parameters
-
[in] _type New type of the call.
Member Data Documentation
§ m_description
|
protected |
description of the function
§ m_name
|
protected |
name of the function
§ m_paramsDescription
|
protected |
List of the parameter descriptions.
§ m_returnDescription
|
protected |
Return description of the Function.
§ m_type
|
protected |
Type of the subCall (to permit to call many type of call)
The documentation for this class was generated from the following file:
- framework/atria-soft/zeus/zeus/AbstractFunction.hpp