Files
OCCT/src/DBC/DBC_VArray.cdl
bugmaster b311480ed5 0023024: Update headers of OCCT files
Added appropriate copyright and license information in source files
2012-03-21 19:43:04 +04:00

122 lines
4.0 KiB
Plaintext
Executable File

-- Created on: 1996-01-30
-- Created by: Kernel
-- Copyright (c) 1996-1999 Matra Datavision
-- Copyright (c) 1999-2012 OPEN CASCADE SAS
--
-- The content of this file is subject to the Open CASCADE Technology Public
-- License Version 6.5 (the "License"). You may not use the content of this file
-- except in compliance with the License. Please obtain a copy of the License
-- at http://www.opencascade.org and read it completely before using this file.
--
-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
--
-- The Original Code and all software distributed under the License is
-- distributed on an "AS IS" basis, without warranty of any kind, and the
-- Initial Developer hereby disclaims all such warranties, including without
-- limitation, any warranties of merchantability, fitness for a particular
-- purpose or non-infringement. Please see the License for the specific terms
-- and conditions governing the rights and limitations under the License.
generic class VArray from DBC (Item as Storable) inherits BaseArray from DBC
---Purpose: The class VArray represents a unidimensional
-- array of fixed size known at execution time.
-- The range of the element is user defined and varies
-- from 0 to N - 1.
-- Warning: Programs client of such a class must be independant
-- of the range of the last element. Thus, a C++ "for"
-- loop must be written like this
--
-- for (i = 0; i < A.Size(); i++)
-- Implement for ObjectStore and Objectivity
-- with the same functionnality
-- Purpose: New development for OBJY 3.5
uses
BaseArray from DBC
raises NegativeValue, OutOfRange , DimensionMismatch, NullObject
class VArrayNode from DBC
inherits ArrayNode from PStandard
is
Create returns mutable VArrayNode from DBC;
Create(aValue : Item) returns mutable VArrayNode from DBC;
SetValue(me : mutable; aValue : Item);
Value(me) returns Address from Standard;
fields
myValue : Item;
end;
---Purpose: for DFLT profile, we dont need persistent nodes
class VArrayTNode from DBC
is
Create returns VArrayTNode from DBC;
---C++: inline
Create(aValue : Item) returns VArrayTNode from DBC;
---C++: inline
SetValue(me : out; aValue : Item);
---C++: inline
Value(me) returns Address from Standard;
---C++: inline
fields
myValue : Item;
end;
is
Create returns VArray;
---Puspose: Creates an array of null size
-- Raise NullOject if there is no
-- default database
Create (Size: Integer) returns VArray
---Purpose: Creates an array of lower bound 0 and
-- upper bound <Size>-1 . NegativeValue is raised
-- when <Size> is less than 0.
raises NegativeValue;
Create (Varray: VArray) returns VArray;
---Purpose: Creates an array which is the copy of the given
-- argument.
Resize (me : in out; Size: Integer)
raises NegativeValue;
---Purpose: Change the size of an array with lower
-- bound 0 and upper bound <Size>-1 . NegativeValue
-- is raised when <Size> is less than 0.
Assign (me: in out; Other: VArray from DBC)
---Purpose: copy the contents of <Other> into <me>.
-- <Other> and <me> must have the same dimension.
---C++: alias operator =
raises DimensionMismatch from Standard
is static;
SetValue (me : in out; Index: Integer; Value: Item)
---Purpose: Sets the <Index>th element of the array
-- to <Value>.
raises OutOfRange
is static ;
Value (me; Index: Integer) returns Item
---Purpose: Returns the value of the <Index>th element
-- of the array.
---C++: alias operator ()
---C++: return &
raises OutOfRange
is static;
Destroy(me : in out);
---C++: alias ~
end VArray ;