TStreamTemplates Class

Header: Dew.Signal/SignalTools.h · Cross-compiler
tObjectTStreamTemplates

class TStreamTemplates : public tObject;

Streamable list of lists.

The class handles storing, loading, decoding and encoding of a list of streams. The list of streams is stored in the Templates property. Each stream holds another list of objects. This lists are of TStreamedList type. When the user sets the TemplateIndex or the TemplateName property, the appropriate stream is decoded to Template property, where individual objects contained in the list can be accessed. All changes to those objects are retained and Templates property is kept up-to-date. For TStreamTemplates to handle user defined type of objects, a new class should be derived from TStreamedList type.

Constructors

NameDescription
TStreamTemplates (2)

Destructors

NameDescription
~TStreamTemplates

Properties

NameTypeDescription
OwnertObject*Returns the owner object.
TemplateTStreamedList*Holds a list of objects.
TemplateIndexintSet TemplateIndex to decode the stream at position TemplateIndex to Template property.
TemplateNameDewStringSet TemplateName to decode the stream with name TemplateName to Template property.
TemplatesTStringStreamList*Holds the list of streams containing data to be decoded to the Template property.

Methods

NameDescription
AddCopyTemplateAdd a new template named S to the list of templates and set TemplateIndex to point to the template added.
AddTemplateAdd a new template (TMemoryStream) named S to the list.
Assign
ClearClears the Templates and Template properties.
ConsolidateCall this method to ensure that Template and Templates properties are synchronized.
DeleteDelete the template at position Index from the Templates property.
LoadFromFileLoad the object from the file.
LoadFromStreamLoad all data from the stream.
SaveToFileSave the object to the file.
SaveToStreamSave all data to the stream.
UpdateCalls the Template.Update method.