00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(_xyzzy_util_hxx_)
00023 # define _xyzzy_util_hxx_
00024
00025 #include <iostream>
00026
00027 namespace xyzzy
00028 {
00029 unsigned int toUnsignedInt(const char* s);
00030
00031 int toInt(const char* s);
00032
00033 unsigned long int toUnsignedLongInt(const char* s);
00034
00035 long int toLongInt(const char* s);
00036
00040 int toLittleEndianHex(double d, char *buf);
00041
00042 class TTicker
00043 {
00044 public:
00045 explicit TTicker(unsigned tickIncr,
00046 unsigned tickPcnt,
00047 std::ostream &os = std::cout);
00048
00049 void tick();
00050
00051 private:
00052 const unsigned m_tickIncr;
00053 const unsigned m_tickPcnt;
00054 std::ostream &m_os;
00055 unsigned m_pcnt;
00056 unsigned m_tick;
00057 };
00058 };
00059
00060 #endif //_xyzzy_util_hxx_