Base class for named objects. More...
#include <cmsis-plus/rtos/os.h>
Public Member Functions | |
Constructors & Destructor | |
object_named () | |
Construct a named object instance. | |
object_named (const char *name) | |
Construct a named object instance. | |
~object_named ()=default | |
Destruct the named object instance. | |
Public Member Functions | |
const char * | name (void) const |
Get object name. | |
Base class for named objects.
This class serves as a base class for all objects that have a name (most of the RTOS classes do have a name).
Attributes use a separate constexpr object.
Definition at line 350 of file os-decls.h.
os::rtos::internal::object_named::object_named | ( | ) |
Construct a named object instance.
Definition at line 606 of file os-core.cpp.
os::rtos::internal::object_named::object_named | ( | const char * | name | ) |
Construct a named object instance.
[in] | name | Null terminated name. If nullptr , "-" is assigned. |
Prefer the given name, otherwise default to '-'.
To save space, instead of copying the null terminated string locally, the pointer to the string is copied, so the caller must ensure that the pointer life cycle is at least as long as the object life cycle. A constant string (stored in flash) is preferred.
Definition at line 621 of file os-core.cpp.
|
default |
Destruct the named object instance.
|
inline |
Get object name.
All objects return a non-null string; anonymous objects return "-"
.
Definition at line 759 of file os-decls.h.