libosmscout  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
Number.h File Reference
#include <osmscout/private/CoreImportExport.h>
#include <limits>
#include <stddef.h>
#include <osmscout/system/Types.h>

Classes

struct  osmscout::DecodeNumberTemplated< is_signed, N >
 
struct  osmscout::DecodeNumberTemplated< false, N >
 
struct  osmscout::DecodeNumberTemplated< true, N >
 
struct  osmscout::EncodeNumberTemplated< is_signed, N >
 
struct  osmscout::EncodeNumberTemplated< false, N >
 
struct  osmscout::EncodeNumberTemplated< true, N >
 

Namespaces

 osmscout
 

Functions

template<typename N >
uint8_t osmscout::BitsNeededToEncodeNumber (N number)
 Returns the number of bytes needed to encode the number. More...
 
template<typename N >
osmscout::BitsToBytes (N bits)
 Returns the number of bytes needed to encode the given number of bits. More...
 
template<typename N >
uint8_t osmscout::BytesNeededToEncodeNumber (N number)
 Returns the number of bytes needed to encode the number. More...
 
template<typename N >
unsigned int osmscout::DecodeNumber (const char *buffer, N &number)
 Decode a variable length encoded number from the buffer back to the variable. More...
 
template<typename N >
unsigned int osmscout::DecodeNumberSigned (const char *buffer, N &number)
 Decode a signed variable length encoded number from the buffer back to the variable. More...
 
template<typename N >
unsigned int osmscout::DecodeNumberUnsigned (const char *buffer, N &number)
 Decode an unsigned variable length encoded number from the buffer back to the variable. More...
 
template<typename N >
unsigned int osmscout::EncodeNumber (N number, char *buffer)
 Encode a number into the given buffer using some variable length encoding. More...
 
template<typename N >
unsigned int osmscout::EncodeNumberSigned (N number, char *buffer)
 Encode a signed number into the given buffer using some variable length encoding. More...
 
template<typename N >
unsigned int osmscout::EncodeNumberUnsigned (N number, char *buffer)
 Encode an unsigned number into the given buffer using some variable length encoding. More...
 
OSMSCOUT_API uint64_t osmscout::InterleaveNumbers (uint32_t a, uint32_t b)
 Encodes the given numbers into a new number of twice the size that has the bits of each nunber alternating interleaved. More...