9#if FW_OBJECT_REGISTRATION == 1
10 ObjRegistry* ObjBase::s_objRegistry =
nullptr;
13#if FW_OBJECT_NAMES == 1
15 if (
nullptr == objName) {
16 this->setObjName(
"NoName");
18 this->setObjName(objName);
28#if FW_OBJECT_REGISTRATION
29 if (ObjBase::s_objRegistry) {
30 ObjBase::s_objRegistry->regObject(
this);
39#if FW_OBJECT_NAMES == 1
40 const char* ObjBase::getObjName() {
41 return this->m_objName;
44 void ObjBase::setObjName(
const char* name) {
45 strncpy(this->m_objName, name,
sizeof(this->m_objName));
46 this->m_objName[
sizeof(this->m_objName)-1] = 0;
48#if FW_OBJECT_TO_STRING == 1
51 if (snprintf(str, size,
"Obj: %s",this->m_objName) < 0) {
58#if FW_OBJECT_REGISTRATION == 1
59 void ObjBase::setObjRegistry(ObjRegistry* reg) {
60 ObjBase::s_objRegistry = reg;
63 ObjRegistry::~ObjRegistry() {
PlatformIntType NATIVE_INT_TYPE
C++-compatible configuration header for fprime configuration.
Declarations for Fw::ObjBase and Fw::ObjRegistry.
void init()
Object initializer.
virtual ~ObjBase()
Destructor.
ObjBase(const char *name)
ObjBase constructor.