Base class of all top-level objects that support serialization / de-serialization.
Derive from this object if your object:
- needs to be serialized to the root of the document.
- needs to be able to be pointed to from other objects.
If you're making, for example, a compound (i.e a plain struct) there is no need to derive from this class.
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
-
errorState | should 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, FluxMeasurementComponentInstance, SkyBoxShader, VideoAudioComponentInstance, VideoShader, MultiAudioFileResource, StructBuffer, FadeShader, SequencePlayerCurveOutput, FFTAudioNodeComponentInstance, 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.
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.