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
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00049 #ifndef PANTHEIOS_INCL_PANTHEIOS_INSERTERS_HPP_XI
00050 #define PANTHEIOS_INCL_PANTHEIOS_INSERTERS_HPP_XI
00051
00052
00053
00054
00055
00056 #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
00057 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_XI_MAJOR 1
00058 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_XI_MINOR 0
00059 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_XI_REVISION 4
00060 # define PANTHEIOS_VER_PANTHEIOS_INSERTERS_HPP_XI_EDIT 6
00061 #endif
00062
00063
00064
00065
00066
00067 #ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS
00068 # include <pantheios/pantheios.h>
00069 #endif
00070
00071 #ifndef PANTHEIOS_INCL_PANTHEIOS_INSERTERS_HPP_INTEGER
00072 # include <pantheios/inserters/integer.hpp>
00073 #endif
00074
00075
00076
00077
00078
00079 #if !defined(PANTHEIOS_NO_NAMESPACE)
00080 namespace pantheios
00081 {
00082 #endif
00083
00084
00085
00086
00087
00090 class xi
00091 : public integer
00092 {
00093 public:
00095 typedef integer parent_class_type;
00097 typedef xi class_type;
00098
00099 private:
00100
00101 static int get_default_width_(size_t numBytes)
00102 {
00103 return 2 + int(2 * numBytes);
00104 }
00105 static int validate_width_(int width)
00106 {
00107 return width;
00108 }
00109
00110 public:
00111 #ifdef STLSOFT_CF_8BIT_INT_EXTENDED_TYPE_IS_DISTINCT
00113 explicit xi(::stlsoft::sint8_t i, int width = get_default_width_(1))
00114 : parent_class_type(i, validate_width_(width), int(fmt::fullHex))
00115 {}
00117 explicit xi(::stlsoft::uint8_t i, int width = get_default_width_(1))
00118 : parent_class_type(i, validate_width_(width), int(fmt::fullHex))
00119 {}
00120 #endif // STLSOFT_CF_8BIT_INT_EXTENDED_TYPE_IS_DISTINCT
00121 #ifdef STLSOFT_CF_16BIT_INT_EXTENDED_TYPE_IS_DISTINCT
00123 explicit xi(::stlsoft::sint16_t i, int width = get_default_width_(2))
00124 : parent_class_type(i, validate_width_(width), int(fmt::fullHex))
00125 {}
00127 explicit xi(::stlsoft::uint16_t i, int width = get_default_width_(2))
00128 : parent_class_type(i, validate_width_(width), int(fmt::fullHex))
00129 {}
00130 #endif // STLSOFT_CF_16BIT_INT_EXTENDED_TYPE_IS_DISTINCT
00131 #if defined(STLSOFT_CF_32BIT_INT_EXTENDED_TYPE_IS_DISTINCT) || \
00132 ( defined(STLSOFT_COMPILER_IS_MSVC) && \
00133 _MSC_VER == 1200)
00135 explicit xi(::stlsoft::sint32_t i, int width = get_default_width_(4))
00136 : parent_class_type(i, validate_width_(width), int(fmt::fullHex))
00137 {}
00139 explicit xi(::stlsoft::uint32_t i, int width = get_default_width_(4))
00140 : parent_class_type(i, validate_width_(width), int(fmt::fullHex))
00141 {}
00142 #endif // STLSOFT_CF_32BIT_INT_EXTENDED_TYPE_IS_DISTINCT
00143 #ifdef STLSOFT_CF_64BIT_INT_SUPPORT
00145 explicit xi(::stlsoft::sint64_t i, int width = get_default_width_(8))
00146 : parent_class_type(i, validate_width_(width), int(fmt::fullHex))
00147 {}
00149 explicit xi(::stlsoft::uint64_t i, int width = get_default_width_(8))
00150 : parent_class_type(i, validate_width_(width), int(fmt::fullHex))
00151 {}
00152 #endif
00154 explicit xi(int i, int width = get_default_width_(sizeof(int)))
00155 : parent_class_type(i, validate_width_(width), int(fmt::fullHex))
00156 {}
00158 explicit xi(unsigned int i, int width = get_default_width_(sizeof(unsigned int)))
00159 : parent_class_type(i, validate_width_(width), int(fmt::fullHex))
00160 {}
00162 explicit xi(long i, int width = get_default_width_(sizeof(long)))
00163 : parent_class_type(i, validate_width_(width), int(fmt::fullHex))
00164 {}
00166 explicit xi(unsigned long i, int width = get_default_width_(sizeof(unsigned long)))
00167 : parent_class_type(i, validate_width_(width), int(fmt::fullHex))
00168 {}
00169 };
00170
00171
00172
00173
00174
00175 #if !defined(PANTHEIOS_NO_NAMESPACE)
00176 }
00177 #endif
00178
00179
00180
00181
00182
00183 #ifdef STLSOFT_PPF_pragma_once_SUPPORT
00184 # pragma once
00185 #endif
00186
00187
00188
00189 #endif
00190
00191