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
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 class DispPerFiles from IFSelect inherits Dispatch
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
27 uses AsciiString from TCollection, Graph, SubPartsIterator, IntParam
33 Create returns mutable DispPerFiles;
34 ---Purpose : Creates a DispPerFiles with no Count (default value 1 file)
36 Count (me) returns mutable IntParam;
37 ---Purpose : Returns the Count Parameter used for splitting
39 SetCount (me : mutable; count : mutable IntParam);
40 ---Purpose : Sets a new Parameter for Count
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)
46 Label (me) returns AsciiString from TCollection;
47 ---Purpose : Returns as Label, "Maximum <count> Files"
49 -- -- Evaluation -- --
51 LimitedMax (me; nbent : Integer; max : out Integer) returns Boolean
53 ---Purpose : Returns True, maximum count is given as CountValue
55 PacketsCount (me; G : Graph; count : out Integer) returns Boolean
57 ---Purpose : Returns True (count is easy to know) and count is the minimum
58 -- value between length of input list and CountValue
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