Open Lighting Architecture  0.9.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
ola Namespace Reference

Detailed Description

The namespace containing all OLA symbols.

Namespaces

namespace  acn
 ACN related code.
namespace  client
 OLA C++ API.
namespace  dmx
 DMX512 related code.
namespace  e133
 E1.33 (RDMNet)
namespace  http
 The embedded HTTP server.
namespace  io
 Classes for general I/O and event handling.
namespace  math
 Math helper functions.
namespace  messaging
 A framework for serializing simple message structures.
namespace  network
 Code for network communication.
namespace  plugin
 Code for supported devices and protocols.
namespace  rdm
 PLASA E1.20 Remote Device Management.
namespace  rpc
 The RPC (Remote Procedure Call) system.
namespace  stl
 STL Helper functions.
namespace  testing
 Code used for unit testing.
namespace  thread
 Threads and syncronization mechanisms.
namespace  timecode
 Timecode.
namespace  web
 Classes to deal with web services.

Classes

class  Action
class  ActionQueue
struct  PasswdEntry
 Contains information about a user. More...
struct  GroupEntry
 Contains information about a group. More...
class  FlagInterface
 The interface for the Flag classes. More...
class  BaseFlag
 The common implementation. More...
class  Flag
 A templated Flag class. More...
class  Flag< bool >
 a bool flag More...
class  Flag< std::string >
 a string flag More...
class  FlagRegistry
 This class holds all the flags, and is responsbile for parsing the command line. More...
class  FlagRegisterer
 This class is responsible for registering a flag. More...
class  BaseCallback0
 The base class for all 0 argument callbacks. More...
class  Callback0
 A 0 argument callback which can be called multiple times. More...
class  SingleUseCallback0
 A 0 argument callback which deletes itself after it's run. More...
class  SingleUseCallback0< void >
 A 0 arg, single use callback that returns void. More...
class  FunctionCallback0_0
 A Function callback with 0 create-time args and 0 exec time args. More...
class  MethodCallback0_0
 A Method callback with 0 create-time args and 0 exec time args. More...
class  FunctionCallback1_0
 A Function callback with 1 create-time args and 0 exec time args. More...
class  MethodCallback1_0
 A Method callback with 1 create-time args and 0 exec time args. More...
class  FunctionCallback2_0
 A Function callback with 2 create-time args and 0 exec time args. More...
class  MethodCallback2_0
 A Method callback with 2 create-time args and 0 exec time args. More...
class  FunctionCallback3_0
 A Function callback with 3 create-time args and 0 exec time args. More...
class  MethodCallback3_0
 A Method callback with 3 create-time args and 0 exec time args. More...
class  FunctionCallback4_0
 A Function callback with 4 create-time args and 0 exec time args. More...
class  MethodCallback4_0
 A Method callback with 4 create-time args and 0 exec time args. More...
class  BaseCallback1
 The base class for all 1 argument callbacks. More...
class  Callback1
 A 1 argument callback which can be called multiple times. More...
class  SingleUseCallback1
 A 1 argument callback which deletes itself after it's run. More...
class  SingleUseCallback1< void, Arg0 >
 A 1 arg, single use callback that returns void. More...
class  FunctionCallback0_1
 A Function callback with 0 create-time args and 1 exec time args. More...
class  MethodCallback0_1
 A Method callback with 0 create-time args and 1 exec time args. More...
class  FunctionCallback1_1
 A Function callback with 1 create-time args and 1 exec time args. More...
class  MethodCallback1_1
 A Method callback with 1 create-time args and 1 exec time args. More...
class  FunctionCallback2_1
 A Function callback with 2 create-time args and 1 exec time args. More...
class  MethodCallback2_1
 A Method callback with 2 create-time args and 1 exec time args. More...
class  FunctionCallback3_1
 A Function callback with 3 create-time args and 1 exec time args. More...
class  MethodCallback3_1
 A Method callback with 3 create-time args and 1 exec time args. More...
class  FunctionCallback4_1
 A Function callback with 4 create-time args and 1 exec time args. More...
class  MethodCallback4_1
 A Method callback with 4 create-time args and 1 exec time args. More...
class  BaseCallback2
 The base class for all 2 argument callbacks. More...
class  Callback2
 A 2 argument callback which can be called multiple times. More...
class  SingleUseCallback2
 A 2 argument callback which deletes itself after it's run. More...
class  SingleUseCallback2< void, Arg0, Arg1 >
 A 2 arg, single use callback that returns void. More...
class  FunctionCallback0_2
 A Function callback with 0 create-time args and 2 exec time args. More...
class  MethodCallback0_2
 A Method callback with 0 create-time args and 2 exec time args. More...
class  FunctionCallback1_2
 A Function callback with 1 create-time args and 2 exec time args. More...
class  MethodCallback1_2
 A Method callback with 1 create-time args and 2 exec time args. More...
class  FunctionCallback2_2
 A Function callback with 2 create-time args and 2 exec time args. More...
class  MethodCallback2_2
 A Method callback with 2 create-time args and 2 exec time args. More...
class  FunctionCallback3_2
 A Function callback with 3 create-time args and 2 exec time args. More...
class  MethodCallback3_2
 A Method callback with 3 create-time args and 2 exec time args. More...
class  FunctionCallback4_2
 A Function callback with 4 create-time args and 2 exec time args. More...
class  MethodCallback4_2
 A Method callback with 4 create-time args and 2 exec time args. More...
class  BaseCallback3
 The base class for all 3 argument callbacks. More...
class  Callback3
 A 3 argument callback which can be called multiple times. More...
class  SingleUseCallback3
 A 3 argument callback which deletes itself after it's run. More...
class  SingleUseCallback3< void, Arg0, Arg1, Arg2 >
 A 3 arg, single use callback that returns void. More...
class  FunctionCallback0_3
 A Function callback with 0 create-time args and 3 exec time args. More...
class  MethodCallback0_3
 A Method callback with 0 create-time args and 3 exec time args. More...
class  FunctionCallback1_3
 A Function callback with 1 create-time args and 3 exec time args. More...
class  MethodCallback1_3
 A Method callback with 1 create-time args and 3 exec time args. More...
class  FunctionCallback2_3
 A Function callback with 2 create-time args and 3 exec time args. More...
class  MethodCallback2_3
 A Method callback with 2 create-time args and 3 exec time args. More...
class  FunctionCallback3_3
 A Function callback with 3 create-time args and 3 exec time args. More...
class  MethodCallback3_3
 A Method callback with 3 create-time args and 3 exec time args. More...
class  FunctionCallback4_3
 A Function callback with 4 create-time args and 3 exec time args. More...
class  MethodCallback4_3
 A Method callback with 4 create-time args and 3 exec time args. More...
class  BaseCallback4
 The base class for all 4 argument callbacks. More...
class  Callback4
 A 4 argument callback which can be called multiple times. More...
class  SingleUseCallback4
 A 4 argument callback which deletes itself after it's run. More...
class  SingleUseCallback4< void, Arg0, Arg1, Arg2, Arg3 >
 A 4 arg, single use callback that returns void. More...
class  FunctionCallback0_4
 A Function callback with 0 create-time args and 4 exec time args. More...
class  MethodCallback0_4
 A Method callback with 0 create-time args and 4 exec time args. More...
class  FunctionCallback1_4
 A Function callback with 1 create-time args and 4 exec time args. More...
class  MethodCallback1_4
 A Method callback with 1 create-time args and 4 exec time args. More...
class  FunctionCallback2_4
 A Function callback with 2 create-time args and 4 exec time args. More...
class  MethodCallback2_4
 A Method callback with 2 create-time args and 4 exec time args. More...
class  FunctionCallback3_4
 A Function callback with 3 create-time args and 4 exec time args. More...
class  MethodCallback3_4
 A Method callback with 3 create-time args and 4 exec time args. More...
class  FunctionCallback4_4
 A Function callback with 4 create-time args and 4 exec time args. More...
class  MethodCallback4_4
 A Method callback with 4 create-time args and 4 exec time args. More...
class  CallbackRunner
 Automatically execute a callback when it goes out of scope. More...
class  BaseTimeVal
class  TimeInterval
class  TimeStamp
class  Clock
 Used to get the current time. More...
class  MockClock
class  DmxBuffer
 Used to hold a single universe of DMX data. More...
class  BaseVariable
 The base variable class. More...
struct  VariableLessThan
class  BoolVariable
 A boolean variable. More...
class  StringVariable
class  IntegerVariable
class  CounterVariable
class  MapVariable
class  IntMap
class  UIntMap
class  ExportMap
 A container for the exported variables. More...
class  LogDestination
 The base class for log destinations. More...
class  StdErrorLogDestination
 A LogDestination that writes to stderr. More...
class  SyslogDestination
 An abstract base of LogDestination that writes to syslog. More...
class  UnixSyslogDestination
 A SyslogDestination that writes to Unix syslog. More...
class  MultiCallback
 The MultiCallback class takes a limit & a callback. When the Run() method is called limit times, the callback is executed and the MultiCallback object deleted. More...
class  BackOffPolicy
class  ConstantBackoffPolicy
class  LinearBackoffPolicy
class  ExponentialBackoffPolicy
class  BackoffGenerator
class  SequenceNumber
 SequenceNumber, this ensures that we increment the sequence number whenever we go to use it. More...
class  AbstractDevice
class  Device
class  DmxSource
class  AbstractPlugin
struct  PluginLessThan
class  Plugin
class  PluginAdaptor
class  Port
 The base port class. More...
class  InputPort
 A port that receives DMX512 data. More...
class  OutputPort
 A port that sends DMX512 data. More...
class  BasicInputPort
class  BasicOutputPort
class  PortBrokerInterface
class  PortBroker
class  Validator
class  StringValidator
class  SetValidator
class  BoolValidator
class  UIntValidator
class  IntValidator
class  IPv4Validator
class  Preferences
class  PreferencesFactory
class  MemoryPreferences
class  MemoryPreferencesFactory
class  FilePreferenceSaverThread
class  FileBackedPreferences
class  FileBackedPreferencesFactory
class  TokenBucket
class  Universe
class  OlaCallbackClient
 The legacy callback client. More...
struct  EntryGroupParams
class  AvahiDiscoveryAgent
 An implementation of DiscoveryAgentInterface that uses the Avahi client library. More...
class  DNSSDDescriptor
class  BonjourDiscoveryAgent
 An implementation of DiscoveryAgentInterface that uses the Apple dns_sd.h library. More...
class  Client
 Represents a connected OLA client on the OLA server side. More...
class  ClientBroker
 Handles async client operations. More...
class  device_alias_pair
class  DeviceManager
 Keeps track of OLA's devices. More...
class  DiscoveryAgentInterface
 The interface to DNS-SD operations like register, browse etc. More...
class  DiscoveryAgentFactory
 A Factory which produces implementations of DiscoveryAgentInterface. More...
class  DynamicPluginLoader
 A PluginLoader which loads from shared (dynamic) libraries. More...
class  BaseHttpAction
class  SetNameAction
class  SetMergeModeAction
class  PatchPortAction
class  PortPriorityInheritAction
class  PortPriorityStaticAction
class  OlaDaemon
class  OladHTTPServer
class  OlaServer
 The main OlaServer class. More...
class  OlaServerServiceImpl
 The OLA Server RPC methods. More...
class  PluginLoader
 The interface used to load plugins. More...
class  PluginManager
 The manager of plugins. More...
class  PortManager
 Responsible for performing Port operations. More...
class  RDMHTTPModule
class  UniverseStore
 Maintains a collection of Universe objects. More...
class  FileGenerator
class  CppGenerator
class  ServiceGenerator

Typedefs

typedef MapVariable< std::string > StringMap
typedef
ola::client::GenericClientWrapper
< OlaCallbackClient
OlaCallbackClientWrapper
 A ClientWrapper that uses the OlaCallbackClient.
typedef ola::client::OlaDevice OlaDevice
typedef ola::client::OlaInputPort OlaInputPort
typedef ola::client::OlaOutputPort OlaOutputPort
typedef ola::client::OlaPlugin OlaPlugin
typedef ola::client::OlaPort OlaPort
typedef ola::client::OlaUniverse OlaUniverse
typedef
ola::client::StreamingClient 
StreamingClient
typedef int OladHTTPServer_t
typedef CallbackRunner
< ola::rpc::RpcService::CompletionCallback
ClosureRunner

Enumerations

enum  { DMX_UNIVERSE_SIZE = 512 }
 The number of slots in a DMX512 universe. More...
enum  log_level {
  OLA_LOG_NONE, OLA_LOG_FATAL, OLA_LOG_WARN, OLA_LOG_INFO,
  OLA_LOG_DEBUG, OLA_LOG_MAX
}
 The OLA log levels. This controls the verbosity of logging. Each level also includes those below it. More...
enum  log_output { OLA_LOG_STDERR, OLA_LOG_SYSLOG, OLA_LOG_NULL }
 The destination to write log messages to. More...
enum  port_priority_mode { PRIORITY_MODE_INHERIT, PRIORITY_MODE_STATIC, PRIORITY_MODE_END }
 Defines the different priority modes that OLA supports. More...
enum  port_priority_capability { CAPABILITY_NONE, CAPABILITY_STATIC, CAPABILITY_FULL }
 Defines the priority capability of a Port. More...
enum  PatchAction { PATCH, UNPATCH }
enum  RegisterAction { REGISTER, UNREGISTER }
enum  PortDirection { INPUT_PORT, OUTPUT_PORT }

Functions

bool GetEnv (const std::string &var, std::string *value)
 Get the value of an environment variable.
void SetHelpString (const std::string &first_line, const std::string &description)
 Set the help string for the program.
void DisplayUsage ()
 Print the usage text to stdout.
void DisplayUsageAndExit ()
 Print the usage text to stdout then exit.
void DisplayVersion ()
 Print the version text to stdout.
void GenManPage ()
void ParseFlags (int *argc, char **argv)
 Parses the command line flags up to the first non-flag value. argv is re-arranged so that it only contains non-flag arguments.
bool ServerInit (int argc, char *argv[], ExportMap *export_map)
 Used to initialize a server.
bool ServerInit (int *argc, char *argv[], ExportMap *export_map, const std::string &first_line, const std::string &description)
 Used to initialize a server. Installs the SEGV handler, initializes the random number generator and populates the export map. Also sets the help string for the program, parses flags and initialises logging from flags.
bool AppInit (int *argc, char *argv[], const std::string &first_line, const std::string &description)
 Used to initialize a application. Installs the SEGV handler and initializes the random number generator, sets the help string for the program, parses flags and initialises logging from flags.
bool NetworkInit ()
 Perform platform-specific initialization of the networking subsystem.
bool InstallSignal (int signal, void(*fp)(int signo))
 Install a signal handler.
bool InstallSEGVHandler ()
 Install signal handlers to deal with SIGBUS & SIGSEGV.
void InitExportMap (int argc, char *argv[], ExportMap *export_map)
 Populate the ExportMap with a couple of basic variables.
void Daemonise ()
 Run as a daemon.
void SetLogLevel (log_level level)
 Set the logging level.
void IncrementLogLevel ()
 Increment the log level by one. The log level wraps to OLA_LOG_NONE.
bool InitLoggingFromFlags ()
 Initialize the OLA logging system from flags.
bool InitLogging (log_level level, log_output output)
 Initialize the OLA logging system.
void InitLogging (log_level level, LogDestination *destination)
 Initialize the OLA logging system using the specified LogDestination.
std::ostream & operator<< (std::ostream &out, const DmxBuffer &data)
 Stream operator to allow DmxBuffer to be output to stdout.
void StringSplit (const std::string &input, std::vector< std::string > *tokens, const std::string &delimiters=" ")
 Split a string into pieces.
void StringTrim (std::string *input)
 Trim leading and trailing whitespace from a string.
void ShortenString (std::string *input)
 Truncate the string based on the presence of \0 characters.
bool StringBeginsWith (const std::string &s, const std::string &prefix)
 Check if one string is a prefix of another.
bool StringEndsWith (const std::string &s, const std::string &suffix)
 Check if one string is a suffix of another.
bool StripPrefix (std::string *s, const std::string &prefix)
 Strips a prefix from a string.
bool StripSuffix (std::string *s, const std::string &suffix)
 Strips a suffix from a string.
string IntToHexString (unsigned int i, unsigned int width)
bool StringToBool (const std::string &value, bool *output)
 Convert a string to a bool.
bool StringToBoolTolerant (const std::string &value, bool *output)
 Convert a string to a bool in a tolerant way.
bool StringToInt (const std::string &value, unsigned int *output, bool strict=false)
 Convert a string to a unsigned int.
bool StringToInt (const std::string &value, uint16_t *output, bool strict=false)
 Convert a string to a uint16_t.
bool StringToInt (const std::string &value, uint8_t *output, bool strict=false)
 Convert a string to a uint8_t.
bool StringToInt (const std::string &value, int *output, bool strict=false)
 Convert a string to a int.
bool StringToInt (const std::string &value, int16_t *output, bool strict=false)
 Convert a string to a int16_t.
bool StringToInt (const std::string &value, int8_t *output, bool strict=false)
 Convert a string to a int8_t.
void Escape (std::string *original)
 Escape a string with \ .
string EscapeString (const std::string &original)
 Escape a string, returning a copy.
string EncodeString (const std::string &original)
 Encode any unprintable characters in a string as hex, returning a copy.
void ReplaceAll (std::string *original, const std::string &find, const std::string &replace)
 Replace all instances of the find string with the replace string.
bool HexStringToInt (const std::string &value, uint8_t *output)
 Convert a hex string to a uint8_t.
bool HexStringToInt (const std::string &value, uint16_t *output)
 Convert a hex string to a uint16_t.
bool HexStringToInt (const std::string &value, uint32_t *output)
 Convert a hex string to a uint32_t.
bool HexStringToInt (const std::string &value, int8_t *output)
 Convert a hex string to a int8_t.
bool HexStringToInt (const std::string &value, int16_t *output)
 Convert a hex string to a int16_t.
bool HexStringToInt (const std::string &value, int32_t *output)
 Convert a hex string to a int32_t.
void ToLower (std::string *s)
 Convert a string to lower case.
void ToUpper (std::string *s)
 Convert a string to upper case.
void CapitalizeLabel (std::string *s)
 Transform a string to a pretty-printed form.
void CustomCapitalizeLabel (std::string *s)
 Similar to CapitalizeLabel() but this also capitalized known acronyms.
FlagRegistryGetRegistry ()
 Get the global FlagRegistry.
template<typename ReturnType >
SingleUseCallback0< ReturnType > * NewSingleCallback (ReturnType(*callback)())
 A helper function to create a new SingleUseCallback with 0 create-time arguments and 0 execution time arguments.
template<typename ReturnType >
Callback0< ReturnType > * NewCallback (ReturnType(*callback)())
 A helper function to create a new Callback with 0 create-time arguments and 0 execution time arguments.
template<typename Class , typename ReturnType >
SingleUseCallback0< ReturnType > * NewSingleCallback (Class *object, ReturnType(Class::*method)())
 A helper function to create a new SingleUseCallback with 0 create-time arguments and 0 execution time arguments.
template<typename Class , typename ReturnType >
Callback0< ReturnType > * NewCallback (Class *object, ReturnType(Class::*method)())
 A helper function to create a new Callback with 0 create-time arguments and 0 execution time arguments.
template<typename ReturnType , typename A0 >
SingleUseCallback0< ReturnType > * NewSingleCallback (ReturnType(*callback)(A0), A0 a0)
 A helper function to create a new SingleUseCallback with 1 create-time arguments and 0 execution time arguments.
template<typename ReturnType , typename A0 >
Callback0< ReturnType > * NewCallback (ReturnType(*callback)(A0), A0 a0)
 A helper function to create a new Callback with 1 create-time arguments and 0 execution time arguments.
template<typename Class , typename ReturnType , typename A0 >
SingleUseCallback0< ReturnType > * NewSingleCallback (Class *object, ReturnType(Class::*method)(A0), A0 a0)
 A helper function to create a new SingleUseCallback with 1 create-time arguments and 0 execution time arguments.
template<typename Class , typename ReturnType , typename A0 >
Callback0< ReturnType > * NewCallback (Class *object, ReturnType(Class::*method)(A0), A0 a0)
 A helper function to create a new Callback with 1 create-time arguments and 0 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 >
SingleUseCallback0< ReturnType > * NewSingleCallback (ReturnType(*callback)(A0, A1), A0 a0, A1 a1)
 A helper function to create a new SingleUseCallback with 2 create-time arguments and 0 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 >
Callback0< ReturnType > * NewCallback (ReturnType(*callback)(A0, A1), A0 a0, A1 a1)
 A helper function to create a new Callback with 2 create-time arguments and 0 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 >
SingleUseCallback0< ReturnType > * NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1), A0 a0, A1 a1)
 A helper function to create a new SingleUseCallback with 2 create-time arguments and 0 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 >
Callback0< ReturnType > * NewCallback (Class *object, ReturnType(Class::*method)(A0, A1), A0 a0, A1 a1)
 A helper function to create a new Callback with 2 create-time arguments and 0 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 >
SingleUseCallback0< ReturnType > * NewSingleCallback (ReturnType(*callback)(A0, A1, A2), A0 a0, A1 a1, A2 a2)
 A helper function to create a new SingleUseCallback with 3 create-time arguments and 0 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 >
Callback0< ReturnType > * NewCallback (ReturnType(*callback)(A0, A1, A2), A0 a0, A1 a1, A2 a2)
 A helper function to create a new Callback with 3 create-time arguments and 0 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 >
SingleUseCallback0< ReturnType > * NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2), A0 a0, A1 a1, A2 a2)
 A helper function to create a new SingleUseCallback with 3 create-time arguments and 0 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 >
Callback0< ReturnType > * NewCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2), A0 a0, A1 a1, A2 a2)
 A helper function to create a new Callback with 3 create-time arguments and 0 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 >
SingleUseCallback0< ReturnType > * NewSingleCallback (ReturnType(*callback)(A0, A1, A2, A3), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new SingleUseCallback with 4 create-time arguments and 0 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 >
Callback0< ReturnType > * NewCallback (ReturnType(*callback)(A0, A1, A2, A3), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new Callback with 4 create-time arguments and 0 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 >
SingleUseCallback0< ReturnType > * NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, A3), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new SingleUseCallback with 4 create-time arguments and 0 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 >
Callback0< ReturnType > * NewCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, A3), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new Callback with 4 create-time arguments and 0 execution time arguments.
template<typename ReturnType , typename Arg0 >
SingleUseCallback1< ReturnType,
Arg0 > * 
NewSingleCallback (ReturnType(*callback)(Arg0))
 A helper function to create a new SingleUseCallback with 0 create-time arguments and 1 execution time arguments.
template<typename ReturnType , typename Arg0 >
Callback1< ReturnType, Arg0 > * NewCallback (ReturnType(*callback)(Arg0))
 A helper function to create a new Callback with 0 create-time arguments and 1 execution time arguments.
template<typename Class , typename ReturnType , typename Arg0 >
SingleUseCallback1< ReturnType,
Arg0 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(Arg0))
 A helper function to create a new SingleUseCallback with 0 create-time arguments and 1 execution time arguments.
template<typename Class , typename ReturnType , typename Arg0 >
Callback1< ReturnType, Arg0 > * NewCallback (Class *object, ReturnType(Class::*method)(Arg0))
 A helper function to create a new Callback with 0 create-time arguments and 1 execution time arguments.
template<typename ReturnType , typename A0 , typename Arg0 >
SingleUseCallback1< ReturnType,
Arg0 > * 
NewSingleCallback (ReturnType(*callback)(A0, Arg0), A0 a0)
 A helper function to create a new SingleUseCallback with 1 create-time arguments and 1 execution time arguments.
template<typename ReturnType , typename A0 , typename Arg0 >
Callback1< ReturnType, Arg0 > * NewCallback (ReturnType(*callback)(A0, Arg0), A0 a0)
 A helper function to create a new Callback with 1 create-time arguments and 1 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename Arg0 >
SingleUseCallback1< ReturnType,
Arg0 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, Arg0), A0 a0)
 A helper function to create a new SingleUseCallback with 1 create-time arguments and 1 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename Arg0 >
Callback1< ReturnType, Arg0 > * NewCallback (Class *object, ReturnType(Class::*method)(A0, Arg0), A0 a0)
 A helper function to create a new Callback with 1 create-time arguments and 1 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename Arg0 >
SingleUseCallback1< ReturnType,
Arg0 > * 
NewSingleCallback (ReturnType(*callback)(A0, A1, Arg0), A0 a0, A1 a1)
 A helper function to create a new SingleUseCallback with 2 create-time arguments and 1 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename Arg0 >
Callback1< ReturnType, Arg0 > * NewCallback (ReturnType(*callback)(A0, A1, Arg0), A0 a0, A1 a1)
 A helper function to create a new Callback with 2 create-time arguments and 1 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename Arg0 >
SingleUseCallback1< ReturnType,
Arg0 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1, Arg0), A0 a0, A1 a1)
 A helper function to create a new SingleUseCallback with 2 create-time arguments and 1 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename Arg0 >
Callback1< ReturnType, Arg0 > * NewCallback (Class *object, ReturnType(Class::*method)(A0, A1, Arg0), A0 a0, A1 a1)
 A helper function to create a new Callback with 2 create-time arguments and 1 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 >
SingleUseCallback1< ReturnType,
Arg0 > * 
NewSingleCallback (ReturnType(*callback)(A0, A1, A2, Arg0), A0 a0, A1 a1, A2 a2)
 A helper function to create a new SingleUseCallback with 3 create-time arguments and 1 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 >
Callback1< ReturnType, Arg0 > * NewCallback (ReturnType(*callback)(A0, A1, A2, Arg0), A0 a0, A1 a1, A2 a2)
 A helper function to create a new Callback with 3 create-time arguments and 1 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 >
SingleUseCallback1< ReturnType,
Arg0 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, Arg0), A0 a0, A1 a1, A2 a2)
 A helper function to create a new SingleUseCallback with 3 create-time arguments and 1 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 >
Callback1< ReturnType, Arg0 > * NewCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, Arg0), A0 a0, A1 a1, A2 a2)
 A helper function to create a new Callback with 3 create-time arguments and 1 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 >
SingleUseCallback1< ReturnType,
Arg0 > * 
NewSingleCallback (ReturnType(*callback)(A0, A1, A2, A3, Arg0), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new SingleUseCallback with 4 create-time arguments and 1 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 >
Callback1< ReturnType, Arg0 > * NewCallback (ReturnType(*callback)(A0, A1, A2, A3, Arg0), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new Callback with 4 create-time arguments and 1 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 >
SingleUseCallback1< ReturnType,
Arg0 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, A3, Arg0), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new SingleUseCallback with 4 create-time arguments and 1 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 >
Callback1< ReturnType, Arg0 > * NewCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, A3, Arg0), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new Callback with 4 create-time arguments and 1 execution time arguments.
template<typename ReturnType , typename Arg0 , typename Arg1 >
SingleUseCallback2< ReturnType,
Arg0, Arg1 > * 
NewSingleCallback (ReturnType(*callback)(Arg0, Arg1))
 A helper function to create a new SingleUseCallback with 0 create-time arguments and 2 execution time arguments.
template<typename ReturnType , typename Arg0 , typename Arg1 >
Callback2< ReturnType, Arg0,
Arg1 > * 
NewCallback (ReturnType(*callback)(Arg0, Arg1))
 A helper function to create a new Callback with 0 create-time arguments and 2 execution time arguments.
template<typename Class , typename ReturnType , typename Arg0 , typename Arg1 >
SingleUseCallback2< ReturnType,
Arg0, Arg1 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(Arg0, Arg1))
 A helper function to create a new SingleUseCallback with 0 create-time arguments and 2 execution time arguments.
template<typename Class , typename ReturnType , typename Arg0 , typename Arg1 >
Callback2< ReturnType, Arg0,
Arg1 > * 
NewCallback (Class *object, ReturnType(Class::*method)(Arg0, Arg1))
 A helper function to create a new Callback with 0 create-time arguments and 2 execution time arguments.
template<typename ReturnType , typename A0 , typename Arg0 , typename Arg1 >
SingleUseCallback2< ReturnType,
Arg0, Arg1 > * 
NewSingleCallback (ReturnType(*callback)(A0, Arg0, Arg1), A0 a0)
 A helper function to create a new SingleUseCallback with 1 create-time arguments and 2 execution time arguments.
template<typename ReturnType , typename A0 , typename Arg0 , typename Arg1 >
Callback2< ReturnType, Arg0,
Arg1 > * 
NewCallback (ReturnType(*callback)(A0, Arg0, Arg1), A0 a0)
 A helper function to create a new Callback with 1 create-time arguments and 2 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename Arg0 , typename Arg1 >
SingleUseCallback2< ReturnType,
Arg0, Arg1 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, Arg0, Arg1), A0 a0)
 A helper function to create a new SingleUseCallback with 1 create-time arguments and 2 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename Arg0 , typename Arg1 >
Callback2< ReturnType, Arg0,
Arg1 > * 
NewCallback (Class *object, ReturnType(Class::*method)(A0, Arg0, Arg1), A0 a0)
 A helper function to create a new Callback with 1 create-time arguments and 2 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename Arg0 , typename Arg1 >
SingleUseCallback2< ReturnType,
Arg0, Arg1 > * 
NewSingleCallback (ReturnType(*callback)(A0, A1, Arg0, Arg1), A0 a0, A1 a1)
 A helper function to create a new SingleUseCallback with 2 create-time arguments and 2 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename Arg0 , typename Arg1 >
Callback2< ReturnType, Arg0,
Arg1 > * 
NewCallback (ReturnType(*callback)(A0, A1, Arg0, Arg1), A0 a0, A1 a1)
 A helper function to create a new Callback with 2 create-time arguments and 2 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename Arg0 , typename Arg1 >
SingleUseCallback2< ReturnType,
Arg0, Arg1 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1, Arg0, Arg1), A0 a0, A1 a1)
 A helper function to create a new SingleUseCallback with 2 create-time arguments and 2 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename Arg0 , typename Arg1 >
Callback2< ReturnType, Arg0,
Arg1 > * 
NewCallback (Class *object, ReturnType(Class::*method)(A0, A1, Arg0, Arg1), A0 a0, A1 a1)
 A helper function to create a new Callback with 2 create-time arguments and 2 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 , typename Arg1 >
SingleUseCallback2< ReturnType,
Arg0, Arg1 > * 
NewSingleCallback (ReturnType(*callback)(A0, A1, A2, Arg0, Arg1), A0 a0, A1 a1, A2 a2)
 A helper function to create a new SingleUseCallback with 3 create-time arguments and 2 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 , typename Arg1 >
Callback2< ReturnType, Arg0,
Arg1 > * 
NewCallback (ReturnType(*callback)(A0, A1, A2, Arg0, Arg1), A0 a0, A1 a1, A2 a2)
 A helper function to create a new Callback with 3 create-time arguments and 2 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 , typename Arg1 >
SingleUseCallback2< ReturnType,
Arg0, Arg1 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, Arg0, Arg1), A0 a0, A1 a1, A2 a2)
 A helper function to create a new SingleUseCallback with 3 create-time arguments and 2 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 , typename Arg1 >
Callback2< ReturnType, Arg0,
Arg1 > * 
NewCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, Arg0, Arg1), A0 a0, A1 a1, A2 a2)
 A helper function to create a new Callback with 3 create-time arguments and 2 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 , typename Arg1 >
SingleUseCallback2< ReturnType,
Arg0, Arg1 > * 
NewSingleCallback (ReturnType(*callback)(A0, A1, A2, A3, Arg0, Arg1), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new SingleUseCallback with 4 create-time arguments and 2 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 , typename Arg1 >
Callback2< ReturnType, Arg0,
Arg1 > * 
NewCallback (ReturnType(*callback)(A0, A1, A2, A3, Arg0, Arg1), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new Callback with 4 create-time arguments and 2 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 , typename Arg1 >
SingleUseCallback2< ReturnType,
Arg0, Arg1 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, A3, Arg0, Arg1), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new SingleUseCallback with 4 create-time arguments and 2 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 , typename Arg1 >
Callback2< ReturnType, Arg0,
Arg1 > * 
NewCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, A3, Arg0, Arg1), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new Callback with 4 create-time arguments and 2 execution time arguments.
template<typename ReturnType , typename Arg0 , typename Arg1 , typename Arg2 >
SingleUseCallback3< ReturnType,
Arg0, Arg1, Arg2 > * 
NewSingleCallback (ReturnType(*callback)(Arg0, Arg1, Arg2))
 A helper function to create a new SingleUseCallback with 0 create-time arguments and 3 execution time arguments.
template<typename ReturnType , typename Arg0 , typename Arg1 , typename Arg2 >
Callback3< ReturnType, Arg0,
Arg1, Arg2 > * 
NewCallback (ReturnType(*callback)(Arg0, Arg1, Arg2))
 A helper function to create a new Callback with 0 create-time arguments and 3 execution time arguments.
template<typename Class , typename ReturnType , typename Arg0 , typename Arg1 , typename Arg2 >
SingleUseCallback3< ReturnType,
Arg0, Arg1, Arg2 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(Arg0, Arg1, Arg2))
 A helper function to create a new SingleUseCallback with 0 create-time arguments and 3 execution time arguments.
template<typename Class , typename ReturnType , typename Arg0 , typename Arg1 , typename Arg2 >
Callback3< ReturnType, Arg0,
Arg1, Arg2 > * 
NewCallback (Class *object, ReturnType(Class::*method)(Arg0, Arg1, Arg2))
 A helper function to create a new Callback with 0 create-time arguments and 3 execution time arguments.
template<typename ReturnType , typename A0 , typename Arg0 , typename Arg1 , typename Arg2 >
SingleUseCallback3< ReturnType,
Arg0, Arg1, Arg2 > * 
NewSingleCallback (ReturnType(*callback)(A0, Arg0, Arg1, Arg2), A0 a0)
 A helper function to create a new SingleUseCallback with 1 create-time arguments and 3 execution time arguments.
template<typename ReturnType , typename A0 , typename Arg0 , typename Arg1 , typename Arg2 >
Callback3< ReturnType, Arg0,
Arg1, Arg2 > * 
NewCallback (ReturnType(*callback)(A0, Arg0, Arg1, Arg2), A0 a0)
 A helper function to create a new Callback with 1 create-time arguments and 3 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename Arg0 , typename Arg1 , typename Arg2 >
SingleUseCallback3< ReturnType,
Arg0, Arg1, Arg2 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, Arg0, Arg1, Arg2), A0 a0)
 A helper function to create a new SingleUseCallback with 1 create-time arguments and 3 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename Arg0 , typename Arg1 , typename Arg2 >
Callback3< ReturnType, Arg0,
Arg1, Arg2 > * 
NewCallback (Class *object, ReturnType(Class::*method)(A0, Arg0, Arg1, Arg2), A0 a0)
 A helper function to create a new Callback with 1 create-time arguments and 3 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename Arg0 , typename Arg1 , typename Arg2 >
SingleUseCallback3< ReturnType,
Arg0, Arg1, Arg2 > * 
NewSingleCallback (ReturnType(*callback)(A0, A1, Arg0, Arg1, Arg2), A0 a0, A1 a1)
 A helper function to create a new SingleUseCallback with 2 create-time arguments and 3 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename Arg0 , typename Arg1 , typename Arg2 >
Callback3< ReturnType, Arg0,
Arg1, Arg2 > * 
NewCallback (ReturnType(*callback)(A0, A1, Arg0, Arg1, Arg2), A0 a0, A1 a1)
 A helper function to create a new Callback with 2 create-time arguments and 3 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename Arg0 , typename Arg1 , typename Arg2 >
SingleUseCallback3< ReturnType,
Arg0, Arg1, Arg2 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1, Arg0, Arg1, Arg2), A0 a0, A1 a1)
 A helper function to create a new SingleUseCallback with 2 create-time arguments and 3 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename Arg0 , typename Arg1 , typename Arg2 >
Callback3< ReturnType, Arg0,
Arg1, Arg2 > * 
NewCallback (Class *object, ReturnType(Class::*method)(A0, A1, Arg0, Arg1, Arg2), A0 a0, A1 a1)
 A helper function to create a new Callback with 2 create-time arguments and 3 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 , typename Arg1 , typename Arg2 >
SingleUseCallback3< ReturnType,
Arg0, Arg1, Arg2 > * 
NewSingleCallback (ReturnType(*callback)(A0, A1, A2, Arg0, Arg1, Arg2), A0 a0, A1 a1, A2 a2)
 A helper function to create a new SingleUseCallback with 3 create-time arguments and 3 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 , typename Arg1 , typename Arg2 >
Callback3< ReturnType, Arg0,
Arg1, Arg2 > * 
NewCallback (ReturnType(*callback)(A0, A1, A2, Arg0, Arg1, Arg2), A0 a0, A1 a1, A2 a2)
 A helper function to create a new Callback with 3 create-time arguments and 3 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 , typename Arg1 , typename Arg2 >
SingleUseCallback3< ReturnType,
Arg0, Arg1, Arg2 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, Arg0, Arg1, Arg2), A0 a0, A1 a1, A2 a2)
 A helper function to create a new SingleUseCallback with 3 create-time arguments and 3 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 , typename Arg1 , typename Arg2 >
Callback3< ReturnType, Arg0,
Arg1, Arg2 > * 
NewCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, Arg0, Arg1, Arg2), A0 a0, A1 a1, A2 a2)
 A helper function to create a new Callback with 3 create-time arguments and 3 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 , typename Arg1 , typename Arg2 >
SingleUseCallback3< ReturnType,
Arg0, Arg1, Arg2 > * 
NewSingleCallback (ReturnType(*callback)(A0, A1, A2, A3, Arg0, Arg1, Arg2), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new SingleUseCallback with 4 create-time arguments and 3 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 , typename Arg1 , typename Arg2 >
Callback3< ReturnType, Arg0,
Arg1, Arg2 > * 
NewCallback (ReturnType(*callback)(A0, A1, A2, A3, Arg0, Arg1, Arg2), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new Callback with 4 create-time arguments and 3 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 , typename Arg1 , typename Arg2 >
SingleUseCallback3< ReturnType,
Arg0, Arg1, Arg2 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, A3, Arg0, Arg1, Arg2), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new SingleUseCallback with 4 create-time arguments and 3 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 , typename Arg1 , typename Arg2 >
Callback3< ReturnType, Arg0,
Arg1, Arg2 > * 
NewCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, A3, Arg0, Arg1, Arg2), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new Callback with 4 create-time arguments and 3 execution time arguments.
template<typename ReturnType , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
SingleUseCallback4< ReturnType,
Arg0, Arg1, Arg2, Arg3 > * 
NewSingleCallback (ReturnType(*callback)(Arg0, Arg1, Arg2, Arg3))
 A helper function to create a new SingleUseCallback with 0 create-time arguments and 4 execution time arguments.
template<typename ReturnType , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
Callback4< ReturnType, Arg0,
Arg1, Arg2, Arg3 > * 
NewCallback (ReturnType(*callback)(Arg0, Arg1, Arg2, Arg3))
 A helper function to create a new Callback with 0 create-time arguments and 4 execution time arguments.
template<typename Class , typename ReturnType , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
SingleUseCallback4< ReturnType,
Arg0, Arg1, Arg2, Arg3 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(Arg0, Arg1, Arg2, Arg3))
 A helper function to create a new SingleUseCallback with 0 create-time arguments and 4 execution time arguments.
template<typename Class , typename ReturnType , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
Callback4< ReturnType, Arg0,
Arg1, Arg2, Arg3 > * 
NewCallback (Class *object, ReturnType(Class::*method)(Arg0, Arg1, Arg2, Arg3))
 A helper function to create a new Callback with 0 create-time arguments and 4 execution time arguments.
template<typename ReturnType , typename A0 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
SingleUseCallback4< ReturnType,
Arg0, Arg1, Arg2, Arg3 > * 
NewSingleCallback (ReturnType(*callback)(A0, Arg0, Arg1, Arg2, Arg3), A0 a0)
 A helper function to create a new SingleUseCallback with 1 create-time arguments and 4 execution time arguments.
template<typename ReturnType , typename A0 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
Callback4< ReturnType, Arg0,
Arg1, Arg2, Arg3 > * 
NewCallback (ReturnType(*callback)(A0, Arg0, Arg1, Arg2, Arg3), A0 a0)
 A helper function to create a new Callback with 1 create-time arguments and 4 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
SingleUseCallback4< ReturnType,
Arg0, Arg1, Arg2, Arg3 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, Arg0, Arg1, Arg2, Arg3), A0 a0)
 A helper function to create a new SingleUseCallback with 1 create-time arguments and 4 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
Callback4< ReturnType, Arg0,
Arg1, Arg2, Arg3 > * 
NewCallback (Class *object, ReturnType(Class::*method)(A0, Arg0, Arg1, Arg2, Arg3), A0 a0)
 A helper function to create a new Callback with 1 create-time arguments and 4 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
SingleUseCallback4< ReturnType,
Arg0, Arg1, Arg2, Arg3 > * 
NewSingleCallback (ReturnType(*callback)(A0, A1, Arg0, Arg1, Arg2, Arg3), A0 a0, A1 a1)
 A helper function to create a new SingleUseCallback with 2 create-time arguments and 4 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
Callback4< ReturnType, Arg0,
Arg1, Arg2, Arg3 > * 
NewCallback (ReturnType(*callback)(A0, A1, Arg0, Arg1, Arg2, Arg3), A0 a0, A1 a1)
 A helper function to create a new Callback with 2 create-time arguments and 4 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
SingleUseCallback4< ReturnType,
Arg0, Arg1, Arg2, Arg3 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1, Arg0, Arg1, Arg2, Arg3), A0 a0, A1 a1)
 A helper function to create a new SingleUseCallback with 2 create-time arguments and 4 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
Callback4< ReturnType, Arg0,
Arg1, Arg2, Arg3 > * 
NewCallback (Class *object, ReturnType(Class::*method)(A0, A1, Arg0, Arg1, Arg2, Arg3), A0 a0, A1 a1)
 A helper function to create a new Callback with 2 create-time arguments and 4 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
SingleUseCallback4< ReturnType,
Arg0, Arg1, Arg2, Arg3 > * 
NewSingleCallback (ReturnType(*callback)(A0, A1, A2, Arg0, Arg1, Arg2, Arg3), A0 a0, A1 a1, A2 a2)
 A helper function to create a new SingleUseCallback with 3 create-time arguments and 4 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
Callback4< ReturnType, Arg0,
Arg1, Arg2, Arg3 > * 
NewCallback (ReturnType(*callback)(A0, A1, A2, Arg0, Arg1, Arg2, Arg3), A0 a0, A1 a1, A2 a2)
 A helper function to create a new Callback with 3 create-time arguments and 4 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
SingleUseCallback4< ReturnType,
Arg0, Arg1, Arg2, Arg3 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, Arg0, Arg1, Arg2, Arg3), A0 a0, A1 a1, A2 a2)
 A helper function to create a new SingleUseCallback with 3 create-time arguments and 4 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
Callback4< ReturnType, Arg0,
Arg1, Arg2, Arg3 > * 
NewCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, Arg0, Arg1, Arg2, Arg3), A0 a0, A1 a1, A2 a2)
 A helper function to create a new Callback with 3 create-time arguments and 4 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
SingleUseCallback4< ReturnType,
Arg0, Arg1, Arg2, Arg3 > * 
NewSingleCallback (ReturnType(*callback)(A0, A1, A2, A3, Arg0, Arg1, Arg2, Arg3), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new SingleUseCallback with 4 create-time arguments and 4 execution time arguments.
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
Callback4< ReturnType, Arg0,
Arg1, Arg2, Arg3 > * 
NewCallback (ReturnType(*callback)(A0, A1, A2, A3, Arg0, Arg1, Arg2, Arg3), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new Callback with 4 create-time arguments and 4 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
SingleUseCallback4< ReturnType,
Arg0, Arg1, Arg2, Arg3 > * 
NewSingleCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, A3, Arg0, Arg1, Arg2, Arg3), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new SingleUseCallback with 4 create-time arguments and 4 execution time arguments.
template<typename Class , typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
Callback4< ReturnType, Arg0,
Arg1, Arg2, Arg3 > * 
NewCallback (Class *object, ReturnType(Class::*method)(A0, A1, A2, A3, Arg0, Arg1, Arg2, Arg3), A0 a0, A1 a1, A2 a2, A3 a3)
 A helper function to create a new Callback with 4 create-time arguments and 4 execution time arguments.
log_level LogLevel ()
 Fetch the current level of logging.
BaseCallback0< void > * NewMultiCallback (unsigned int limit, BaseCallback0< void > *callback)
 A helper function to create a new MultiCallback.
template<typename T >
void STLEmptyStack (T *stack)
 Clear a stack.
template<typename T >
void STLEmptyStackAndDelete (T *stack)
 Clear a stack and delete all pointers..
template<typename T >
void STLDeleteElements (T *sequence)
 Delete the elements of a Sequence.
template<typename T >
void STLDeleteValues (T *container)
template<typename T1 , typename T2 >
bool STLContains (const T1 &container, const T2 &value)
template<typename T1 >
void STLKeys (const T1 &container, std::vector< typename T1::key_type > *keys)
template<typename T1 , typename T2 >
void STLValues (const T1 &container, std::vector< T2 > *values)
 Extract a vector of values from a pair associative container.
template<typename T1 >
T1::mapped_type * STLFind (T1 *container, const typename T1::key_type &key)
 Lookup a value by key in a associative container.
template<typename T1 >
T1::mapped_type const * STLFind (const T1 *container, const typename T1::key_type &key)
 Lookup a value by key in a associative container.
template<typename T1 >
T1::mapped_type STLFindOrNull (const T1 &container, const typename T1::key_type &key)
 Lookup a value by key in a associative container.
template<typename T1 >
bool STLReplace (T1 *container, const typename T1::key_type &key, const typename T1::mapped_type &value)
 Replace a value in a pair associative container, inserting the key, value if it doesn't already exist.
template<typename T1 >
T1::mapped_type STLReplacePtr (T1 *container, const typename T1::key_type &key, const typename T1::mapped_type &value)
 Replace a value in a pair associative container. If the key existed, the old value is returned, otherwise NULL is returned.
template<typename T1 >
bool STLReplaceAndDelete (T1 *container, const typename T1::key_type &key, const typename T1::mapped_type &value)
 Similar to STLReplace but this will delete the value if the replacement occurs.
template<typename T1 >
bool STLInsertIfNotPresent (T1 *container, const typename T1::value_type &key_value)
 Insert a value into a container only if this value doesn't already exist.
template<typename T1 >
bool STLInsertIfNotPresent (T1 *container, const typename T1::key_type &key, const typename T1::mapped_type &value)
 Insert a value into a container only if this value doesn't already exist.
template<typename T1 >
void STLInsertOrDie (T1 *container, const typename T1::key_type &key, const typename T1::mapped_type &value)
 Insert an key : value into a pair associative container, or abort the program if the key already exists.
template<typename T1 >
bool STLRemove (T1 *container, const typename T1::key_type &key)
 Remove a key / value from a container.
template<typename T1 >
bool STLLookupAndRemove (T1 *container, const typename T1::key_type &key, typename T1::mapped_type *value)
 Lookup and remove a key from a pair associative container.
template<typename T1 >
T1::iterator STLLookupOrInsertNull (T1 *container, const typename T1::key_type &key)
 Lookup or insert a NULL value into a pair associative container.
template<typename T1 >
bool STLRemoveAndDelete (T1 *container, const typename T1::key_type &key)
 Remove a value from a pair associative container and delete it.
template<typename T1 >
T1::mapped_type STLLookupAndRemovePtr (T1 *container, const typename T1::key_type &key)
 Remove a value from a pair associative container and return the value.
template<typename T1 , typename T2 >
void STLMapFromKeys (T1 *output, const T2 input, typename T1::mapped_type value)
void StringSplit (const std::string &input, std::vector< std::string > &tokens, const std::string &delimiters=" ")
 Split a string into pieces.
std::string IntToString (int i)
 Convert an int to a string.
std::string IntToString (unsigned int i)
std::string IntToHexString (uint8_t i)
std::string IntToHexString (uint16_t i)
std::string IntToHexString (uint32_t i)
template<typename int_type >
int_type StringToIntOrDefault (const std::string &value, int_type alternative, bool strict=false)
 Convert a string to an int type or return a default if it failed.
void FormatData (std::ostream *out, const uint8_t *data, unsigned int length, unsigned int indent=0, unsigned int byte_per_line=8)
 Write binary data to an ostream in a human readable form.
template<typename int_type >
bool PrefixedHexStringToInt (const std::string &input, int_type *output)
 Convert a hex string, prefixed with 0x or 0X to an int type.
template<typename T >
std::string StringJoin (const std::string &delim, const T &input)
 Join a vector of a type.
template<typename T >
void Deleter (T *t)
 Delete a pointer.
template<typename T >
SingleUseCallback0< void > * DeletePointerCallback (T *t)
 Create a callback that deletes the object.
template<class PortClass >
bool IsInputPort ()
 This allows switching based on Port type.
template<>
bool IsInputPort< OutputPort > ()
static std::string MakeServiceKey (const std::string &service_name, const std::string &type)
static void RegisterCallback (DNSServiceRef service, DNSServiceFlags flags, DNSServiceErrorType error_code, const char *name, const char *type, const char *domain, void *context)
bool operator< (const device_alias_pair &left, const device_alias_pair &right)
template<>
bool IsInputPort< InputPort > ()
string ClassName (const Descriptor *descriptor, bool qualified)
string StripProto (const string &filename)
string FilenameIdentifier (const string &filename)
string GlobalAddDescriptorsName (const string &filename)
string GlobalAssignDescriptorsName (const string &filename)
string ClassName (const google::protobuf::Descriptor *descriptor, bool qualified)
bool HasDescriptorMethods (const google::protobuf::FileDescriptor *file)
void StringReplace (const string &s, const string &oldsub, const string &newsub, bool replace_all, string *res)
string StringReplace (const string &s, const string &oldsub, const string &newsub, bool replace_all)
template<typename ITR >
static void SplitStringToIteratorUsing (const string &full, const char *delim, ITR *result)
void SplitStringUsing (const string &full, const char *delim, vector< string > *result)
char * FastInt64ToBuffer (int64_t i, char *buffer)
char * FastInt32ToBuffer (int32_t i, char *buffer)
char * FastHexToBuffer (int i, char *buffer)
char * InternalFastHexToBuffer (uint64_t value, char *buffer, int num_byte)
char * FastHex64ToBuffer (uint64_t value, char *buffer)
char * FastHex32ToBuffer (uint32_t value, char *buffer)
char * FastUInt32ToBufferLeft (uint32_t u, char *buffer)
char * FastInt32ToBufferLeft (int32_t i, char *buffer)
char * FastUInt64ToBufferLeft (uint64_t u64, char *buffer)
char * FastInt64ToBufferLeft (int64_t i, char *buffer)
string SimpleItoa (int i)
string SimpleItoa (unsigned int i)
string SimpleItoa (long i)
string SimpleItoa (unsigned long i)
string SimpleItoa (long long i)
string SimpleItoa (unsigned long long i)
bool ascii_isalnum (char c)
bool ascii_isdigit (char c)
bool HasSuffixString (const string &str, const string &suffix)
string StripSuffixString (const string &str, const string &suffix)
char * FastUInt32ToBuffer (uint32_t i, char *buffer)
char * FastUInt64ToBuffer (uint64_t i, char *buffer)
Get / Set User ID
bool SupportsUIDs ()
 Check whether the current platform supports User and Group IDs.
bool GetUID (uid_t *uid)
 Get the real UID of the process.
bool GetEUID (uid_t *euid)
 Get the effective UID of the process.
bool SetUID (uid_t new_uid)
 Set the effective UID of the process.
Get / Set Group ID
bool GetGID (gid_t *gid)
 Get the real Group ID.
bool GetEGID (gid_t *egid)
 Get the effective group ID.
bool SetGID (gid_t new_gid)
 Set the effective Group ID of the process.
Lookup User Information
bool GetPasswdName (const std::string &name, PasswdEntry *passwd)
 Lookup a user account by username.
bool GetPasswdUID (uid_t uid, PasswdEntry *passwd)
 Lookup a user account by UID.
Lookup Group Information.
bool GetGroupName (const std::string &name, GroupEntry *passwd)
 Lookup a group account by name.
bool GetGroupGID (gid_t gid, GroupEntry *passwd)
 Lookup a group account by GID.

Variables

const int EXIT_OK = EX_OK
 successful termination
const int EXIT__BASE = EX__BASE
 base value for error messages
const int EXIT_USAGE = EX_USAGE
 command line usage error
const int EXIT_DATAERR = EX_DATAERR
 data format error
const int EXIT_NOINPUT = EX_NOINPUT
 cannot open input
const int EXIT_NOUSER = EX_NOUSER
 addresses unknown
const int EXIT_NOHOST = EX_NOHOST
 host name unknown
const int EXIT_UNAVAILABLE = EX_UNAVAILABLE
 service unavailable
const int EXIT_SOFTWARE = EX_SOFTWARE
 internal software error
const int EXIT_OSERR = EX_OSERR
 system error (e.g can't fork)
const int EXIT_OSFILE = EX_OSFILE
 critical OS file missing
const int EXIT_CANTCREAT = EX_CANTCREAT
 can't create (user) output file
const int EXIT_IOERR = EX_IOERR
 input/output error
const int EXIT_TEMPFAIL = EX_TEMPFAIL
 temp faliure; user can rety
const int EXIT_PROTOCOL = EX_PROTOCOL
 remote error in protocol
const int EXIT_NOPERM = EX_NOPERM
 permission denied
const int EXIT_CONFIG = EX_CONFIG
 configuration error
const int EXIT__MAX = EX__MAX
 maximum listed value
static const int USEC_IN_SECONDS = 1000000
static const int ONE_THOUSAND = 1000
static const uint8_t DMX_MIN_SLOT_VALUE = 0
 The minimum value a DMX512 slot can take.
static const uint8_t DMX_MAX_SLOT_VALUE = 255
 The maximum value a DMX512 slot can take.
static const uint8_t DMX512_START_CODE = 0
 The start code for DMX512 data. This is often referred to as NSC for "Null Start Code".
static const int OLA_DEFAULT_PORT = 9010
 The default port which olad listens on for incoming RPC connections.
static const char OLA_DEFAULT_INSTANCE_NAME [] = "OLA Server"
 The default instance name for olad.
static const uint16_t OPEN_LIGHTING_ESTA_CODE = 0x7a70
 The ESTA manufacturer code for the Open Lighting Project.
static const uint32_t MAX_UNIVERSE = 0xffffffff
 The maximum universe number.
log_level logging_level
 Application global logging level.
const char kThickSeparator [] = "// ===================================================================\n"
const char kThinSeparator [] = "// -------------------------------------------------------------------\n"
static const int kFastInt64ToBufferOffset = 21
static const int kFastInt32ToBufferOffset = 11
static const char two_ASCII_digits [100][2]
static const int kFastToBufferSize = 32

Typedef Documentation

A ClientWrapper that uses the OlaCallbackClient.

Deprecated:
Use ola::client::OlaClientWrapper instead.

Enumeration Type Documentation

anonymous enum

The number of slots in a DMX512 universe.

Enumerator:
DMX_UNIVERSE_SIZE 

The number of slots in a DMX512 universe.

The OLA log levels. This controls the verbosity of logging. Each level also includes those below it.

Enumerator:
OLA_LOG_NONE 

No messages are logged.

OLA_LOG_FATAL 

Fatal messages are logged.

OLA_LOG_WARN 

Warnings messages are logged.

OLA_LOG_INFO 

Informational messages are logged.

OLA_LOG_DEBUG 

Debug messages are logged.

The destination to write log messages to.

Enumerator:
OLA_LOG_STDERR 

Log to stderr.

OLA_LOG_SYSLOG 

Log to syslog.

Function Documentation

void ola::CapitalizeLabel ( std::string *  s)

Transform a string to a pretty-printed form.

Given a label in the form ([a-zA-Z0-9][-_])?[a-zA-Z0-9], this replaces [-_] with [ ] and capitalizes each word. e.g. "my_label" becomes "My Label"

Parameters
sa string to transform.
void ola::CustomCapitalizeLabel ( std::string *  s)

Similar to CapitalizeLabel() but this also capitalized known acronyms.

Parameters
sa string to transform. The following are capitalized:
  • ip
  • dmx
template<typename T >
SingleUseCallback0<void>* ola::DeletePointerCallback ( T *  t)

Create a callback that deletes the object.

Template Parameters
Tany type.
Parameters
tThe pointer to delete. Ownership is transferred.
Returns
A SingleUseCallback which will delete the pointer when run.
See Also
ExecutorThread
template<typename T >
void ola::Deleter ( T *  t)

Delete a pointer.

Template Parameters
Tany type.
Parameters
tThe pointer to delete. Ownership is transferred.
std::string ola::EncodeString ( const std::string &  original)

Encode any unprintable characters in a string as hex, returning a copy.

"foo\\nbar" becomes "foo\\\\x0abar" "foo\\x01test" becomes "foo\\\\x01test"

Parameters
originalthe string to encode.
Returns
The encoded string.
void ola::Escape ( std::string *  original)

Escape a string with \ .

The string is modified in place according to the grammar from json.org The following characters are escaped:

  • \
  • "
  • /
  • \b
  • \f
  • \n
  • \r
  • \t
    Parameters
    originalthe string to escape
std::string ola::EscapeString ( const std::string &  original)

Escape a string, returning a copy.

Parameters
originalthe string to escape.
Returns
The escaped string.
See Also
Escape()
void ola::FormatData ( std::ostream *  out,
const uint8_t *  data,
unsigned int  length,
unsigned int  indent = 0,
unsigned int  byte_per_line = 8 
)
inline

Write binary data to an ostream in a human readable form.

Parameters
outthe ostream to write to
datapointer to the data
lengthlength of the data
indentthe number of spaces to prefix each line with
byte_per_linethe number of bytes to display per line

The data is printed in two columns, hex on the left, ascii on the right. Non ascii values are printed as .

Deprecated:
Use ola::strings::FormatData instead (30 Dec 2014).
bool ola::GetEnv ( const std::string &  var,
std::string *  value 
)

Get the value of an environment variable.

Parameters
varthe name of the variable to get
[out]valuethe of the variable
Returns
true if the variable was defined, false otherwise.

This prefers secure_getenv so it will return false if the environment is untrusted.

bool ola::HexStringToInt ( const std::string &  value,
uint8_t *  output 
)

Convert a hex string to a uint8_t.

The string can contain upper or lower case hex characters.

Parameters
[in]valuethe string to convert.
[out]outputa pointer to the store the converted value in.
Returns
true if the value was converted, false if the string was not an int or the value was too large / small for the type.
bool ola::HexStringToInt ( const std::string &  value,
uint16_t *  output 
)

Convert a hex string to a uint16_t.

The string can contain upper or lower case hex characters.

Parameters
[in]valuethe string to convert.
[out]outputa pointer to the store the converted value in.
Returns
true if the value was converted, false if the string was not an int or the value was too large / small for the type.
bool ola::HexStringToInt ( const std::string &  value,
uint32_t *  output 
)

Convert a hex string to a uint32_t.

The string can contain upper or lower case hex characters.

Parameters
[in]valuethe string to convert.
[out]outputa pointer to the store the converted value in.
Returns
true if the value was converted, false if the string was not an int or the value was too large / small for the type.
bool ola::HexStringToInt ( const std::string &  value,
int8_t *  output 
)

Convert a hex string to a int8_t.

Parameters
[in]valuethe string to convert.
[out]outputa pointer to the store the converted value in.
Returns
true if the value was converted, false if the string was not an int or the value was too large / small for the type.

The string can contain upper or lower case hex characters.

bool ola::HexStringToInt ( const std::string &  value,
int16_t *  output 
)

Convert a hex string to a int16_t.

The string can contain upper or lower case hex characters.

Parameters
[in]valuethe string to convert.
[out]outputa pointer to the store the converted value in.
Returns
true if the value was converted, false if the string was not an int or the value was too large / small for the type.
bool ola::HexStringToInt ( const std::string &  value,
int32_t *  output 
)

Convert a hex string to a int32_t.

The string can contain upper or lower case hex characters.

Parameters
[in]valuethe string to convert.
[out]outputa pointer to the store the converted value in.
Returns
true if the value was converted, false if the string was not an int or the value was too large / small for the type.
std::string ola::IntToHexString ( unsigned int  i,
unsigned int  width 
)

Convert an unsigned int to a hex string.

Parameters
ithe unsigned int to convert
widththe width to zero pad to
Returns
The hex string representation of the unsigned int
Note
We don't currently support signed ints due to a lack of requirement for it and issues with negative handling and hex in C++
Deprecated:
ola::ToHex() instead, unless you really want a string rather than use in an ostream (30 Dec 2014)
std::string ola::IntToHexString ( uint8_t  i)
inline

Convert a uint8_t to a hex string.

Parameters
ithe number to convert
Returns
The string representation of the number
Deprecated:
ola::ToHex() instead, unless you really want a string rather than use in an ostream (30 Dec 2014)
std::string ola::IntToHexString ( uint16_t  i)
inline

Convert a uint16_t to a hex string.

Parameters
ithe number to convert
Returns
The string representation of the number
Deprecated:
ola::ToHex() instead, unless you really want a string rather than use in an ostream (30 Dec 2014)
std::string ola::IntToHexString ( uint32_t  i)
inline

Convert a uint32_t to a hex string.

Parameters
ithe number to convert
Returns
The string representation of the number
Deprecated:
ola::ToHex() instead, unless you really want a string rather than use in an ostream (30 Dec 2014)
std::string ola::IntToString ( int  i)
inline

Convert an int to a string.

Parameters
ithe int to convert
Returns
the string representation of the int
Deprecated:
Use ola::strings::IntToString instead (30 Dec 2014).
std::string ola::IntToString ( unsigned int  i)
inline

Convert an unsigned int to a string.

Parameters
ithe unsigned int to convert
Returns
The string representation of the unsigned int
Deprecated:
Use ola::strings::IntToString instead (30 Dec 2014).
std::ostream & ola::operator<< ( std::ostream &  out,
const DmxBuffer &  data 
)

Stream operator to allow DmxBuffer to be output to stdout.

Parameters
outis the output stream
datais the DmxBuffer to output from
Example
DmxBuffer dmx_buffer();
cout << dmx_buffer << endl; //Show channel values of
//dmx_buffer
void ola::ReplaceAll ( std::string *  original,
const std::string &  find,
const std::string &  replace 
)

Replace all instances of the find string with the replace string.

Parameters
originalthe string to operate on.
findthe string to find
replacewhat to replace it with
void ola::ShortenString ( std::string *  input)

Truncate the string based on the presence of \0 characters.

Parameters
inputthe string to shorten
bool ola::StringBeginsWith ( const std::string &  s,
const std::string &  prefix 
)

Check if one string is a prefix of another.

Parameters
sthe string to check
prefixthe prefix to check for
Returns
true if s begins with prefix, false otherwise.
bool ola::StringEndsWith ( const std::string &  s,
const std::string &  suffix 
)

Check if one string is a suffix of another.

Parameters
sthe string to check
suffixthe suffix to check for
Returns
true if s ends with suffix, false otherwise.
template<typename T >
std::string ola::StringJoin ( const std::string &  delim,
const T &  input 
)

Join a vector of a type.

Parameters
delimthe delimiter to use between items in the vector
inputT can be any type for which the << operator is defined
void ola::StringSplit ( const std::string &  input,
std::vector< std::string > *  tokens,
const std::string &  delimiters = " " 
)

Split a string into pieces.

If two delimiters appear next to each other an empty string is added to the output vector.

Parameters
[in]inputthe string to split
[out]tokenspointer to a vector with the parts of the string
delimitersthe delimiiter to use for splitting. Defaults to ' '
void ola::StringSplit ( const std::string &  input,
std::vector< std::string > &  tokens,
const std::string &  delimiters = " " 
)
inline

Split a string into pieces.

If two delimiters appear next to each other an empty string is added to the output vector.

Parameters
[in]inputthe string to split
[out]tokensthe parts of the string
delimitersthe delimiiter to use for splitting. Defaults to ' '
Deprecated:
Use the version with a vector pointer instead (3 Jan 2015).
bool ola::StringToBool ( const std::string &  value,
bool *  output 
)

Convert a string to a bool.

The string can be 'true' or 'false', 't' or 'f', '1' or '0' or case insensitive variations of any of the above.

Parameters
[in]valuethe string to convert
[out]outputa pointer where the value will be stored.
Returns
true if the value was converted, false if the string was not a bool.
bool ola::StringToBoolTolerant ( const std::string &  value,
bool *  output 
)

Convert a string to a bool in a tolerant way.

The string can be 'true' or 'false', 't' or 'f', '1' or '0', 'on' or 'off', 'enable' or 'disable', 'enabled' or 'disabled' or case insensitive variations of any of the above.

Parameters
[in]valuethe string to convert
[out]outputa pointer where the value will be stored.
Returns
true if the value was converted, false if the string was not a bool.
See Also
StringToBool
bool ola::StringToInt ( const std::string &  value,
unsigned int *  output,
bool  strict = false 
)

Convert a string to a unsigned int.

Parameters
[in]valuethe string to convert
[out]outputa pointer where the value will be stored.
[in]strictthis controls if trailing characters produce an error.
Returns
true if the value was converted, false if the string was not an int or the value was too large / small for the type.
bool ola::StringToInt ( const std::string &  value,
uint16_t *  output,
bool  strict = false 
)

Convert a string to a uint16_t.

Parameters
[in]valuethe string to convert
[out]outputa pointer where the value will be stored.
[in]strictthis controls if trailing characters produce an error.
Returns
true if the value was converted, false if the string was not an int or the value was too large / small for the type.
See Also
StringToInt.
bool ola::StringToInt ( const std::string &  value,
uint8_t *  output,
bool  strict = false 
)

Convert a string to a uint8_t.

Parameters
[in]valuethe string to convert
[out]outputa pointer where the value will be stored.
[in]strictthis controls if trailing characters produce an error.
Returns
true if the value was converted, false if the string was not an int or the value was too large / small for the type.
See Also
StringToInt.
bool ola::StringToInt ( const std::string &  value,
int *  output,
bool  strict = false 
)

Convert a string to a int.

Parameters
[in]valuethe string to convert
[out]outputa pointer where the value will be stored.
[in]strictthis controls if trailing characters produce an error.
Returns
true if the value was converted, false if the string was not an int or the value was too large / small for the type.
See Also
StringToInt.
bool ola::StringToInt ( const std::string &  value,
int16_t *  output,
bool  strict = false 
)

Convert a string to a int16_t.

Parameters
[in]valuethe string to convert
[out]outputa pointer where the value will be stored.
[in]strictthis controls if trailing characters produce an error.
Returns
true if the value was converted, false if the string was not an int or the value was too large / small for the type.
See Also
StringToInt.
bool ola::StringToInt ( const std::string &  value,
int8_t *  output,
bool  strict = false 
)

Convert a string to a int8_t.

Parameters
[in]valuethe string to convert
[out]outputa pointer where the value will be stored.
[in]strictthis controls if trailing characters produce an error.
Returns
true if the value was converted, false if the string was not an int or the value was too large / small for the type.
See Also
StringToInt.
template<typename int_type >
int_type ola::StringToIntOrDefault ( const std::string &  value,
int_type  alternative,
bool  strict = false 
)

Convert a string to an int type or return a default if it failed.

Template Parameters
int_typethe type to convert to
Parameters
valuethe string to convert
alternativethe default value to return if conversion failed.
[in]strictthis controls if trailing characters produce an error.
Returns
the value if it converted successfully or the default if the string was not an int or the value was too large / small for the type.
void ola::StringTrim ( std::string *  input)

Trim leading and trailing whitespace from a string.

Parameters
inputthe string to trim.
bool ola::StripPrefix ( std::string *  s,
const std::string &  prefix 
)

Strips a prefix from a string.

Parameters
sthe string to strip
prefixthe prefix to remove
Returns
true if we stripped prefix from s, false otherwise.
bool ola::StripSuffix ( std::string *  s,
const std::string &  suffix 
)

Strips a suffix from a string.

Parameters
sthe string to strip
suffixthe suffix to remove
Returns
true if we stripped suffix from s, false otherwise.
void ola::ToLower ( std::string *  s)

Convert a string to lower case.

Parameters
sthe string to convert to lower case.
void ola::ToUpper ( std::string *  s)

Convert a string to upper case.

Parameters
sthe string to convert to upper case.

Variable Documentation

const char ola::two_ASCII_digits[100][2]
static
Initial value:
{
{'0', '0'}, {'0', '1'}, {'0', '2'}, {'0', '3'}, {'0', '4'},
{'0', '5'}, {'0', '6'}, {'0', '7'}, {'0', '8'}, {'0', '9'},
{'1', '0'}, {'1', '1'}, {'1', '2'}, {'1', '3'}, {'1', '4'},
{'1', '5'}, {'1', '6'}, {'1', '7'}, {'1', '8'}, {'1', '9'},
{'2', '0'}, {'2', '1'}, {'2', '2'}, {'2', '3'}, {'2', '4'},
{'2', '5'}, {'2', '6'}, {'2', '7'}, {'2', '8'}, {'2', '9'},
{'3', '0'}, {'3', '1'}, {'3', '2'}, {'3', '3'}, {'3', '4'},
{'3', '5'}, {'3', '6'}, {'3', '7'}, {'3', '8'}, {'3', '9'},
{'4', '0'}, {'4', '1'}, {'4', '2'}, {'4', '3'}, {'4', '4'},
{'4', '5'}, {'4', '6'}, {'4', '7'}, {'4', '8'}, {'4', '9'},
{'5', '0'}, {'5', '1'}, {'5', '2'}, {'5', '3'}, {'5', '4'},
{'5', '5'}, {'5', '6'}, {'5', '7'}, {'5', '8'}, {'5', '9'},
{'6', '0'}, {'6', '1'}, {'6', '2'}, {'6', '3'}, {'6', '4'},
{'6', '5'}, {'6', '6'}, {'6', '7'}, {'6', '8'}, {'6', '9'},
{'7', '0'}, {'7', '1'}, {'7', '2'}, {'7', '3'}, {'7', '4'},
{'7', '5'}, {'7', '6'}, {'7', '7'}, {'7', '8'}, {'7', '9'},
{'8', '0'}, {'8', '1'}, {'8', '2'}, {'8', '3'}, {'8', '4'},
{'8', '5'}, {'8', '6'}, {'8', '7'}, {'8', '8'}, {'8', '9'},
{'9', '0'}, {'9', '1'}, {'9', '2'}, {'9', '3'}, {'9', '4'},
{'9', '5'}, {'9', '6'}, {'9', '7'}, {'9', '8'}, {'9', '9'}
}