NAP
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
RTTIObjectGraphItem Class Reference

#include <nap/rttiobjectgraphitem.h>

Public Types

enum  EType : uint8_t { Object, File }
 
using Type = rtti::Object *
 

Public Member Functions

const std::string getID () const
 
uint8_t getType () const
 
bool getPointees (std::vector< RTTIObjectGraphItem > &pointees, utility::ErrorState &errorState) const
 

Static Public Member Functions

static const RTTIObjectGraphItem create (rtti::Object *object)
 

Public Attributes

EType mType
 
std::string mFilename
 
rtti::ObjectmObject = nullptr
 

Description

Item class for ObjectGraph usage. Wraps both an RTTIObject and a File object (by filename). Uses RTTI traversal to scan pointers to other objects and pointers to files.

Collaboration diagram for RTTIObjectGraphItem:
[legend]

Member Typedef Documentation

◆ Type

using Type = rtti::Object*

Member Enumeration Documentation

◆ EType

enum EType : uint8_t
strong
Enumerator
Object 
File 

Member Function Documentation

◆ create()

static const RTTIObjectGraphItem create ( rtti::Object object)
static

Creates a graph item.

Parameters
objectObject to wrap in the item that is created.

◆ getID()

const std::string getID ( ) const
Returns
ID of the item. For objects, the ID is the object ID, for files, it is the filename.

◆ getPointees()

bool getPointees ( std::vector< RTTIObjectGraphItem > &  pointees,
utility::ErrorState errorState 
) const

Performs rtti traversal of pointers to both files and objects.

Parameters
pointeesOutput parameter, contains all objects and files this object points to.
errorStateIf false is returned, contains information about the error.
Returns
true is succeeded, false otherwise.

◆ getType()

uint8_t getType ( ) const
Returns
EType of the type (file or object).

Member Data Documentation

◆ mFilename

std::string mFilename

◆ mObject

rtti::Object* mObject = nullptr

◆ mType

EType mType