Xpace
types.h File Reference
#include <cstdlib>
#include <memory>
#include <functional>
#include <cassert>
#include <cerrno>
#include <limits>
#include <vector>

Go to the source code of this file.

Classes

struct  Xpace::Unsigned< intType >
 
struct  Xpace::Unsigned< int8 >
 
struct  Xpace::Unsigned< int16 >
 
struct  Xpace::Unsigned< int32 >
 
struct  Xpace::Unsigned< int64 >
 
struct  Xpace::Signed< intType >
 
struct  Xpace::Signed< uint8 >
 
struct  Xpace::Signed< uint16 >
 
struct  Xpace::Signed< uint32 >
 
struct  Xpace::Signed< uint64 >
 
struct  Xpace::ChangeSign< intType >
 
struct  Xpace::ChangeSign< int8 >
 
struct  Xpace::ChangeSign< uint8 >
 
struct  Xpace::ChangeSign< int16 >
 
struct  Xpace::ChangeSign< uint16 >
 
struct  Xpace::ChangeSign< int32 >
 
struct  Xpace::ChangeSign< uint32 >
 
struct  Xpace::ChangeSign< int64 >
 
struct  Xpace::ChangeSign< uint64 >
 
struct  Xpace::Ref< T >
 A low-level const data holder. More...
 
struct  Xpace::Buf< T >
 A low-level data holder. More...
 
struct  Xpace::RawString< CH >
 Raw Strings - just a pointer and length. More...
 
class  Xpace::String
 A string, Unicode UTF-16 and reference-counted. More...
 
class  Xpace::Trace
 debugging More...
 

Namespaces

 Xpace
 Xpace project main namespace
 

Macros

#define XPACE_RELEASE   1.1.5
 
#define XPACE_EXPORT
 import/export attribute, used only for Windows DLLs More...
 
#define FORCEINLINE   inline
 this definition requests an 'inline' that the compiler should honor More...
 
#define _strdup(s)   strdup(s)
 
convert signed type to unsigned type
#define UNSIGN(T)   typename Unsigned<T>::Type
 
convert unsigned type to signed type
#define SIGN(T)   typename Signed<T>::Type
 
#define DIFF(T)   typename Signed<T>::Type
 
convert unsigned type to signed type, unsigned to signed
#define CHANGE_SIGN(T)   typename ChangeSign<T>::Type
 

Typedefs

typedef Ref< byteXpace::BytesRef
 
typedef RawString< utf8_t > Xpace::String8
 
typedef RawString< utf16_t > Xpace::String16
 
typedef std::function< int64(uint64 val)> Xpace::StatusCallback
 A status callback passed to operations that could be time-consuming. More...
 
typedef int Xpace::errno_t
 
unsigned types
typedef unsigned char Xpace::uchar
 
typedef uchar Xpace::byte
 
typedef unsigned int Xpace::uint
 
explicity-sized types
typedef char Xpace::int8
 
typedef unsigned char Xpace::uint8
 
typedef short Xpace::int16
 
typedef unsigned short Xpace::uint16
 
typedef int Xpace::int32
 
typedef unsigned int Xpace::uint32
 
typedef long long Xpace::int64
 
typedef unsigned long long Xpace::uint64
 
UTF char types
typedef unsigned char Xpace::utf8_t
 
typedef unsigned short Xpace::utf16_t
 
fastest native types of at least 32 bits
typedef int32 Xpace::int_fast32
 
typedef uint32 Xpace::uint_fast32
 

Enumerations

enum  { Xpace::_CVTBUFSIZE = 349 }
 

Functions

XPACE_EXPORT std::ostream & Xpace::operator<< (std::ostream &ostr, const String &str)
 Output a String to a narrow char stream. More...
 
XPACE_EXPORT std::wostream & Xpace::operator<< (std::wostream &ostr, const String &str)
 Output a String to a wide char stream. More...
 
uint32 XPACE_EXPORT Xpace::pow10_32 (uint p)
 
uint64 XPACE_EXPORT Xpace::pow10_64 (uint p)
 
template<typename TO , typename FROM >
TO Xpace::narrow_to (FROM from)
 checked loss-of-precision cast More...
 
int64 Xpace::_atoi64 (const char *)
 
int64 Xpace::_wtoi64 (const wchar_t *)
 
int Xpace::sprintf_s (char *, size_t, const char *,...)
 
int Xpace::swprintf_s (wchar_t *, size_t, const wchar_t *,...)
 
char * Xpace::strtok_s (char *, const char *, char **)
 
errno_t Xpace::strncpy_s (char *, size_t, const char *, size_t)
 
errno_t Xpace::_itoa_s (int, char *, size_t, int)
 
errno_t Xpace::_itow_s (int, wchar_t *, size_t, int)
 
errno_t Xpace::_i64toa_s (int64, char *, size_t, int)
 
errno_t Xpace::_i64tow_s (int64, wchar_t *, size_t, int)
 
errno_t Xpace::wmemmove_s (wchar_t *, size_t, const wchar_t *, size_t)
 
check an unsigned number against an error value
Parameters
the(unsigned) number to test
Returns
bool if it's invalid
template<typename N >
bool Xpace::INVALID (N n)
 

Variables

static StatusCallback Xpace::defaultStatus = [](int64 doc){ return 0; }
 Default status function. More...
 

Macro Definition Documentation

#define XPACE_RELEASE   1.1.5

Definition at line 25 of file types.h.

#define XPACE_EXPORT

import/export attribute, used only for Windows DLLs

Definition at line 39 of file types.h.

#define FORCEINLINE   inline

this definition requests an 'inline' that the compiler should honor

Definition at line 56 of file types.h.

#define UNSIGN (   T)    typename Unsigned<T>::Type

Definition at line 110 of file types.h.

#define SIGN (   T)    typename Signed<T>::Type

Definition at line 122 of file types.h.

#define DIFF (   T)    typename Signed<T>::Type

Definition at line 123 of file types.h.

#define CHANGE_SIGN (   T)    typename ChangeSign<T>::Type

Definition at line 140 of file types.h.

Referenced by Xpace::CompressibleInt< int64 >::B().

#define _strdup (   s)    strdup(s)

Definition at line 571 of file types.h.


current as of Wed Jun 10 2026 12:00:06