1 -- Created on: 1993-03-17
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 deferred generic class ProtocolTemplate from LibCtl
21 ---Purpose : This class is a Template class for Library : there is no
22 -- obligation to inherit it for instantiate a Library class.
24 -- A Protocol class defines a data scheme by gathering a set of
25 -- Object Classes. This set is made of :
26 -- - As necessary, other sets already defined by other Protocols.
27 -- These Protocols are the Resources of <myclass>
28 -- This definition can be recurrent : each Protocol class
29 -- defines its Resources at immediate level
30 -- - The list of Object Classes it identifies DIRECTLY (itself),
31 -- i.e. not through its Resources.
33 -- A classic Selection criterium is DynamicType (for a Transient
34 -- or Persistent Object), this gives a Case Number per Class. If
35 -- another criterium is taken, it must assume unique and non-
36 -- ambiguous binding between an object state and a Cse Number.
38 -- For each Object Class (or recognized state) it identifies
39 -- directly, it provides a unique positive Number, which can be
40 -- used as Case Number.
42 -- A Module bound with a Protocol class is assumed to accept any
43 -- Object of a Class it defines DIRECTLY (not its Resources).
49 NbResources (me) returns Integer is deferred;
50 ---Purpose : Gives the count of Protocols used as Resource (can be zero)
52 Resource (me; num : Integer) returns ProtocolTemplate is deferred;
53 ---Purpose : Returns a Resource, given a rank.
55 CaseNumber (me; obj : any TheObject) returns Integer is deferred;
56 ---Purpose : Returns a Case Number, specific of each recognized Object
57 -- This is a positive number. Zero means "<obj> not recognized"