- Added check of array's boundary in Set(i, val) methods.
- Added comments to cdl files.
- removed accidental modification in TDataStd_ExtStringArray::Value(i).
- recovering accidentally lost modifications.
index :Integer from Standard;
value : Boolean from Standard);
---Purpose: Sets the <Index>th element of the array to <Value>
+ -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array.
Value (me;
Index : Integer from Standard)
void TDataStd_BooleanArray::SetValue (const Standard_Integer index,
const Standard_Boolean value)
{
-#ifdef DEB
- if (myValues.IsNull())
- return;
- if (index < myLower || index > myUpper)
- return;
-#endif
+ if (myValues.IsNull())
+ return;
Standard_Integer byte_index = (index - myLower) >> 3;
Standard_Integer degree = index - (byte_index << 3) - myLower;
Standard_Integer byte_value = DegreeOf2(degree);
index :Integer from Standard;
value : Byte from Standard);
---Purpose: Sets the <Index>th element of the array to <Value>
+ -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array.
Value (me;
Index : Integer from Standard)
void TDataStd_ByteArray::SetValue (const Standard_Integer index,
const Standard_Byte value)
{
+ if (myValue.IsNull())
+ return;
if (value == myValue->Value(index))
return;
Backup();
SetValue (me : mutable; Index : Integer from Standard; Value : ExtendedString from TCollection);
---Purpose: Sets the <Index>th element of the array to <Value>
+ -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array.
Value (me; Index : Integer from Standard)
---Purpose: Returns the value of the <Index>th element of the array
SetValue (me : mutable; Index, Value : Integer from Standard);
---Purpose: Sets the <Index>th element of the array to <Value>
+ -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array.
Value (me; Index : Integer from Standard)
---Purpose: Return the value of the <Index>th element of the array
{
if(myValue.IsNull()) return;
if( myValue->Value(index) == value)
- return;
+ return;
Backup();
myValue->SetValue(index, value);
}
SetValue (me : mutable; Index :Integer from Standard; Value : Real from Standard);
---Purpose: Sets the <Index>th element of the array to <Value>
+ -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array.
Value (me; Index : Integer from Standard)
---Purpose: Return the value of the <Index>th element of the array
// OCC2932 correction
if(myValue.IsNull()) return;
if(myValue->Value(index) == value)
- return;
-
+ return;
Backup();
myValue->SetValue(index, value);
}
index :Integer from Standard;
value : Label from TDF);
---Purpose: Sets the <Index>th element of the array to <Value>
+ -- OutOfRange exception is raised if <Index> doesn't respect Lower and Upper bounds of the internal array.
Value (me;
Index : Integer from Standard)
void TDataStd_ReferenceArray::SetValue (const Standard_Integer index,
const TDF_Label& value)
{
+ if(myArray.IsNull()) return;
if (value == myArray->Value(index))
return;
-
Backup();
myArray->SetValue(index, value);
//purpose :
//=======================================================================
void TDataStd_ReferenceArray::SetInternalArray (const Handle(TDataStd_HLabelArray1)& values,
- const Standard_Boolean /*isCheckItem*/)
+ const Standard_Boolean isCheckItem)
{
// myArray = values;
Standard_Integer aLower = values->Lower();