CompWriterPas unit
Contains types, classes, and routines used to serialize components into Pascal code.
The following features and functionality are currently implemented:
- signature begin, end, version
- boolean, set of boolean
- char, widechar, custom char, set of custom char
- integers, custom int, set of custom int
- strings, codepage system and UTF8
- float, currency
- enum, custom enum range
- set of enum, set of custom enum range
- variant: integers, boolean, string, floats, currency
- method
- persistent
- component children, use SetParentComponent or optional Parent
- collection
- IInterfaceComponentReference
- with ancestor
- ancestor: change ComponentIndex -> call SetChildPos
- reference foreign root, reference foreign component
- create components before setting properties to avoid having to set references later
- inline component, csInline, call SetInline, inherited inline, inline on inherited
- TComponent.Left/Right via DesignInfo
- DefineProperties
- RegisterDefinePropertiesPas
TCompWriterPas is used in the implementation of the TCustomFormEditor class in the Lazarus IDE.
Author: Mattias Gaertner
compwriterpas.pas is part of the
lazutils package.
Classes and records
TCompWriterPas | class | Serializes a component to Pascal code. |
Procedures and functions
CallDefinePropertiesPas | procedure | |
RegisterDefinePropertiesPas | procedure | |
UnregisterDefinePropertiesPas | procedure | |
WriteComponentToPasStream | procedure |
Types
TCWPChildrenStep | enumeration | |
TCWPDefinePropertiesEvent | procedure type | |
TCWPDefinePropertiesProc | procedure type | |
TCWPFindAncestorEvent | procedure type | Specifies an event handler used to find ancestor class in TCompWriterPas. |
TCWPGetMethodName | procedure type | Specifies an event handler used to get property information and an identifier name for a property. |
TCWPGetParentPropertyEvent | procedure type | Specifies an event handler used to get a parent property name for a component instance. |
TCWPOption | enumeration | Enumeration which defines options available in TCompWriterPas. |
TCWPOptions | set | Set type used to stores values from the TCWPOption enumeration. |
Constants
CSPDefaultAccessClass | constant | Default class name used to access protected TComponent members. |
CSPDefaultAssignOp | constant | Default value for the AssignOp property in TCompWriterPas. |
CSPDefaultExecCustomProc | constant | Default value for the ExecCustomProc property in TCompWriterPas. |
CSPDefaultExecCustomProcUnit | constant | Default value for the ExecCustomProcUnit property in TCompWriterPas. |
CSPDefaultMaxColumn | constant | Default value for the MaxColumn property in TCompWriterPas. |
CSPDefaultSignature | constant | Default signature written before serialized component data. |
CSPDefaultSignatureBegin | constant | Default begin signature written before a serialized component. |
CSPDefaultSignatureEnd | constant | Default end signature written after a serialized component. |
CSPVersion | constant | Component Serialization to Pascal version. |
CWPSkipParentName | constant | Parent property name to skip when writing component data. |
Uses
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
