ScummVM
util.h File Reference

Go to the source code of this file.

Namespaces

 Common
 This is the namespace of the AGOS engine.
 

Functions

template<typename T >
ABS (T x)
 
template<typename T >
MIN (T a, T b)
 
template<typename T >
MAX (T a, T b)
 
template<typename T >
CLIP (T v, T amin, T amax)
 
template<typename T >
void SWAP (T &a, T &b)
 Template method which swaps the values of its two parameters. More...
 
void Common::hexdump (const byte *data, int len, int bytesPerLine=16, int startOffset=0)
 Print a hexdump of the data passed in. More...
 
bool Common::parseBool (const String &val, bool &valAsBool)
 Parse a string for a boolean value. More...
 
bool Common::isAlnum (int c)
 Test whether the given character is alphanumeric (a-z, A-Z, 0-9). More...
 
bool Common::isAlpha (int c)
 Test whether the given character is an alphabetic letter (a-z, A-Z). More...
 
bool Common::isDigit (int c)
 Test whether the given character is a decimal-digit (0-9). More...
 
bool Common::isXDigit (int c)
 Test whether the given character is a hwzadecimal-digit (0-9 or A-F). More...
 
bool Common::isLower (int c)
 Test whether the given character is a lower-case letter (a-z). More...
 
bool Common::isSpace (int c)
 Test whether the given character is a white-space. More...
 
bool Common::isUpper (int c)
 Test whether the given character is an upper-case letter (A-Z). More...
 
bool Common::isPrint (int c)
 Test whether the given character is printable. More...
 
bool Common::isPunct (int c)
 Test whether the given character is a punctuation character, (i.e. More...
 
bool Common::isCntrl (int c)
 Test whether the given character is a control character. More...
 
bool Common::isGraph (int c)
 Test whether the given character has a graphical representation. More...
 
Common::String Common::getHumanReadableBytes (uint64 bytes, Common::String &unitsOut)
 Represent bytes size of a file as a number with floating point and largest suitable units. More...
 

Function Documentation

◆ ABS()

template<typename T >
T ABS ( x)
inline

Definition at line 48 of file util.h.

◆ CLIP()

template<typename T >
T CLIP ( v,
amin,
amax 
)
inline

Definition at line 51 of file util.h.

◆ MAX()

template<typename T >
T MAX ( a,
b 
)
inline

Definition at line 50 of file util.h.

◆ MIN()

template<typename T >
T MIN ( a,
b 
)
inline

Definition at line 49 of file util.h.

◆ SWAP()

template<typename T >
void SWAP ( T &  a,
T &  b 
)
inline

Template method which swaps the values of its two parameters.

Definition at line 57 of file util.h.