29 ua_mapped_class::ua_mapped_class() {
30 this->baseNodeId = UA_NODEID_NUMERIC(0, 0);
31 this->mappedServer =
nullptr;
33 ua_mapSelfToNamespace();
36 ua_mapped_class::ua_mapped_class(UA_Server* server, UA_NodeId baseNodeId) {
37 UA_NodeId_copy(&baseNodeId, &this->baseNodeId);
38 this->mappedServer = server;
40 ua_mapSelfToNamespace();
43 ua_mapped_class::~ua_mapped_class() {
44 this->ua_unmapSelfFromNamespace();
45 this->mappedServer =
nullptr;
46 UA_NodeId_clear(&this->baseNodeId);
49 UA_StatusCode ua_mapped_class::ua_mapSelfToNamespace() {
50 UA_StatusCode retval = UA_STATUSCODE_GOOD;
51 UA_NodeId nullId = UA_NODEID_NULL;
52 if(UA_NodeId_equal(&this->baseNodeId, &nullId)) {
55 if(this->mappedServer ==
nullptr) {
62 UA_StatusCode ua_mapped_class::ua_unmapSelfFromNamespace() {
63 while(!this->ownedNodes.empty()) {
68 this->ownedNodes.remove(p);
71 return UA_STATUSCODE_GOOD;