NAP
Public Member Functions | Public Attributes | List of all members
UnresolvedPointer Struct Reference

#include <rtti/unresolvedpointer.h>

Public Member Functions

 UnresolvedPointer (Object *object, const rtti::Path &path, const std::string &targetID)
 
std::string getResourceTargetID () const
 

Public Attributes

ObjectmObject
 
rtti::Path mRTTIPath
 
std::string mTargetID
 

Description

An UnresolvedPointer represents a pointer property in a nap object that is currently unresolved (i.e. null) The information in the UnresolvedPointer can be used to look up the target and update the pointer

This is an output of readJSonFile and is intended for clients to be able to resolve pointers as they see fit.

Collaboration diagram for UnresolvedPointer:
[legend]

Constructor & Destructor Documentation

◆ UnresolvedPointer()

UnresolvedPointer ( Object object,
const rtti::Path path,
const std::string &  targetID 
)

Member Function Documentation

◆ getResourceTargetID()

std::string getResourceTargetID ( ) const

Get the ID of the resource this UnresolvedPointer is pointing to. When this is a plain unresolved pointer, this will simply return mTargetID. If this is a pointer that has a translateTargetID function (for example, ComponentPtr), it will be invoked to translate the source ID (i.e. component path) to the resource ID.

Returns
the ID of the resource this UnresolvedPointer is pointing to

Member Data Documentation

◆ mObject

Object* mObject

◆ mRTTIPath

rtti::Path mRTTIPath

◆ mTargetID

std::string mTargetID