ML Reference
MeVis/Foundation/Sources/MLUtilities/mlUtilsSystemC.h File Reference

Pure C global definitions for mlUtils and ML. More...

#include "mlConfig.h"
#include "mlTypeDefs.h"
#include "mlSystemWarningsDisable.h"
#include <stdlib.h>
#include <stdio.h>
#include "mlSystemWarningsRestore.h"

Go to the source code of this file.

Defines

#define ML_UTILS_EXPORT   ML_LIBRARY_IMPORT_ATTRIBUTE
 Defines platform dependent DLL export macro for mlUtils.

Global non constant constants for "always true" or "always false" expressions.

ML_UTILS_EXPORT int MLAlwaysTrue
 Variable which is always true (=1), but non constant to make it impossible for compilers to detect that it is constant.
ML_UTILS_EXPORT int MLAlwaysFalse
 Variable which is always false (=0), but non constant to make it impossible for compilers to detect that it is constant.
ML_UTILS_EXPORT int MLAlwaysExecuted ()
 A do-nothing function call which cannot be optimized away to avoid that function bodies etc.
#define strcasecmp(a, b)   _stricmp((a),(b))
 Implement strcasecmp by providing the internal WIN32 API-version.
#define strncasecmp(a, b, c)   _strnicmp((a),(b),(c))
 Implement strncasecmp by providing the internal WIN32 API-version.
#define strtold(a, b)   strtod((a),(b))
 Implement strtold on WIN32 Microsoft platforms by strtod since long double and double are identical.
#define snprintf   _snprintf
#define MLsnprintf   _snprintf
#define MLsscanf   sscanf
ML_UTILS_EXPORT MLint64 MLint64Scan (const char *source, char **endPtr) ML_RETURN_VALUE_SHOULD_BE_USED
 Reads an MLint64 from a character string source and returns scanned value as MLint64.
ML_UTILS_EXPORT MLuint64 MLuint64Scan (const char *source, char **endPtr) ML_RETURN_VALUE_SHOULD_BE_USED
 Reads an MLuint64 from a character string source and returns scanned value as MLuint64.

Detailed Description

Pure C global definitions for mlUtils and ML.

Author:
Wolf Spindler
Date:
3/2004

Definition in file mlUtilsSystemC.h.


Define Documentation

#define ML_UTILS_EXPORT   ML_LIBRARY_IMPORT_ATTRIBUTE

Defines platform dependent DLL export macro for mlUtils.

Definition at line 18 of file mlUtilsSystemC.h.

#define MLsnprintf   _snprintf

Definition at line 97 of file mlUtilsSystemC.h.

Referenced by ml::TVector< TVectorBase >::print().

#define MLsscanf   sscanf

Definition at line 98 of file mlUtilsSystemC.h.

#define snprintf   _snprintf

Definition at line 94 of file mlUtilsSystemC.h.

#define strcasecmp (   a,
 
)    _stricmp((a),(b))

Implement strcasecmp by providing the internal WIN32 API-version.

Definition at line 84 of file mlUtilsSystemC.h.

#define strncasecmp (   a,
  b,
 
)    _strnicmp((a),(b),(c))

Implement strncasecmp by providing the internal WIN32 API-version.

Definition at line 87 of file mlUtilsSystemC.h.

#define strtold (   a,
 
)    strtod((a),(b))

Implement strtold on WIN32 Microsoft platforms by strtod since long double and double are identical.

Definition at line 91 of file mlUtilsSystemC.h.


Function Documentation

ML_UTILS_EXPORT int MLAlwaysExecuted ( )

A do-nothing function call which cannot be optimized away to avoid that function bodies etc.

are optimized away, that they are considered as non constant and that corresponding warnings are created. It is needed for compile technical solutions to avoid warnings. Returns always 1. See also MLAlwaysTrue MLAlwaysFalse.

ML_UTILS_EXPORT MLint64 MLint64Scan ( const char *  source,
char **  endPtr 
)

Reads an MLint64 from a character string source and returns scanned value as MLint64.

Parameters:
sourceis the string to be parsed. Leading white spaces are ignored.
endPtris the pointer to the first character after scanned string or to source if scan failed.
Returns:
is a valid 64 bit signed integer if the string could be scanned. successfully; otherwise it is returned with a value given by source. This function is necessary since Microsoft forgot to implement _strtoi64 although it is well documented in the MSDN.
ML_UTILS_EXPORT MLuint64 MLuint64Scan ( const char *  source,
char **  endPtr 
)

Reads an MLuint64 from a character string source and returns scanned value as MLuint64.

Parameters:
sourceis the string to be parsed. Leading white spaces are ignored.
endPtris the pointer to the first character after scanned string or to source if scan failed.
Returns:
is a valid 64 bit unsigned integer if the string could be scanned. successfully; otherwise it is returned with a value given by source. This function is necessary since Microsoft forgot to implement _strtoui64 although it's well documented in the MSDN.

Variable Documentation

ML_UTILS_EXPORT int MLAlwaysFalse

Variable which is always false (=0), but non constant to make it impossible for compilers to detect that it is constant.

It is needed for compile technical solutions in debug/release constructs which require always false expressions, e.g., in ML_TRY / ML_CATCH expressions. It must never be set! See also MLAlwaysTrue.

ML_UTILS_EXPORT int MLAlwaysTrue

Variable which is always true (=1), but non constant to make it impossible for compilers to detect that it is constant.

It is needed for compile technical solutions in debug/release constructs which require always true expressions, e.g., in ML_TRY / ML_CATCH expressions. It must never be set! See also MLAlwaysFalse.