OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Geospatial::anonymous_namespace{Types.cpp} Namespace Reference

Classes

struct  HexDigitToDecimalTable
 

Functions

uint8_t hex_to_binary (const char &usb, const char &lsb)
 
std::vector< uint8_t > hex_string_to_binary_vector (const std::string &wkb_hex)
 

Variables

constexpr HexDigitToDecimalTable hex_digit_to_decimal_table
 

Function Documentation

std::vector<uint8_t> Geospatial::anonymous_namespace{Types.cpp}::hex_string_to_binary_vector ( const std::string &  wkb_hex)

Definition at line 888 of file Types.cpp.

References hex_to_binary(), and i.

Referenced by Geospatial::GeoTypesFactory::createOGRGeometry().

888  {
889  auto num_bytes = wkb_hex.size() >> 1;
890  std::vector<uint8_t> wkb(num_bytes);
891  auto* chars = wkb_hex.data();
892  auto* bytes = wkb.data();
893  for (size_t i = 0; i < num_bytes; i++) {
894  auto const& usb = *chars++;
895  auto const& lsb = *chars++;
896  *bytes++ = hex_to_binary(usb, lsb);
897  }
898  return wkb;
899 }
uint8_t hex_to_binary(const char &usb, const char &lsb)
Definition: Types.cpp:884

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint8_t Geospatial::anonymous_namespace{Types.cpp}::hex_to_binary ( const char &  usb,
const char &  lsb 
)
inline

Definition at line 884 of file Types.cpp.

Referenced by hex_string_to_binary_vector().

884  {
885  return (hex_digit_to_decimal_table[usb] << 4) | hex_digit_to_decimal_table[lsb];
886 }
constexpr HexDigitToDecimalTable hex_digit_to_decimal_table
Definition: Types.cpp:882

+ Here is the caller graph for this function:

Variable Documentation

constexpr HexDigitToDecimalTable Geospatial::anonymous_namespace{Types.cpp}::hex_digit_to_decimal_table

Definition at line 882 of file Types.cpp.