diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-10-14 12:29:19 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-10-14 12:29:19 +0200 |
commit | ff7f64d95ca92b644e0d66e2195a69344895b2ce (patch) | |
tree | d822b50e87cb21b6820e31c4e07a520d3113b89e /extras/tiopf/demos/Demo_07_VisitorBasics/Client_BOM.pas | |
parent | ce211febcabb02606c0d5b45b4c8502a76d6ae58 (diff) | |
download | fpGUI-ff7f64d95ca92b644e0d66e2195a69344895b2ce.tar.xz |
Moved tiOPF related units into the tiOPF repository.
It makes more sense to have the tiOPF related units with the
rest of the tiOPF. It's easier to keep changes in sync, and have
atomic commits across the various GUI toolkits supported by tiOPF.
Diffstat (limited to 'extras/tiopf/demos/Demo_07_VisitorBasics/Client_BOM.pas')
-rw-r--r-- | extras/tiopf/demos/Demo_07_VisitorBasics/Client_BOM.pas | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/extras/tiopf/demos/Demo_07_VisitorBasics/Client_BOM.pas b/extras/tiopf/demos/Demo_07_VisitorBasics/Client_BOM.pas deleted file mode 100644 index 49195b48..00000000 --- a/extras/tiopf/demos/Demo_07_VisitorBasics/Client_BOM.pas +++ /dev/null @@ -1,81 +0,0 @@ -unit Client_BOM; - -interface -uses - tiObject - ,tiOID - ,tiOIDGUID - ,tiVisitor - ; - -type - - TClient = class; - TClientList = class; - - TClientName = String[200]; - TClientID = String[9]; - - TClientList = class(TtiObjectList); - - - TClient = class(TtiObject) - private - FClientID: TClientID; - FClientName: TClientName; - published - property ClientName: TClientName read FClientName write FClientName; - property ClientID : TClientID read FClientID write FClientID; - end; - - - TClientVisitor = class(TtiVisitor) - protected - function AcceptVisitor: boolean; override; - public - procedure Execute(const AVisited: TtiVisited); override; - end; - - -procedure RegisterMappings; - - -implementation -uses - tiOPFManager - ,tiAutoMap - ,tiConstants - ,tiDialogs - ; - -procedure RegisterMappings; -begin - // Class, Table, Property, Column, Special Info - gTIOPFManager.ClassDBMappingMgr.RegisterMapping(TClient, 'Client', 'OID', 'OID', [pktDB]); - gTIOPFManager.ClassDBMappingMgr.RegisterMapping(TClient, 'Client', 'ClientName', 'Client_Name' ); - gTIOPFManager.ClassDBMappingMgr.RegisterMapping(TClient, 'Client', 'ClientID', 'Client_ID' ); - gTIOPFManager.ClassDBMappingMgr.RegisterCollection(TClientList, TClient); -end; - -{ TClientVisitor } - -function TClientVisitor.AcceptVisitor: boolean; -begin - // Put the code to check if this visitor should act on this object in here. - Result:= Visited is TClient; - // Remove this line and the visitor will touch the TClientList object - // as well as it's owned TClient objects. -end; - -procedure TClientVisitor.Execute(const AVisited: TtiVisited); -begin - inherited; - if not AcceptVisitor then - Exit; - tiShowMessage((Visited as TtiObject).AsDebugString); -end; - -end. - - - |