HiveMind
Public Member Functions | Private Attributes | List of all members
BittyBuzzFunctionDescription Class Reference

Description for a function, used for the FunctionDescriptionRequest/Response. More...

#include <BittyBuzzFunctionDescription.h>

Collaboration diagram for BittyBuzzFunctionDescription:
Collaboration graph

Public Member Functions

 BittyBuzzFunctionDescription (const char *functionName)
 
const std::array< std::tuple< const char *, FunctionDescriptionArgumentTypeDTO >, FunctionDescriptionDTO::ARGUMENTS_MAX_SIZE > & getArguments () const
 get the array of arguments description More...
 
uint16_t getArgumentsLength () const
 get the length of the array More...
 
const char * getFunctionName () const
 get the name of the function More...
 
bool addArgument (const char *argumentName, FunctionDescriptionArgumentTypeDTO argumentType)
 add an argument to the list of the description More...
 

Private Attributes

const char * m_functionName
 
std::array< std::tuple< const char *, FunctionDescriptionArgumentTypeDTO >, FunctionDescriptionDTO::ARGUMENTS_MAX_SIZE > m_argumentDescriptions
 
uint16_t m_argumentDescriptionsLength = 0
 

Detailed Description

Description for a function, used for the FunctionDescriptionRequest/Response.

Constructor & Destructor Documentation

◆ BittyBuzzFunctionDescription()

BittyBuzzFunctionDescription::BittyBuzzFunctionDescription ( const char *  functionName)

Warning only the pointer is stored so make sure the functionName data lifetime is greater than the funciton description

Member Function Documentation

◆ addArgument()

bool BittyBuzzFunctionDescription::addArgument ( const char *  argumentName,
FunctionDescriptionArgumentTypeDTO  argumentType 
)

add an argument to the list of the description

Parameters
argumentNamethe name of the argument Warning, the function description just keeps a pointer to the name, so make sure the data it's points to is valid during usage
argumentTypethe type of the argument
Returns
true if the operation was successfull, false if not (no more space in the buffer)
Here is the caller graph for this function:

◆ getArguments()

const std::array< std::tuple< const char *, FunctionDescriptionArgumentTypeDTO >, FunctionDescriptionDTO::ARGUMENTS_MAX_SIZE > & BittyBuzzFunctionDescription::getArguments ( ) const

get the array of arguments description

Returns
an reference to an std::array with the information stored
Here is the caller graph for this function:

◆ getArgumentsLength()

uint16_t BittyBuzzFunctionDescription::getArgumentsLength ( ) const

get the length of the array

Returns
the length of the array
Here is the caller graph for this function:

◆ getFunctionName()

const char * BittyBuzzFunctionDescription::getFunctionName ( ) const

get the name of the function

Returns
the name of the function
Here is the caller graph for this function:

Member Data Documentation

◆ m_argumentDescriptions

std::array<std::tuple<const char*, FunctionDescriptionArgumentTypeDTO>, FunctionDescriptionDTO::ARGUMENTS_MAX_SIZE> BittyBuzzFunctionDescription::m_argumentDescriptions
private

◆ m_argumentDescriptionsLength

uint16_t BittyBuzzFunctionDescription::m_argumentDescriptionsLength = 0
private

◆ m_functionName

const char* BittyBuzzFunctionDescription::m_functionName
private

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