mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0033470: Application Framework - TDataStd_NamedData HasSmth() methods return true for empty containers.
Add checks for empty containers.
This commit is contained in:
parent
2b5ee7c791
commit
4ce99d9697
@ -86,6 +86,15 @@ void TDataStd_NamedData::clear()
|
|||||||
|
|
||||||
//Category: Integers
|
//Category: Integers
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : HasIntegers
|
||||||
|
//purpose : Returns true if at least one named integer value is kept in the attribute.
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean TDataStd_NamedData::HasIntegers() const
|
||||||
|
{
|
||||||
|
return !myIntegers.IsNull() && !myIntegers->Map().IsEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : HasInteger
|
//function : HasInteger
|
||||||
//purpose : Returns true if the attribute contains this named integer.
|
//purpose : Returns true if the attribute contains this named integer.
|
||||||
@ -186,6 +195,15 @@ void TDataStd_NamedData::ChangeIntegers(const TColStd_DataMapOfStringInteger& th
|
|||||||
//Category: Reals
|
//Category: Reals
|
||||||
// =====
|
// =====
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : HasReals
|
||||||
|
//purpose : Returns true if at least one named real value is kept in the attribute.
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean TDataStd_NamedData::HasReals() const
|
||||||
|
{
|
||||||
|
return !myReals.IsNull() && !myReals->Map().IsEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : HasReal
|
//function : HasReal
|
||||||
//purpose : Returns true if the attribute contains this named real.
|
//purpose : Returns true if the attribute contains this named real.
|
||||||
@ -283,6 +301,16 @@ void TDataStd_NamedData::ChangeReals(const TDataStd_DataMapOfStringReal& theReal
|
|||||||
|
|
||||||
//Category: Strings
|
//Category: Strings
|
||||||
// =======
|
// =======
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : HasStrings
|
||||||
|
//purpose : Returns true if there are some named strings in the attribute.
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean TDataStd_NamedData::HasStrings() const
|
||||||
|
{
|
||||||
|
return !myStrings.IsNull() && !myStrings->Map().IsEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : HasString
|
//function : HasString
|
||||||
//purpose : Returns true if the attribute contains this named string.
|
//purpose : Returns true if the attribute contains this named string.
|
||||||
@ -383,6 +411,16 @@ void TDataStd_NamedData::ChangeStrings(const TDataStd_DataMapOfStringString& the
|
|||||||
|
|
||||||
//Category: Bytes
|
//Category: Bytes
|
||||||
// =====
|
// =====
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : HasBytes
|
||||||
|
//purpose : Returns true if there are some named bytes in the attribute.
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean TDataStd_NamedData::HasBytes() const
|
||||||
|
{
|
||||||
|
return !myBytes.IsNull() && !myBytes->Map().IsEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : HasByte
|
//function : HasByte
|
||||||
//purpose : Returns true if the attribute contains this named byte.
|
//purpose : Returns true if the attribute contains this named byte.
|
||||||
@ -482,6 +520,16 @@ void TDataStd_NamedData::ChangeBytes(const TDataStd_DataMapOfStringByte& theByte
|
|||||||
|
|
||||||
//Category: Arrays of integers
|
//Category: Arrays of integers
|
||||||
// ==================
|
// ==================
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : HasArrayOfIntegers
|
||||||
|
//purpose : Returns true if there are some named arrays of integer values in the attribute.
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean TDataStd_NamedData::HasArraysOfIntegers() const
|
||||||
|
{
|
||||||
|
return !myArraysOfIntegers.IsNull() && !myArraysOfIntegers->Map().IsEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : HasArrayOfIntegers
|
//function : HasArrayOfIntegers
|
||||||
//purpose : Returns true if the attribute contains this named array
|
//purpose : Returns true if the attribute contains this named array
|
||||||
@ -569,6 +617,16 @@ void TDataStd_NamedData::ChangeArraysOfIntegers
|
|||||||
|
|
||||||
//Category: Arrays of reals
|
//Category: Arrays of reals
|
||||||
// ===============
|
// ===============
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : HasArrayOfReals
|
||||||
|
//purpose : Returns true if there are some named arrays of real values in the attribute.
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean TDataStd_NamedData::HasArraysOfReals() const
|
||||||
|
{
|
||||||
|
return !myArraysOfReals.IsNull() && !myArraysOfReals->Map().IsEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : HasArrayOfReals
|
//function : HasArrayOfReals
|
||||||
//purpose : Returns true if the attribute contains this named array of
|
//purpose : Returns true if the attribute contains this named array of
|
||||||
|
@ -52,7 +52,7 @@ public:
|
|||||||
Standard_EXPORT TDataStd_NamedData();
|
Standard_EXPORT TDataStd_NamedData();
|
||||||
|
|
||||||
//! Returns true if at least one named integer value is kept in the attribute.
|
//! Returns true if at least one named integer value is kept in the attribute.
|
||||||
Standard_Boolean HasIntegers() const { return !myIntegers.IsNull(); }
|
Standard_EXPORT Standard_Boolean HasIntegers() const;
|
||||||
|
|
||||||
//! Returns true if the attribute contains specified by Name
|
//! Returns true if the attribute contains specified by Name
|
||||||
//! integer value.
|
//! integer value.
|
||||||
@ -74,7 +74,7 @@ public:
|
|||||||
Standard_EXPORT void ChangeIntegers (const TColStd_DataMapOfStringInteger& theIntegers);
|
Standard_EXPORT void ChangeIntegers (const TColStd_DataMapOfStringInteger& theIntegers);
|
||||||
|
|
||||||
//! Returns true if at least one named real value is kept in the attribute.
|
//! Returns true if at least one named real value is kept in the attribute.
|
||||||
Standard_Boolean HasReals() const { return !myReals.IsNull(); }
|
Standard_EXPORT Standard_Boolean HasReals() const;
|
||||||
|
|
||||||
//! Returns true if the attribute contains a real specified by Name.
|
//! Returns true if the attribute contains a real specified by Name.
|
||||||
Standard_EXPORT Standard_Boolean HasReal (const TCollection_ExtendedString& theName) const;
|
Standard_EXPORT Standard_Boolean HasReal (const TCollection_ExtendedString& theName) const;
|
||||||
@ -95,7 +95,7 @@ public:
|
|||||||
Standard_EXPORT void ChangeReals (const TDataStd_DataMapOfStringReal& theReals);
|
Standard_EXPORT void ChangeReals (const TDataStd_DataMapOfStringReal& theReals);
|
||||||
|
|
||||||
//! Returns true if there are some named strings in the attribute.
|
//! Returns true if there are some named strings in the attribute.
|
||||||
Standard_Boolean HasStrings() const { return !myStrings.IsNull(); }
|
Standard_EXPORT Standard_Boolean HasStrings() const;
|
||||||
|
|
||||||
//! Returns true if the attribute contains this named string.
|
//! Returns true if the attribute contains this named string.
|
||||||
Standard_EXPORT Standard_Boolean HasString (const TCollection_ExtendedString& theName) const;
|
Standard_EXPORT Standard_Boolean HasString (const TCollection_ExtendedString& theName) const;
|
||||||
@ -116,7 +116,7 @@ public:
|
|||||||
Standard_EXPORT void ChangeStrings (const TDataStd_DataMapOfStringString& theStrings);
|
Standard_EXPORT void ChangeStrings (const TDataStd_DataMapOfStringString& theStrings);
|
||||||
|
|
||||||
//! Returns true if there are some named bytes in the attribute.
|
//! Returns true if there are some named bytes in the attribute.
|
||||||
Standard_Boolean HasBytes() const { return !myBytes.IsNull(); }
|
Standard_EXPORT Standard_Boolean HasBytes() const;
|
||||||
|
|
||||||
//! Returns true if the attribute contains this named byte.
|
//! Returns true if the attribute contains this named byte.
|
||||||
Standard_EXPORT Standard_Boolean HasByte (const TCollection_ExtendedString& theName) const;
|
Standard_EXPORT Standard_Boolean HasByte (const TCollection_ExtendedString& theName) const;
|
||||||
@ -137,7 +137,7 @@ public:
|
|||||||
Standard_EXPORT void ChangeBytes (const TDataStd_DataMapOfStringByte& theBytes);
|
Standard_EXPORT void ChangeBytes (const TDataStd_DataMapOfStringByte& theBytes);
|
||||||
|
|
||||||
//! Returns true if there are some named arrays of integer values in the attribute.
|
//! Returns true if there are some named arrays of integer values in the attribute.
|
||||||
Standard_Boolean HasArraysOfIntegers() const { return !myArraysOfIntegers.IsNull(); }
|
Standard_EXPORT Standard_Boolean HasArraysOfIntegers() const;
|
||||||
|
|
||||||
//! Returns true if the attribute contains this named array of integer values.
|
//! Returns true if the attribute contains this named array of integer values.
|
||||||
Standard_EXPORT Standard_Boolean HasArrayOfIntegers (const TCollection_ExtendedString& theName) const;
|
Standard_EXPORT Standard_Boolean HasArrayOfIntegers (const TCollection_ExtendedString& theName) const;
|
||||||
@ -164,7 +164,7 @@ public:
|
|||||||
Standard_EXPORT void ChangeArraysOfIntegers (const TDataStd_DataMapOfStringHArray1OfInteger& theArraysOfIntegers);
|
Standard_EXPORT void ChangeArraysOfIntegers (const TDataStd_DataMapOfStringHArray1OfInteger& theArraysOfIntegers);
|
||||||
|
|
||||||
//! Returns true if there are some named arrays of real values in the attribute.
|
//! Returns true if there are some named arrays of real values in the attribute.
|
||||||
Standard_Boolean HasArraysOfReals() const { return !myArraysOfReals.IsNull(); }
|
Standard_EXPORT Standard_Boolean HasArraysOfReals() const;
|
||||||
|
|
||||||
//! Returns true if the attribute contains this named array of real values.
|
//! Returns true if the attribute contains this named array of real values.
|
||||||
Standard_EXPORT Standard_Boolean HasArrayOfReals (const TCollection_ExtendedString& theName) const;
|
Standard_EXPORT Standard_Boolean HasArrayOfReals (const TCollection_ExtendedString& theName) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user