mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027813: Visualization - add method V3d_View::DiagnosticInformation() similar to vglinfo command
New method V3d_View::DiagnosticInformation() has been introduced providing the access to low-level OpenGL context information for diagnostic automated reports or displaying in application About System.
This commit is contained in:
@@ -570,6 +570,34 @@ Standard_Boolean TCollection_AsciiString::IsEqual
|
||||
return ( strncmp( other.mystring, mystring, mylength ) == 0 );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// IsSameString
|
||||
// ----------------------------------------------------------------------------
|
||||
Standard_Boolean TCollection_AsciiString::IsSameString (const TCollection_AsciiString& theString1,
|
||||
const TCollection_AsciiString& theString2,
|
||||
const Standard_Boolean theIsCaseSensitive)
|
||||
{
|
||||
const Standard_Integer aSize1 = theString1.Length();
|
||||
if (aSize1 != theString2.Length())
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
if (theIsCaseSensitive)
|
||||
{
|
||||
return (strncmp (theString1.ToCString(), theString2.ToCString(), aSize1) == 0);
|
||||
}
|
||||
|
||||
for (Standard_Integer aCharIter = 1; aCharIter <= aSize1; ++aCharIter)
|
||||
{
|
||||
if (toupper (theString1.Value (aCharIter)) != toupper (theString2.Value (aCharIter)))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
}
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// IsEmpty
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -659,6 +659,10 @@ friend Standard_EXPORT Standard_IStream& operator >> (Standard_IStream& astream,
|
||||
//! (Just for HashCode for AsciiString)
|
||||
static Standard_Boolean IsEqual (const TCollection_AsciiString& string1, const Standard_CString string2);
|
||||
|
||||
//! Returns True if the strings contain same characters.
|
||||
Standard_EXPORT static Standard_Boolean IsSameString (const TCollection_AsciiString& theString1,
|
||||
const TCollection_AsciiString& theString2,
|
||||
const Standard_Boolean theIsCaseSensitive);
|
||||
|
||||
friend class TCollection_HAsciiString;
|
||||
|
||||
|
@@ -320,19 +320,7 @@ Standard_Boolean TCollection_HAsciiString::IsSameString
|
||||
const Standard_Boolean CaseSensitive) const
|
||||
{
|
||||
if(S.IsNull()) Standard_NullObject::Raise("TCollection_HAsciiString::IsSameString");
|
||||
|
||||
const Standard_Integer size1 = Length();
|
||||
if ( size1 != S->Length() ) return Standard_False;
|
||||
if ( CaseSensitive ) {
|
||||
return ( strncmp( myString.ToCString(), S->ToCString(), size1 ) == 0 );
|
||||
}
|
||||
else {
|
||||
for ( Standard_Integer i = 1 ; i <= size1; i++) {
|
||||
if ( toupper( Value(i) ) != toupper( S->Value(i) ) )
|
||||
return Standard_False;
|
||||
}
|
||||
return Standard_True ;
|
||||
}
|
||||
return TCollection_AsciiString::IsSameString (myString, S->myString, CaseSensitive);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user