Unit CastleComponentSerialize

Description

Reading and writing of hierachy of CGE components (TCastleUserInterface, TCastleTransform) to and from files. This is used by CGE editor to read/write components, and it can be used at runtime by games to instantiate components designed in CGE editor.

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class EInvalidComponentFile  
Class TRegisteredComponent  

Functions and Procedures

procedure TransformSave(const T: TCastleTransform; const Url: String);
function TransformLoad(const Url: String; const Owner: TComponent): TCastleTransform;
procedure UserInterfaceSave(const C: TCastleUserInterface; const Url: String);
function UserInterfaceLoad(const Url: String; const Owner: TComponent): TCastleUserInterface;
procedure ComponentSave(const C: TComponent; const Url: String);
function ComponentLoad(const Url: String; const Owner: TComponent): TComponent;
procedure RegisterSerializableComponent(const ComponentClass: TComponentClass; const Caption: String);
function RegisteredComponents: TRegisteredComponents;

Types

TRegisteredComponents = specialize TObjectList<TRegisteredComponent>;

Description

Functions and Procedures

procedure TransformSave(const T: TCastleTransform; const Url: String);

Save / load TCastleTransform (or descendant) to a .castle-transform file.

function TransformLoad(const Url: String; const Owner: TComponent): TCastleTransform;
 
procedure UserInterfaceSave(const C: TCastleUserInterface; const Url: String);

Save / load TCastleUserInterface (or descendant) to a .castle-user-interface file.

function UserInterfaceLoad(const Url: String; const Owner: TComponent): TCastleUserInterface;
 
procedure ComponentSave(const C: TComponent; const Url: String);

Save / load TComponent (or descendant) to a .castle-user-interface or .castle-transform file.

Usually it is more comfortable to use stronger typed UserInterfaceSave, UserInterfaceLoad, TransformSave, TransformLoad.

function ComponentLoad(const Url: String; const Owner: TComponent): TComponent;
 
procedure RegisterSerializableComponent(const ComponentClass: TComponentClass; const Caption: String);

Register a component that can be serialized and edited using CGE editor.

Parameters
Caption
Nice caption to show user in the editor.
function RegisteredComponents: TRegisteredComponents;

Read-only list of currently registered (using RegisterSerializableComponent) components.

Types

TRegisteredComponents = specialize TObjectList<TRegisteredComponent>;
 

Generated by PasDoc 0.15.0.