0022627: Change OCCT memory management defaults
[occt.git] / src / Law / Law_Composite.cdl
1 -- File:        Law_Composite.cdl
2 -- Created:     Fri Mar 29 10:39:22 1996
3 -- Author:      Laurent BOURESCHE
4 --              <lbo@phylox>
5 ---Copyright:    Matra Datavision 1996
6
7
8 class Composite from Law inherits Function from Law
9
10         ---Purpose: Loi  composite constituee  d une liste  de lois de
11         --          ranges consecutifs.
12         --          Cette implementation un peu lourde permet de reunir
13         --          en une seule loi des portions de loi construites de 
14         --          facon independantes (par exemple en interactif) et 
15         --          de lancer le walking d un coup a l echelle d une 
16         --          ElSpine. 
17         --          CET OBJET REPOND DONC A UN PROBLEME D IMPLEMENTATION
18         --          SPECIFIQUE AUX CONGES!!!
19
20 uses
21     Laws from Law,
22     Array1OfReal    from TColStd,
23     Shape           from GeomAbs
24       
25 raises OutOfRange from Standard   
26  
27 is
28
29     Create returns mutable Composite from Law;
30     ---Purpose: Construct an empty Law
31     
32     Create (First, Last : Real; 
33             Tol :Real)
34         ---Purpose: Construct an empty, trimed Law
35     returns mutable Composite from Law;   
36     
37     Continuity(me) returns Shape from GeomAbs
38     is redefined static;
39     
40     NbIntervals(me; S : Shape from GeomAbs) returns Integer
41         ---Purpose: Returns  the number  of  intervals for  continuity
42         --          <S>. May be one if Continuity(me) >= <S>
43     is redefined static;
44     
45     Intervals(me; T : in out Array1OfReal from TColStd; 
46                   S : Shape from GeomAbs)
47         ---Purpose: Stores in <T> the  parameters bounding the intervals
48         --          of continuity <S>.
49         --          
50         --          The array must provide  enough room to  accomodate
51         --          for the parameters. i.e. T.Length() > NbIntervals()
52     raises
53         OutOfRange from Standard 
54     is redefined static;
55         
56     Value(me: mutable; X: Real from Standard)
57     ---Purpose: Returns the value at parameter X.
58     returns Real from Standard;
59
60     D1(me: mutable; X: Real from Standard; F,D: out Real from Standard);
61     ---Purpose: Returns the value and the first derivative at parameter X.
62               
63     D2(me: mutable; X: Real from Standard; 
64        F,D, D2: out Real from Standard);
65     ---Purpose: Returns the value, first and second derivatives 
66     --          at parameter X.
67         
68     Trim(me; PFirst, PLast, Tol :Real from Standard) returns Function
69     
70     ---Purpose:   Returns a  law equivalent of  <me>  between
71         --        parameters <First>  and <Last>. <Tol>  is used  to
72         --        test for 3d points confusion.
73         --        It is usfule to determines the derivatives 
74         --        in these values <First> and <Last> if 
75         --        the Law is not Cn.          
76     is redefined static;    
77     
78
79     Bounds(me: mutable; PFirst,PLast : out Real from Standard);
80     ---Purpose: Returns the parametric bounds of the function.
81
82     Prepare(me: mutable; W : in out Real from Standard)
83     ---Purpose: Set the current function.
84     is static private;
85
86     ChangeElementaryLaw(me: mutable; W : Real from Standard)
87     ---C++: return &
88     returns mutable Function from Law
89     ---Purpose: Returns the elementary  function of the composite used
90     --          to compute at parameter W.
91     is static;
92
93     ChangeLaws(me : mutable)
94     ---C++: return &
95     returns Laws from Law
96     is static;
97
98     IsPeriodic(me) 
99     returns Boolean from Standard
100     is static;
101
102     SetPeriodic(me : mutable) 
103     is static;
104
105 fields
106
107 first     : Real from Standard;
108 last      : Real from Standard;
109 curfunc   : Function from Law;
110 funclist  : Laws from Law;
111 periodic  : Boolean from Standard;
112 TFirst    : Real from Standard;
113 TLast     : Real from Standard;
114 PTol      : Real from Standard;
115
116 end Composite;