Represents a descriptor object with name, description, and title.
More...
#include <flxCoreTypes.h>
|
| 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...
|
|
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.
◆ flxDescriptor()
flxDescriptor::flxDescriptor |
( |
| ) |
|
|
inline |
◆ 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
-
◆ 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_desc | A 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_name | The 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_name | The 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_name | The new name for the object - passed to the setName() method |
[in] | new_desc | The 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
-
◆ title()
const char * flxDescriptor::title |
( |
void |
| ) |
|
|
inline |
Return the C constant string pointer to the title of the object.
- Returns
- const char*
◆ _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: