39 #define E57_INTERNAL_IMPLEMENTATION_ENABLE 1
60 #pragma warning( disable : 4224 )
66 #define E57_EXCEPTION1( ecode ) \
67 ( E57Exception( ( ecode ), ustring(), __FILE__, __LINE__, static_cast<const char *>( __FUNCTION__ ) ) )
68 #define E57_EXCEPTION2( ecode, context ) \
69 ( E57Exception( ( ecode ), ( context ), __FILE__, __LINE__, static_cast<const char *>( __FUNCTION__ ) ) )
73 inline std::string
space(
size_t n )
75 return ( std::string( n,
' ' ) );
82 std::ostringstream ss;
89 std::ostringstream ss;
90 ss <<
"0x" << std::hex << std::setw( 16 ) << std::setfill(
'0' ) << x;
95 std::ostringstream ss;
96 ss <<
"0x" << std::hex << std::setw( 8 ) << std::setfill(
'0' ) << x;
101 std::ostringstream ss;
102 ss <<
"0x" << std::hex << std::setw( 4 ) << std::setfill(
'0' ) << x;
107 std::ostringstream ss;
108 ss <<
"0x" << std::hex << std::setw( 2 ) << std::setfill( '0' ) << static_cast<unsigned>( x );
113 std::ostringstream ss;
114 for (
int i = 63; i >= 0; i-- )
116 ss << ( ( x & ( 1LL << i ) ) ? 1 : 0 );
117 if ( i > 0 && i % 8 == 0 )
124 std::ostringstream ss;
125 for (
int i = 31; i >= 0; i-- )
127 ss << ( ( x & ( 1LL << i ) ) ? 1 : 0 );
128 if ( i > 0 && i % 8 == 0 )
135 std::ostringstream ss;
136 for (
int i = 15; i >= 0; i-- )
138 ss << ( ( x & ( 1LL << i ) ) ? 1 : 0 );
139 if ( i > 0 && i % 8 == 0 )
146 std::ostringstream ss;
147 for (
int i = 7; i >= 0; i-- )
149 ss << ( ( x & ( 1LL << i ) ) ? 1 : 0 );
150 if ( i > 0 && i % 8 == 0 )
157 return (
hexString(
static_cast<uint64_t
>( x ) ) );
161 return (
hexString(
static_cast<uint32_t
>( x ) ) );
165 return (
hexString(
static_cast<uint16_t
>( x ) ) );
169 return (
hexString(
static_cast<uint8_t
>( x ) ) );
std::string binaryString(uint64_t x)
std::shared_ptr< class NodeImpl > NodeImplSharedPtr
std::weak_ptr< class ImageFileImpl > ImageFileImplWeakPtr
std::shared_ptr< class ImageFileImpl > ImageFileImplSharedPtr
std::weak_ptr< class NodeImpl > NodeImplWeakPtr
std::set< std::string > StringSet
std::string generateRandomGUID()
generates a new random GUID
std::string toString(T x)
std::vector< std::string > StringList
std::string space(size_t n)
std::string hexString(uint64_t x)