MAUtil Namespace Reference


Classes

struct  BtDevice
struct  BtService
class  BluetoothDeviceDiscoveryListener
class  BluetoothServiceDiscoveryListener
class  BluetoothDiscoverer
 A class that connects to Environment and handles Bluetooth discovery operations. More...
class  BuffDownloadListener
 A listener for events from the BuffDownloader class. More...
class  BuffDownloader
 Useful to simplify asynchronous downloading of data to a memory buffer. More...
class  CharInputListener
class  CharInput
 A C++ wrapper for the text input system. More...
struct  Pair
class  ConnectionListener
 A listener for events from the Connection class. All the default implementations call maPanic(). More...
class  Connection
 An Environment-based communications class. Encapsulates MoSync's basic connection system, which supports, for example, TCP, HTTP and Bluetooth. More...
class  HttpConnectionListener
 A listener for events from the HttpConnection class. More...
class  HttpConnection
 This class describes a single HTTP 1.0 operation. More...
class  DataHandler
 Facilitates consecutive reads and writes to a MoSync data object. More...
class  Dictionary
 Thin template sorted Dictionary. More...
class  DownloadListener
 A listener for events from the Downloader class. More...
class  Downloader
 The Downloader class. Use it to simplify asynchronous downloading of files to binary resources. More...
class  ImageDownloader
 The ImageDownloader class. Use it to simplify asynchronous downloading of images to image resources. More...
class  AudioDownloader
 The AudioDownloader class. Use it to simplify asynchronous downloading of audio to audio resources. More...
class  KeyListener
 A listener for keypad events. More...
class  PointerListener
 A listener for pointer events. More...
class  BluetoothListener
 A listener for Bluetooth Discovery events. More...
class  ConnListener
 A listener for Connection events. More...
class  CloseListener
 A listener for the Close event. More...
class  IdleListener
 A listener whose function is called whenever nothing else has to be done. More...
class  TimerListener
 A listener for timer events. More...
class  FocusListener
 A listener for focus events. More...
class  Environment
 A base class for cross-platform event managers. More...
class  Point
class  Rect
class  HashMap
 Thin template HashMap. More...
class  ListenerSet
class  Map
class  Moblet
 A C++ event manager, a base class for applications. More...
class  RefCounted
 A base class for reference counting. More...
class  Set
 Thin template sorted Set. More...
class  Stack
class  StringData
class  String
 A dynamic, reference-counted string that behaves much like a subset of std::string. More...
class  Vector
 A generic, dynamic, random-access container. More...

Namespaces

namespace  PlaceholderPool

Functions

template<class T>
int Compare (const T &a, const T &b)
template<class Key>
hash_val_t THashFunction (const Key &)
template<>
hash_val_t THashFunction (const String &)
template<>
hash_val_t THashFunction (const int &)
String operator+ (const char *c, const String &s)
double clamp (double v, double a, double b)
int clamp (int v, int a, int b)
unsigned int clamp (unsigned int f, unsigned int a, unsigned int b)
double wrapInRange (double v, double a, double b)
bool inside (double a, double f, double b)
bool inside (int a, int b, int c)
bool inside (unsigned int a, unsigned int b, unsigned int c)
String doubleToString (double f, int decimals=5)
String integerToString (int i, int base=10)
String lowerString (const String &s)
String upperString (const String &s)
void stringSplit (const String &str, const String &delim, MAUtil::Vector< String > &output)
int stringToInteger (const String &s, int base=10)
double stringToDouble (const String &s)


Function Documentation

template<class T>
int MAUtil::Compare const T &  a,
const T &  b
 

Returns -1 if a < b, 0 if a == b and 1 if a > b.

template<class Key>
hash_val_t MAUtil::THashFunction const Key &   ) 
 

template<>
hash_val_t MAUtil::THashFunction const String &   ) 
 

template<>
hash_val_t MAUtil::THashFunction< int > const int &   ) 
 

String MAUtil::operator+ const char *  c,
const String &  s
[inline]
 

Returns:
A new string that is the concatenation of c and s.

double MAUtil::clamp double  v,
double  a,
double  b
 

Returns 'v' clamped to the (a..b) range, inclusively. If v is greater than b, b is returned. If v is less than a, a is returned. Otherwise, v is returned

int MAUtil::clamp int  v,
int  a,
int  b
 

Returns 'v' clamped to the (a..b) range, inclusively. If v is greater than b, b is returned. If v is less than a, a is returned. Otherwise, v is returned

unsigned int MAUtil::clamp unsigned int  f,
unsigned int  a,
unsigned int  b
 

Returns 'v' clamped to the (a..b) range, inclusively. If v is greater than b, b is returned. If v is less than a, a is returned. Otherwise, v is returned

double MAUtil::wrapInRange double  v,
double  a,
double  b
 

Returns 'v' wrapped in the (a..b) range, inclusively. If v is greater than b, it 'wraps' back from a and conversely.

bool MAUtil::inside double  a,
double  f,
double  b
 

Returns f >= a && f <= b

bool MAUtil::inside int  a,
int  b,
int  c
 

Returns f >= a && f <= b

bool MAUtil::inside unsigned int  a,
unsigned int  b,
unsigned int  c
 

Returns f >= a && f <= b

String MAUtil::doubleToString double  f,
int  decimals = 5
 

Converts f to its string representation, with 'decimals' fractional digits

String MAUtil::integerToString int  i,
int  base = 10
 

Converts f to its string representation in radix 'base'

String MAUtil::lowerString const String &  s  ) 
 

Converts a MAUtil::String to lowercase

String MAUtil::upperString const String &  s  ) 
 

Converts a MAUtil::String to uppercase

void MAUtil::stringSplit const String &  str,
const String &  delim,
MAUtil::Vector< String > &  output
 

Splits 'str' into multiple strings, one for each occurance of the 'delim' substring. The resulting strings are added to 'output', which is initially cleared

int MAUtil::stringToInteger const String &  s,
int  base = 10
 

Converts a string to an integer, using the same semantics as strtoul()

double MAUtil::stringToDouble const String &  s  ) 
 

Converts a string to a double, using the same semantics as atof()


Generated on Sat Feb 13 00:15:39 2010 for MoSync 2 beta 1 by  doxygen 1.4.6-NO