Home Libraries Author Links

stm Namespace Reference
[DivAids: Diverse Aids]


Detailed Description

Namespace for the SysToMath C++ Libraries.


Classes

class  byte_iterator_range
 Byte iterator range class. More...
class  integral_range
 Class template representing a range of integral objects of type IntegralT constrained by the minimal and maximal values minVal and maxVal. More...
class  integral_set
 Class template integral_set is a set container representing a set of integral type objects constrained by minimal and maximal values wrapping a set of integral ranges. More...
class  condition
 Condition class. More...
class  system_condition
 System condition class. More...
class  scoped_lock
 Scoped lock class. More...
class  system_scoped_lock
 System scoped lock class. More...
struct  fmtflags
 Base class of class template stm::hexfmt specifying format flags. More...
class  hexfmt
 Class template allowing to format the unsigned number held as hexadecimal string. More...
class  hexfmt< ElemT *, DefaultFlags >
 Class template partial specialization allowing to format the pointer held as hexadecimal string. More...
class  fixedfmt
 Class template allowing to format the floating point number of type FloatT held on an output stream in fixed point notation using a specified precision. More...
struct  space
 Unary predicate functor template determining if a CharT object is a white space as defined by the current locale. More...
struct  nospace
 Unary predicate functor template determining if a CharT object is no white space as defined by the current locale. More...
class  pstring
 Class to represent a std::string with a case unsensitive order relation on Windows systems else with a case sensitive order relation used for file system element naming. More...
class  numpstring
 Class to represent a file system name with a case unsensitive order relation on Windows systems else with a case case sensitive order relation collating numerically correct. More...
class  path
 Class template path refining boost::filesystem::path. More...
class  readablefile
 Class template representing a file named by its NameT subobject which is guaranteed to be accessible for reading and holding its size at the time of definition. More...
class  inputrange
 Class template representing a range of input files. More...
class  inputseq
class  inputrange_iterator
 Input iterator class template reading successive byte ranges from the input range of the ContextT object for which it was constructed. More...
class  filespec
 Class to specify file system element names. More...
class  filespeclist
 List class of filespec objects. More...
class  filefind
 Container class representing existing file system elements defined by a file spec using pattern matching based file name expansion. More...
class  crc
 Class template crc provides a means to generate cyclic redundancy check (CRC) remainder polynomials of type RemPolT over buffers of byte-like objects. More...
class  logger_base
 Common base class of all basic_logger class template specializations. More...
class  basic_logger
 Class template to manage formatted logging on an output stream (normally a log file) and optionally on a second stream (normally a console) and on the system log (see stm::syslog()). More...
class  logger
 Class template to manage formatted logging on a std::string based output stream (normally a log file) and optionally on a second std::string based stream (normally a console, by default std::cout, if template parameter errorConsole is false (the default), or else std::cerr). More...
class  wlogger
 Class template to manage formatted logging on a std::wstring based output stream (normally a log file) and optionally on a second std::wstring based stream (normally a console, by default std::wcout, if template parameter errorConsole is false (the default), or else std::wcerr). More...

Namespaces

namespace  buffer
 Namespace containing all buffer related utilities.
namespace  rectrl
 Namespace for regular expression matching issues.
namespace  smartptr
 Namespace for all smart pointer aids class templates.
namespace  tools
 Namespace for the SysToMath Tool Aids C++ Library modules.

Common unsigned and signed integer types

typedef boost::uint8_t byte
typedef boost::uint16_t word
typedef boost::uint32_t dword
typedef boost::uint64_t qword
typedef boost::int8_t int8
typedef boost::int16_t int16
typedef boost::int32_t int32
typedef boost::int64_t int64
typedef boost::uint_t< sizeof(void
*)*CHAR_BIT >::leas 
addrword )
 Unsigned integer type capable of holding an address.

Endianness

typedef boost::mpl::bool_
< __BYTE_ORDER==__LITTLE_ENDIAN > 
littleendian
 Type being boost::mpl::true_ or boost::mpl::false_ depending on the host endianness.
typedef boost::mpl::bool_
< __BYTE_ORDER==__BIG_ENDIAN > 
bigendian
 Type being boost::mpl::true_ or boost::mpl::false_ depending on the host endianness.
bool hostlittleendian ()
 Returns true, if the host byte order is little-endian.
bool hostbigendian ()
 Returns true, if the host byte order is big-endian.

Typedefs

typedef numpstring numpath
typedef readablefile< numpstringsizedfile
 For cenvenience sizedfile is a synonym for readablefile<numpstring>.

Enumerations

enum  SyslogFlags {
  SyslogNoLog = 0x00000000,
  SyslogInfo = 0x00000001,
  LogInfo = 0x00000001,
  SyslogWarning = 0x00000002,
  LogWarning = 0x00000002,
  SyslogError = 0x00000003,
  LogError = 0x00000003,
  SyslogLevelMask = 0x00000003,
  LogLevelMask = 0x00000003,
  SyslogPerror = 0x00010000,
  LogPerror = 0x00010000,
  SyslogNoPerror = 0x00020000,
  LogNoPerror = 0x00020000
}
 Syslog flags. More...

Functions

void initSyslog (bool perror=false, const std::string &prog=std::string())
 Initialize syslog().
void syslog (const std::string &message, unsigned int flags=SyslogInfo)
 Output message to the system log according to flags.
template<class IStreamT, typename IntegralT, IntegralT minVal, IntegralT maxVal>
IStreamT & operator>> (IStreamT &is, integral_range< IntegralT, minVal, maxVal > &range)
 Extract the integral range formatted as single integral number or as expression "first-last" with integral numbers first < last enclosed in parentheses from the input stream is and store it in the integral range.
template<class OStreamT, typename IntegralT, IntegralT minVal, IntegralT maxVal>
OStreamT & operator<< (OStreamT &os, const integral_range< IntegralT, minVal, maxVal > &range)
 Insert the integral range held by range into the output stream os formatted as single decimal numbers or expression "first-last" with decimal numbers first < last.
template<class IStreamT, class IntegralRangeT, class RangeSetT>
IStreamT & operator>> (IStreamT &is, integral_set< IntegralRangeT, RangeSetT > &set)
 Extract the integral ranges formatted as comma separated sequence of single integral numbers and/or expressions "first-last" with integral numbers first < last enclosed in parentheses from the input stream is and store them in the integral set.
template<class OStreamT, class IntegralRangeT, class RangeSetT>
OStreamT & operator<< (OStreamT &os, const integral_set< IntegralRangeT, RangeSetT > &set)
 Insert the integral ranges held by the integral set into the output stream os formatted as comma separated sequence of single decimal numbers and/or expressions "first-last" with decimal numbers first < last.
template<class OStreamT, typename UnsignedT, dword DefaultFlags>
OStreamT & operator<< (OStreamT &os, const hexfmt< UnsignedT, DefaultFlags > &val)
 Insert the value held by val into the output stream os as hexadecimal string formatted according to the flags in effect.
template<class OStreamT, typename ElemT, dword DefaultFlags>
OStreamT & operator<< (OStreamT &os, const hexfmt< ElemT *, DefaultFlags > &ptr)
 Insert the value held by ptr into the output stream os as hexadecimal string according to the flags in effect.
template<class OStreamT, typename FloatT>
OStreamT & operator<< (OStreamT &os, const fixedfmt< FloatT > &val)
 Insert the value held by val into the output stream os in fixed point notation using the precision specified by val.
template<typename ScalarT>
dword nrOfSetBits (ScalarT value)
 Function template returning the number of set bits of a ScalarT value.
template<class StringT>
StringT::size_type clamped_offset (const StringT &str, typename StringT::size_type pos)
 Function template returning the offset pos of the string str clamped by its length.
template<class StringT>
StringT::size_type clamped_rest (const StringT &str, typename StringT::size_type pos)
 Function template returning the length of the string str beginning with offset pos clamped by the string's length.
template<class StringT>
StringT trim_back (const StringT &str)
 Function template returning a copy of str.substr without trailing white space characters as defined by the current locale.
template<class StringT>
StringT trim_back (const StringT &str, typename StringT::size_type pos)
 Function template returning a copy of str.substr (0, pos) without trailing white space characters as defined by the current locale.
template<class StringT>
StringT::size_type find_trim_back (const StringT &str)
 Function template returning trim_back (str).size ().
template<class StringT>
StringT::size_type find_trim_back (const StringT &str, typename StringT::size_type pos)
 Function template returning trim_back (str, pos).size ().
template<class StringT>
StringT::size_type find_token_end (const StringT &str, typename StringT::size_type pos=0)
 Function template returning the least index npos >= pos such that npos == str.length () or str [npos] is white space.
template<class StringT>
StringT trim_back (const StringT &str, const StringT &sepchars)
 Function template returning a copy of str without trailing characters from sepchars.
template<class StringT>
StringT trim_back (const StringT &str, const StringT &sepchars, typename StringT::size_type pos)
 Function template returning a copy of str.substr (0, pos) without trailing characters from sepchars.
template<class StringT>
StringT::size_type find_trim_back (const StringT &str, const StringT &sepchars)
 Function template returning trim_back (str, sepchars).size ().
template<class StringT>
StringT::size_type find_trim_back (const StringT &str, const StringT &sepchars, typename StringT::size_type pos)
 Function template returning trim_back (str, sepchars, pos).size ().
template<class StringT>
StringT::size_type find_token_end (const StringT &str, const StringT &sepchars, typename StringT::size_type pos=0)
 Function template returning the least index npos >= pos with npos == str.length () or str [npos] is one of the characters of sepchars.
template<class StringT>
StringT trim_front (const StringT &str, typename StringT::size_type pos=0)
 Function template returning a copy of str.substr (pos) without leading white space characters as defined by the current locale.
template<class StringT>
StringT::size_type find_trim_front (const StringT &str, typename StringT::size_type pos=0)
 Function template returning str.size () - trim_front (str, pos).size ().
template<class StringT>
StringT trim_front (const StringT &str, const StringT &sepchars, typename StringT::size_type pos=0)
 Function template returning a copy of str.substr (pos) without leading characters from sepchars.
template<class StringT>
StringT::size_type find_trim_front (const StringT &str, const StringT &sepchars, typename StringT::size_type pos=0)
 Function template returning str.size () - trim_front (str, sepchars, pos).size ().
template<class StringT>
StringT trim (const StringT &str)
 Function template returning a copy of str without leading and trailing white space characters as defined by the current locale.
template<class StringT>
StringT trim (const StringT &str, const StringT &sepchars)
 Function template returning a copy of str without leading and trailing characters from sepchars.
int makedir (const boost::filesystem::path &path)
 Make directory path.
int getkey ()
 Read one character from the console and return it as int on success, else return -1 and set the variable errno according to the error.
bool isWin32Executable (const std::string &path)
 The function isWin32Executable returns true, if path (which may not exist) designates a WIN32 executable file (case unsensitively the extension '.exe', '.dll', '.msi' or '.com').
template<class SequenceT>
SequenceT & brace_expand (SequenceT &result, const std::string &str, bool allowCommaSep=false)
 The function template brace_expand appends the maybe brace expanded words of str to the sequence result and returns result.
bool designateSame (const pstring &p1, const pstring &p2)
 Return true, if the pstring object p1 designates the same file system element than that p2 designates.
bool operator< (const pstring &p1, const pstring &p2)
 Order relation for pstring objects.
bool operator== (const pstring &p1, const pstring &p2)
 Equality relation for pstring objects.
bool operator< (const numpstring &p1, const numpstring &p2)
 Order relation for numpstring objects.
bool operator== (const numpstring &p1, const numpstring &p2)
 Equality relation for numpstring objects.
template<class NameT>
void swap (readablefile< NameT > &rf1, readablefile< NameT > &rf2)
 Swaps the readablefile objects rf1 and rf2.
template<class BufRangeT, class ContextT>
bool operator== (const inputrange_iterator< BufRangeT, ContextT > &x, const inputrange_iterator< BufRangeT, ContextT > &y)
 Equality operator.
template<class BufRangeT, class ContextT>
bool operator!= (const inputrange_iterator< BufRangeT, ContextT > &x, const inputrange_iterator< BufRangeT, ContextT > &y)
 Inequality operator.


© Copyright Tom Michaelis 2002-2007

Distributed under the SysToMath Software License (See the accompanying file license.txt or a copy at www.SysToMath.com).