Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

exotkUtils Class Reference

Basic utility class. More...

#include <exotkUtils.hxx>

List of all members.

Public Methods

void * operator new (size_t, void *anAddress)
 OCC new. More...

void * operator new (size_t size)
 OCC new. More...

void operator delete (void *anAddress)
 OCC delete. More...


Static Public Methods

Standard_EXPORT TCollection_AsciiString CurrentDateToAsciiString (const enum exotkUtils_DateFormat aDateFormat)
 convert the current date to asciistring. More...

Standard_EXPORT TCollection_AsciiString DateToAsciiString (const enum exotkUtils_DateFormat aDateFormat, const Quantity_Date &aDate)
 convert aDate to asciiString. More...

Standard_EXPORT Quantity_Color ConvertColor (const exotkUtils_ColorRef &aColorRef)
 Convert a "MFC" Color to a Quantity_Color. More...

Standard_EXPORT exotkUtils_ColorRef ConvertColor (const Quantity_Color &aColor)
 Convert aColor to a "MFC" Color. More...

Standard_EXPORT Standard_Boolean AsciiStringToReal (const TCollection_AsciiString &aStringToConvert, Standard_Real &aRealResult)
 Convert an AsciiString the Standard_Real This function is used because sometimes (?) the Method TCollection_AsciiString::IsRealValue() returns a wrong result.... More...

Standard_EXPORT Standard_Boolean AsciiStringToInteger (const TCollection_AsciiString &aStringToConvert, Standard_Integer &anIntegerResult)
 Convert an AsciiString to Standard_Integer This function is used because sometimes (?) the Method TCollection_AsciiString::IsIntegerValue() returns a wrong result.... More...

Standard_EXPORT Standard_Real TruncateReal (const Standard_Real aRealToTruncate, const Standard_Integer aNegNb=3)
 Truncate aRealToTruncate ( ex TruncateTeal(3.141592654,2) -> 3.14 ). More...

Standard_EXPORT TCollection_AsciiString TruncateRealToAsciiString (const Standard_Real aReal, const Standard_Integer aNegNb=3, const Standard_Integer aNbChar=-1)
 Truncate aReal and convert it to string. More...

Standard_EXPORT TCollection_AsciiString ColorToAsciiString (const Quantity_Color &aColor)
 Convert aColor to string. More...

Standard_EXPORT Standard_Boolean AsciiStringToColor (const TCollection_AsciiString &aString, Quantity_Color &aColor)
 Convert aString to aColor. More...

Standard_EXPORT Standard_Boolean AsciiStringToBoolean (const TCollection_AsciiString &aString, Standard_Boolean &aBoolean)
 Convert aString to aBoolean. More...

Standard_EXPORT TCollection_AsciiString BooleanToAsciiString (const Standard_Boolean aBoolean)
 Convert aBoolean to string. More...


Detailed Description

Basic utility class.

Author:
Stephane Routelous

Definition at line 62 of file exotkUtils.hxx.


Member Function Documentation

exotkUtils::AsciiStringToBoolean const TCollection_AsciiString &    aString,
Standard_Boolean &    aBoolean
[static]
 

Convert aString to aBoolean.

Returns:
Standard_Boolean : true if success
Parameters:
aString  const TCollection_AsciiString&
Return values:
aBoolean  Standard_Boolean&

Definition at line 270 of file exotkUtils.cxx.

exotkUtils::AsciiStringToColor const TCollection_AsciiString &    aString,
Quantity_Color &    aColor
[static]
 

Convert aString to aColor.

Returns:
Standard_Boolean : true if success
Parameters:
aString  const TCollection_AsciiString&
Return values:
aColor  Quantity_Color&

Definition at line 239 of file exotkUtils.cxx.

References AsciiStringToReal().

Standard_Boolean exotkUtils::AsciiStringToInteger const TCollection_AsciiString &    aStringToConvert,
Standard_Integer &    anIntegerResult
[static]
 

Convert an AsciiString to Standard_Integer This function is used because sometimes (?) the Method TCollection_AsciiString::IsIntegerValue() returns a wrong result....

Returns:
Standard_Boolean : true if success
Parameters:
aStringToConvert  const TCollection_AsciiString&
Return values:
anIntegerResult  Standard_Integer&

Definition at line 139 of file exotkUtils.cxx.

Referenced by exotkParameter_Integer::SetParameterAsString(), and exotkParameter_Enumeration::SetParameterAsString().

Standard_Boolean exotkUtils::AsciiStringToReal const TCollection_AsciiString &    aStringToConvert,
Standard_Real &    aRealResult
[static]
 

Convert an AsciiString the Standard_Real This function is used because sometimes (?) the Method TCollection_AsciiString::IsRealValue() returns a wrong result....

Returns:
Standard_Boolean : true if success
Parameters:
aStringToConvert  const TCollection_AsciiString&
Return values:
aRealResult  Standard_Real&

Definition at line 117 of file exotkUtils.cxx.

Referenced by AsciiStringToColor(), and exotkParameter_Real::SetParameterAsString().

exotkUtils::BooleanToAsciiString const Standard_Boolean    aBoolean [static]
 

Convert aBoolean to string.

Returns:
TCollection_AsciiString
Parameters:
aBoolean  const Standard_Boolean

Definition at line 262 of file exotkUtils.cxx.

exotkUtils::ColorToAsciiString const Quantity_Color &    aColor [static]
 

Convert aColor to string.

Returns:
TCollection_AsciiString
Parameters:
aColor  const Quantity_Color&

Definition at line 234 of file exotkUtils.cxx.

References TruncateRealToAsciiString().

exotkUtils::ConvertColor const Quantity_Color &    aColor [static]
 

Convert aColor to a "MFC" Color.

Returns:
exotkUtils_ColorRef
Parameters:
aColor  const Quantity_Color&

Definition at line 99 of file exotkUtils.cxx.

References exotkUtils_ColorRef, and RGB.

exotkUtils::ConvertColor const exotkUtils_ColorRef   aColorRef [static]
 

Convert a "MFC" Color to a Quantity_Color.

Returns:
Quantity_Color
Parameters:
aColorRef  const exotkUtils_ColorRef&

Definition at line 79 of file exotkUtils.cxx.

References exotkUtils_ColorRef, GetBValue, GetGValue, and GetRValue.

exotkUtils::CurrentDateToAsciiString const enum exotkUtils_DateFormat    aDateFormat [static]
 

convert the current date to asciistring.

Returns:
TCollection_AsciiString
Parameters:
aDateFormat  const enum exotkUtils_DateFormat

Definition at line 330 of file exotkUtils.cxx.

References DateToAsciiString(), and exotkUtils_DateFormat.

Referenced by exotkTrace_File::GenerateFilename(), and exotkTrace_File::Print().

exotkUtils::DateToAsciiString const enum exotkUtils_DateFormat    aDateFormat,
const Quantity_Date &    aDate
[static]
 

convert aDate to asciiString.

Returns:
TCollection_AsciiString
Parameters:
aDateFormat  const enum exotkUtils_DateFormat
aDate  const Quantity_Date&

Definition at line 305 of file exotkUtils.cxx.

References exotkUtils_DateFormat, exotkUtils_dfFile, exotkUtils_dfText, and IntegerToAsciiStringWithTwoDigits().

Referenced by CurrentDateToAsciiString().

void exotkUtils::operator delete void *    anAddress [inline]
 

OCC delete.

Returns:
inline void
Parameters:
void  *anAddress

Definition at line 95 of file exotkUtils.hxx.

References exotkUtils_ColorRef, and exotkUtils_DateFormat.

void * exotkUtils::operator new size_t    size [inline]
 

OCC new.

Returns:
inline void*
Parameters:
size_t  size

Definition at line 84 of file exotkUtils.hxx.

void * exotkUtils::operator new size_t   ,
void *    anAddress
[inline]
 

OCC new.

Returns:
inline void*
Parameters:
size_t 
void  * anAddress

Definition at line 73 of file exotkUtils.hxx.

exotkUtils::TruncateReal const Standard_Real    aRealToTruncate,
const Standard_Integer    aNegNb = 3
[static]
 

Truncate aRealToTruncate ( ex TruncateTeal(3.141592654,2) -> 3.14 ).

Returns:
Standard_Real
Parameters:
aRealToTruncate  const Standard_Real
aNegNb  const Standard_Integer = 3

Definition at line 161 of file exotkUtils.cxx.

exotkUtils::TruncateRealToAsciiString const Standard_Real    aReal,
const Standard_Integer    aNegNb = 3,
const Standard_Integer    aNbChar = -1
[static]
 

Truncate aReal and convert it to string.

Returns:
TCollection_AsciiString
Parameters:
aReal  const Standard_Real
aNegNb  const Standard_Integer = 3
aNbChar  const Standard_Integer = -1

Definition at line 184 of file exotkUtils.cxx.

Referenced by ColorToAsciiString().


The documentation for this class was generated from the following files:
Generated on Wed Jan 23 12:18:42 2002 for exotk by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001