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

#include <rtti/object.h>

Public Member Functions

 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Static Public Member Functions

static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Public Attributes

std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Description

Base class of all top-level objects that support serialization / de-serialization.

Derive from this object if your object:

If you're making, for example, a compound (i.e a plain struct) there is no need to derive from this class.

Inheritance diagram for Object:
[legend]

Constructor & Destructor Documentation

◆ Object() [1/3]

Object ( )

◆ ~Object()

virtual ~Object ( )
virtual

◆ Object() [2/3]

Object ( Object )
delete

Copy is not allowed

◆ Object() [3/3]

Object ( Object &&  )
delete

Move is not allowed

Member Function Documentation

◆ init()

virtual bool init ( utility::ErrorState errorState)
virtual

Override this method to initialize the object after de-serialization. When called it is safe to assume that all dependencies have been resolved up to this point.

Parameters
errorStateshould contain the error message when initialization fails.
Returns
if initialization succeeded or failed.

Reimplemented in UDPAdapter, IndexBuffer, Mesh, VertexBuffer< T >, BitmapFromFile, DailyCalendarItem, TypedGPUBufferNumeric< T >, TypedGPUBufferNumeric< uint >, WeeklyCalendarItem, TriangleLine, Hexagon, MonthlyCalendarItem, Circle, LightComponentInstance, YearlyCalendarItem, Rectangle, ComputeMaterial, Line, UniqueCalendarItem, BufferBindingStruct, Renderable2DTextComponentInstance, SerialPort, SequencePlayerIndependentClock, BufferBindingNumeric, Material, DepthRenderTextureCube, RenderToTextureComponentInstance, GPUBuffer, RenderableMeshComponentInstance, Group< T >, DepthRenderTexture2D, SequencePlayerAudioOutputComponentInstance, BlinnPhongTextureShader, Calendar, Font, BlinnPhongColorShader, ParameterBlendComponentInstance, PythonScriptComponentInstance, RenderChain, RotateComponentInstance, BufferBinding, OrthoCameraComponentInstance, Renderable3DTextComponentInstance, CalendarItem, CameraControllerInstance, RenderFaderComponentInstance, BlurShader< KERNEL >, RenderWindow, ComputeComponentInstance, RenderGnomonComponentInstance, RenderTarget, PlaybackComponentInstance, DepthRenderTarget, APIComponentInstance, ParameterGUI, RenderSkyBoxComponentInstance, OrbitControllerInstance, RenderBloomComponentInstance, RenderableTextComponentInstance, RenderFrustumComponentInstance, RenderVideoComponentInstance, LevelMeterComponentInstance, FirstPersonControllerInstance, CubeRenderTarget, SpotLightComponentInstance, ArtNetInputComponentInstance, OrthoControllerInstance, OSCInputComponentInstance, SequenceEditor, ColorAdjustmentShader, RenderTextureCube, WebSocketComponentInstance, CubeDepthRenderTarget, OutputComponentInstance, CubeMapShader, SequencePlayerAudioOutput, PerspCameraComponentInstance, RenderableComponentInstance, Scene, IWebSocketClient, AudioInputComponentInstance, CubeMapFromFile, CalendarComponentInstance, MidiInputComponentInstance, TextureShader, PointLightComponentInstance, DirectionalLightComponentInstance, SequencePlayer, SkyBoxShader, VideoAudioComponentInstance, VideoShader, MultiAudioFileResource, StructBuffer, FadeShader, SequencePlayerCurveOutput, FontShader, PolyLine, RenderTexture2D, SequenceTrackSegmentCurve< T >, WebSocketClientEndPointSetup< config >, WebSocketClientEndPointSetup< wspp::ConfigTLS >, PythonScriptComponent, ConstantShader, WebSocketInterface, Bitmap, GeometryFromFile, SequencePlayerOutput, LineFromFile, SequenceEditorGUI, SequenceTrackCurve< T >, SequenceTrackCurve< CURVE_TYPE >, ImageFromFile, Snapshot, VisualizeNormalsMesh, IWebSocketServer, PlaneMesh, EmptyMesh, OperationalCalendar, PythonScript, BoxMesh, ScatterPointsMesh, AudioFileResource, ParameterBlendGroup, SphereMesh, TriangleMesh, BoxFrameMesh, MeshFromFile, WebSocketTicket, PortalItemDropDown, GnomonMesh, GnomonShader, SequenceTrackSegment, VideoFile, TorusMesh, TypedBufferBindingNumeric< T >, ComponentInstance, TransformComponentInstance, ComputeShaderFromFile, ShaderFromFile, PortalComponentInstance, PortalWebSocketServer, PortalItemVec< T >, PortalItemColor< T >, PortalItemNumeric< T >, PortalItemSimple< T >, PortalItemSimple< std::string >, and Icon.

◆ isIDProperty()

static bool isIDProperty ( rtti::Instance object,
const rtti::Property property 
)
static
Returns
if this is an object that holds a valid identifier attribute

◆ onDestroy()

virtual void onDestroy ( )
virtual

This function is called on destruction and is only invoked after a successful call to init(). If initialization fails onDestroy will not be invoked. Objects are destroyed in reverse init order. It is safe to assume that when onDestroy is called all your pointers are valid. This function is also called when editing JSON files. If during the real-time edit stage an error occurs, every object that initialized successfully will be destroyed in the correct order.

Reimplemented in UDPAdapter, LightComponentInstance, Texture, SequencePlayerAudioOutputComponentInstance, RenderChain, RenderWindow, EntityInstance, SequencePlayerAudioOutput, Scene, IWebSocketClient, PortalComponentInstance, CubeMapFromFile, SequencePlayerOutput, SequenceEditorGUI, PortalWebSocketServer, IWebSocketServer, SequencePlayerAudioClock, PortalItemVec< T >, PortalItemColor< T >, PortalItemNumeric< T >, PortalItemSimple< T >, PortalItemSimple< std::string >, and PortalItemDropDown.

◆ operator=() [1/2]

Object& operator= ( const Object )
delete

Copy assignment is not allowed

◆ operator=() [2/2]

Object& operator= ( Object &&  )
delete

Move assignment is not allowed

Member Data Documentation

◆ mID

std::string mID

Property: 'mID' unique name of the object. Used as an identifier by the system.