0024947: Redesign OCCT legacy type system
[occt.git] / src / IFSelect / IFSelect_DispPerFiles.cdl
1 -- Created on: 1994-12-21
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1994-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class DispPerFiles  from IFSelect  inherits Dispatch
18
19     ---Purpose : A DispPerFiles produces a determined count of Packets from the
20     --           input Entities. It divides, as equally as possible, the input
21     --           list into a count of files. This count is the parameter of the
22     --           DispPerFiles. If the input list has less than this count, of
23     --           course there will be one packet per input entity.
24     --           This count is a Parameter of the DispPerFiles, given as an
25     --           IntParam, thus allowing external control of its Value
26
27 uses AsciiString from TCollection, Graph, SubPartsIterator, IntParam
28
29 raises InterfaceError
30
31 is
32
33     Create returns DispPerFiles;
34     ---Purpose : Creates a DispPerFiles with no Count (default value 1 file)
35
36     Count (me) returns IntParam;
37     ---Purpose : Returns the Count Parameter used for splitting
38
39     SetCount (me : mutable; count : IntParam);
40     ---Purpose : Sets a new Parameter for Count
41
42     CountValue (me) returns Integer;
43     ---Purpose : Returns the effective value of the count parameter
44     --           (if Count Parameter not Set or value not positive, returns 1)
45
46     Label (me) returns AsciiString from TCollection;
47     ---Purpose : Returns as Label, "Maximum <count> Files"
48
49         --  --    Evaluation    --  --
50
51     LimitedMax (me; nbent : Integer; max : out Integer) returns Boolean
52         is redefined;
53     ---Purpose : Returns True, maximum count is given as CountValue
54
55     PacketsCount (me; G : Graph; count : out Integer) returns Boolean
56         is redefined;
57     ---Purpose : Returns True (count is easy to know) and count is the minimum
58     --           value between  length of input list and CountValue
59
60     Packets (me; G : Graph; packs : in out SubPartsIterator)
61         raises InterfaceError;
62     ---Purpose : Computes the list of produced Packets. It defines Packets in
63     --           order to have <Count> Packets, except if the input count of
64     --           Entities is lower. Entities are given by RootResult from the
65     --           Final Selection.
66
67 fields
68
69     thecount : IntParam;
70
71 end DispPerFiles;