00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <iostream>
00027 #include <vector>
00028 #ifndef HELPER
00029 #define HELPER
00030
00031 class HexChar {
00032 public:
00033 unsigned char val;
00034 HexChar(unsigned char x);
00035 };
00036
00037
00038 class HexShort {
00039 public:
00040 unsigned short val;
00041 HexShort(unsigned short x);
00042 };
00043
00044 class DecLong {
00045 public:
00046 unsigned long val;
00047 DecLong(unsigned long v);
00048 };
00049
00050 std::ostream &operator << (std::ostream &os, const HexChar &h);
00051 std::ostream &operator << (std::ostream &os, const HexShort &h);
00052 std::ostream &operator << (std::ostream &os, const DecLong &h);
00053
00055 std::string int2str(int i);
00056
00058 std::string int2hex(int i);
00059
00061 std::string readline(std::istream &is);
00062
00064 std::vector<std::string> split(const std::string &inp, std::string splitc="\t\n\r\b ");
00065 #endif