flux sdk  v01.02.02-3-g292b3a7
Embedded C++ SDK
Loading...
Searching...
No Matches
flxDescriptor Class Reference

Represents a descriptor object with name, description, and title. More...

#include <flxCoreTypes.h>

Inheritance diagram for flxDescriptor:
flxIFileSystem flxObject flxParameter flxProperty flxStorage _flxFSSDMMCard flxFSSDMMCard flxContainer< flxDevice * > flxContainer< flxAction * > flxContainer< flxOperation * > flxContainer< T > flxOperation flxParameterIn flxParameterOut _flxPropertyBase< T, false, false > _flxPropertyBase< _flxClock, false, false > _flxPropertyBase< flxDevACS37800, false, false > _flxPropertyBase< flxDevADS1015, false, false > _flxPropertyBase< flxDevADS122C04, false, false > _flxPropertyBase< flxDevAMG8833, false, false > _flxPropertyBase< flxDevAS7265X, false, false > _flxPropertyBase< flxDevBMP581, false, false > _flxPropertyBase< flxDevButton, false, false > _flxPropertyBase< flxDevENS160, false, false > _flxPropertyBase< flxDevFS3000, false, false > _flxPropertyBase< flxDevGNSS, false, false > _flxPropertyBase< flxDevISM330Base, false, false > _flxPropertyBase< flxDevMCP9600, false, false > _flxPropertyBase< flxDevMMC5983Base, false, false > _flxPropertyBase< flxDevNAU7802, false, false > _flxPropertyBase< flxDevOPT4048, false, false > _flxPropertyBase< flxDevPASCO2V01, false, false > _flxPropertyBase< flxDevSCD30, false, false > _flxPropertyBase< flxDevSCD40, false, false > _flxPropertyBase< flxDevSDP3X, false, false > _flxPropertyBase< flxDevSEN54, false, false > _flxPropertyBase< flxDevSTC31, false, false > _flxPropertyBase< flxDevSTHS34PF80, false, false > _flxPropertyBase< flxDevTMF882X, false, false > _flxPropertyBase< flxDevTwist, false, false > _flxPropertyBase< flxDevVCNL4040, false, false > _flxPropertyBase< flxDevVEML6075, false, false > _flxPropertyBase< flxDevVEML7700, false, false > _flxPropertyBase< flxDevVL53L1X, false, false > _flxPropertyBase< flxDevVL53L5, false, false > _flxPropertyBase< flxFileRotate, false, false > _flxPropertyBase< flxIoTArduino, false, false > _flxPropertyBase< flxLogger, false, false > _flxPropertyBase< flxSettingsSave, false, false > _flxPropertyBase< flxTimer, false, false > _flxPropertyBaseString< false, false > _flxPropertyBase< T, HIDDEN, SECURE > _flxPropertyBaseString< HIDDEN, SECURE > flxStorageJSONPref

Public Member Functions

 flxDescriptor ()
 
void setName (const char *new_name)
 Set the Name object - storing the pointer to the provided string No allocation is performed. If the previous name was allocated, it is freed. More...
 
void setName (const char *new_name, const char *new_desc)
 Set the Name object and the Description for the object. Both strings are constants. More...
 
void setName (char *new_name)
 Set the Name object, but makes a copy of the input string since the input is not const. If the previous name was allocated, it is freed. More...
 
const char * name ()
 Return a const char pointer to the name of the object. More...
 
std::string name_ (void)
 Returns a std::string of the name of the object. More...
 
void setDescription (const char *new_desc)
 Set the Description object - the input value is constant and not copied. If the previous description was allocated, it is freed. More...
 
void setDescription (char *new_desc)
 Set the Description object - the input value is not constant and is copied. If the previous description was allocated, it is freed. More...
 
const char * description ()
 Return the constant C string pointer to the description of the object. More...
 
std::string description_ (void)
 Return the description of the object as a std::string. More...
 
void setTitle (const char *title)
 Set the Title object - the title is optional and is used mostly for UX or organizational purposes. The input value is constant and not copied. If the previous title was allocated, it is freed. More...
 
void setTitleAlloc (char *new_title)
 Set the Title of the object , but make an explict copy of the provided string. More...
 
const char * title (void)
 Return the C constant string pointer to the title of the object. More...
 

Protected Attributes

const char * _name
 
bool _nameAlloc
 
const char * _desc
 
bool _descAlloc
 
const char * _title
 
bool _titleAlloc
 

Detailed Description

Represents a descriptor object with name, description, and title.

The flxDescriptor class provides methods to set and retrieve the name, description, and title of a descriptor object. It also supports allocating memory for the name, description, and title strings.

Constructor & Destructor Documentation

◆ flxDescriptor()

flxDescriptor::flxDescriptor ( )
inline

Member Function Documentation

◆ description()

const char * flxDescriptor::description ( void  )
inline

Return the constant C string pointer to the description of the object.

Returns
const char*

◆ description_()

std::string flxDescriptor::description_ ( void  )
inline

Return the description of the object as a std::string.

Returns
std::string

◆ name()

const char * flxDescriptor::name ( void  )
inline

Return a const char pointer to the name of the object.

Returns
const char*

◆ name_()

std::string flxDescriptor::name_ ( void  )
inline

Returns a std::string of the name of the object.

Returns
std::string

◆ setDescription() [1/2]

void flxDescriptor::setDescription ( char *  new_desc)
inline

Set the Description object - the input value is not constant and is copied. If the previous description was allocated, it is freed.

Parameters
[in]new_desc

◆ setDescription() [2/2]

void flxDescriptor::setDescription ( const char *  new_desc)
inline

Set the Description object - the input value is constant and not copied. If the previous description was allocated, it is freed.

Parameters
[in]new_descA C string constant for the description

◆ setName() [1/3]

void flxDescriptor::setName ( char *  new_name)
inline

Set the Name object, but makes a copy of the input string since the input is not const. If the previous name was allocated, it is freed.

Parameters
[in]new_nameThe new name for the object

◆ setName() [2/3]

void flxDescriptor::setName ( const char *  new_name)
inline

Set the Name object - storing the pointer to the provided string No allocation is performed. If the previous name was allocated, it is freed.

Parameters
[in]new_nameThe new name for the object

◆ setName() [3/3]

void flxDescriptor::setName ( const char *  new_name,
const char *  new_desc 
)
inline

Set the Name object and the Description for the object. Both strings are constants.

Parameters
[in]new_nameThe new name for the object - passed to the setName() method
[in]new_descThe new description for the object - passed to the setDescription() method

◆ setTitle()

void flxDescriptor::setTitle ( const char *  title)
inline

Set the Title object - the title is optional and is used mostly for UX or organizational purposes. The input value is constant and not copied. If the previous title was allocated, it is freed.

Parameters
[in]title- A C string constant for the title

◆ setTitleAlloc()

void flxDescriptor::setTitleAlloc ( char *  new_title)
inline

Set the Title of the object , but make an explict copy of the provided string.

Parameters
[in]new_title

◆ title()

const char * flxDescriptor::title ( void  )
inline

Return the C constant string pointer to the title of the object.

Returns
const char*

Member Data Documentation

◆ _desc

const char* flxDescriptor::_desc
protected

◆ _descAlloc

bool flxDescriptor::_descAlloc
protected

◆ _name

const char* flxDescriptor::_name
protected

◆ _nameAlloc

bool flxDescriptor::_nameAlloc
protected

◆ _title

const char* flxDescriptor::_title
protected

◆ _titleAlloc

bool flxDescriptor::_titleAlloc
protected

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