B2BITS FIX Antenna HFT  1.0.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Macros | Typedefs | Functions | Variables
UtilsHelpers.h File Reference
#include <string>
#include <vector>
#include <map>
#include <functional>
#include <limits>
#include <algorithm>
#include <B2BITS_IntDefines.h>
#include <B2BITS_V12_Defines.h>
#include <PlatformDefines.h>
#include <assert.h>
+ Include dependency graph for UtilsHelpers.h:
+ This graph shows which files directly or indirectly include this file:

Classes

struct  Utils::CiStringCompare
 Meyer's case-insensitive comparison functor. More...
 
struct  Utils::CStrCaseSensLess
 Meyer's case-insensitive comparision functor. More...
 
struct  Utils::DeleteArrayObject
 
struct  Utils::DeleteFirst
 Deletes the first member of std::pair. More...
 
struct  Utils::DeleteObject
 Deletes the given object. More...
 
struct  Utils::DeleteSecond
 Deletes the second member of std::pair. More...
 
struct  Utils::ReleaseObject
 Decrements the number of references to the given object. More...
 
struct  Utils::ReleaseSecond
 Decrements the number of references to the given object. More...
 
struct  Utils::TakeFirst
 Returns the first member of std::pair. More...
 
struct  Utils::TakeSecond
 Returns the second member of std::pair. More...
 

Namespaces

 Utils
 Utils namespace.
 

Macros

#define FIX_ASSERT(predicate)
 

Typedefs

typedef std::map< const char
*, const char
*, CStrCaseSensLess > 
Utils::StringProperties
 
typedef std::vector< std::string > Utils::Strings
 

Functions

bool V12_API Utils::areDigitsOnly (const std::string &str)
 Returns 'true' if the given std::string contains only digits, otherwise - 'false'. More...
 
System::i32 V12_API Utils::atoi32 (char const *pBuf, char const **end) throw ()
 
System::i32 V12_API Utils::atoi32 (wchar_t const *pBuf, wchar_t const **end) throw ()
 
System::i64 V12_API Utils::atoi64 (char const *pBuf, char const **end) throw ()
 
System::i64 V12_API Utils::atoi64 (wchar_t const *pBuf, wchar_t const **end) throw ()
 
std::size_t V12_API Utils::atos (char const *pBuf, char const **end) throw ()
 
int V12_API Utils::atosi (char const *pBuf, char const **end) throw ()
 
int V12_API Utils::atosi (wchar_t const *pBuf, wchar_t const **end) throw ()
 
System::u32 V12_API Utils::atou32 (std::string const &value) throw ()
 
System::u32 V12_API Utils::atou32 (char const *pBuf, char const **end) throw ()
 
System::u32 V12_API Utils::atou32 (char const *pBuf, std::size_t size) throw ()
 
System::u32 V12_API Utils::atou32 (wchar_t const *pBuf, wchar_t const **end) throw ()
 
System::u64 V12_API Utils::atou64 (char const *pBuf, char const **end) throw ()
 
System::u64 V12_API Utils::atou64 (wchar_t const *pBuf, wchar_t const **end) throw ()
 
unsigned int V12_API Utils::atoui (char const *pBuf, char const **end) throw ()
 
unsigned int V12_API Utils::atoui (wchar_t const *pBuf, wchar_t const **end) throw ()
 
std::string V12_API Utils::b2str (bool val)
 
int V12_API Utils::ciStrCmp (const char *dst, const char *src) throw ()
 Perform a lowercase comparison of ASCII strings. More...
 
template<typename InputIterator , typename OutputIterator , typename Predicate >
OutputIterator Utils::copy_if (InputIterator begin, InputIterator end, OutputIterator destBegin, Predicate p)
 Increments the number of references to the second member of std::pair. More...
 
template<typename T , int N>
static std::size_t Utils::count_of (T const (&)[N])
 Returns number of characters in the array. More...
 
template<typename MapType , typename KeyArgType , typename ValueArgtype >
MapType::iterator Utils::efficientAddOrUpdateMap (MapType &m, const KeyArgType &k, const ValueArgtype &v)
 It efficiently adds or updates elements in STL map. More...
 
std::string V12_API Utils::f2str (double aV)
 
void V12_API Utils::f2str (double aV, Utils::RawBuffer *rez)
 
std::string V12_API Utils::format (int src, std::size_t grp=3, const std::string &sep=" ")
 Formats number. More...
 
std::string V12_API Utils::format (std::size_t src, std::size_t grp=3, const std::string &sep=" ")
 
std::string V12_API Utils::format (const std::string &src, std::size_t grp=3, const std::string &sep=" ")
 
System::u64 Utils::htonll (System::u64 value) throw ()
 
std::string V12_API Utils::i2str (int aV)
 
void V12_API Utils::i2str (int aV, Utils::RawBuffer *rez)
 
std::string V12_API Utils::i2str (int aV, const char *format)
 
int V12_API Utils::i2str (char *pBuf, int value)
 Converts binary int to ASCII std::string by base 10. More...
 
char * Utils::i32toa (char *pBuf, std::size_t buf_size, System::i32 value) throw ()
 
char * Utils::i64toa (char *pBuf, std::size_t buf_size, System::i64 value) throw ()
 
char * Utils::i64toa (char *pBuf, char *end, System::i64 value) throw ()
 
bool Utils::isDigit (int ch)
 
std::string V12_API Utils::lli2str (long long int aV)
 
void V12_API Utils::lli2str (long long int aV, Utils::RawBuffer *rez)
 
void V12_API Utils::makeSnId (const std::string &aSender, const std::string &aTarget, std::string *res)
 Makes an identification number from m_sender and m_target. More...
 
std::string V12_API Utils::makeSnId (const std::string &aSender, const std::string &aTarget)
 
static void * Utils::memmem (const void *aS1, std::size_t aN1, const void *aS2, std::size_t aN2) throw ()
 The function searches for the first sequence of elements in the array arrray1 that matches the sequence of elements in the array array2. More...
 
unsigned long long Utils::ntohll (unsigned long long value) throw ()
 
std::string V12_API Utils::peel (const std::string &source, const char *husk)
 Peels source std::string. More...
 
char * Utils::sizetoa (char *pBuf, std::size_t buf_size, std::size_t value) throw ()
 
int V12_API Utils::split (const std::string &inStr, char delimiter, Strings *out)
 Splits a std::string into a collection of strings. More...
 
template<typename Functor , typename Context >
void Utils::split (std::string const &str, char const *delimeter, Functor f, Context *context)
 
int V12_API Utils::split (const std::string &inStr, const std::string &delimiter, Strings *out)
 Splits a std::string into a collection of strings. More...
 
bool V12_API Utils::str2b (const std::string &val)
 
std::string V12_API Utils::toString (System::u32 value)
 
std::string V12_API Utils::toString (System::i32 value)
 
std::string V12_API Utils::toString (System::u64 value)
 
std::string V12_API Utils::toString (System::i64 value)
 
std::string const & Utils::toString (std::string const &value)
 
void V12_API Utils::trimWhiteSpace (std::string *apStr)
 
template<typename ToT , typename FromT >
ToT Utils::truncateTo (FromT val)
 Returns either passed value or maximum possible value for required type. More...
 
std::string V12_API Utils::u2str (std::size_t aV)
 
void V12_API Utils::u2str (std::size_t aV, Utils::RawBuffer *rez)
 
char * Utils::u32toa (char *pBuf, std::size_t buf_size, System::u32 value) throw ()
 
char * Utils::u32toa (char *pBuf, char *end, System::u32 value) throw ()
 
char * Utils::u64toa (char *pBuf, std::size_t buf_size, System::u64 value) throw ()
 
char * Utils::u64toa (char *pBuf, char *end, System::u64 value) throw ()
 

Variables

static std::size_t const Utils::MAX_INT32_STR_SIZE = sizeof( "-2147483647" ) - 1
 Size of the maximum int32 value in std::string representation. More...
 
static std::size_t const Utils::MAX_INT64_STR_SIZE = sizeof( "-9223372036854775808" ) - 1
 Size of the maximum int64 value in std::string representation. More...
 
static std::size_t const Utils::MAX_SIZE_T_STR_SIZE = MAX_UINT64_STR_SIZE
 Size of the maximum uint64 value in std::string representation. More...
 
static std::size_t const Utils::MAX_UINT32_STR_SIZE = sizeof( "4294967296" ) - 1
 Size of the maximum uint32 value in std::string representation. More...
 
static std::size_t const Utils::MAX_UINT64_STR_SIZE = sizeof( "18446744073709551616" ) - 1
 Size of the maximum uint64 value in std::string representation. More...
 

Macro Definition Documentation

#define FIX_ASSERT (   predicate)