Delphi 中自定义对象保存到文件?
TChannel=classprivatefParent:TServer;fIndex:Integer;fChannelHandle:Integer;fPicCfg:TR...
TChannel = class
private
fParent: TServer;
fIndex: Integer;
fChannelHandle: Integer;
fPicCfg: TRmPicSet;
fPicCfgChanged: Boolean;
fPicCfgLoaded: Boolean;
fRecordCfgSet: TRmEncodeSet;
fRecordCfg: TRmEncodeInfo;
fRecordCfgChanged: Boolean;
fRecordCfgLoaded: Boolean;
.....................;
像 TChannel 这样的对象该怎么保存到文件中去呢?
TServer 的类型:TServer = class(TObjectList)......
TRmPicSet ,TRmEncodeSet,TRmEncodeInfo 都是自定义的对象,比如:
PRmPicSet = ^TRmPicSet;
TRmPicSet = record
EnabledOSD: BOOL;
OSDX: Integer;
OSDY: Integer;
OSDType: tagString256;
EnabledChannelName: BOOL;
ChannelNameX: Integer;
ChannelNameY: Integer;
ChannelName: tagString32;
Transparent: BOOL; //是否透明
end; 展开
private
fParent: TServer;
fIndex: Integer;
fChannelHandle: Integer;
fPicCfg: TRmPicSet;
fPicCfgChanged: Boolean;
fPicCfgLoaded: Boolean;
fRecordCfgSet: TRmEncodeSet;
fRecordCfg: TRmEncodeInfo;
fRecordCfgChanged: Boolean;
fRecordCfgLoaded: Boolean;
.....................;
像 TChannel 这样的对象该怎么保存到文件中去呢?
TServer 的类型:TServer = class(TObjectList)......
TRmPicSet ,TRmEncodeSet,TRmEncodeInfo 都是自定义的对象,比如:
PRmPicSet = ^TRmPicSet;
TRmPicSet = record
EnabledOSD: BOOL;
OSDX: Integer;
OSDY: Integer;
OSDType: tagString256;
EnabledChannelName: BOOL;
ChannelNameX: Integer;
ChannelNameY: Integer;
ChannelName: tagString32;
Transparent: BOOL; //是否透明
end; 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询