The entire GeoLite2++ library is encapsulated in the GeoLite2PP namespace to prevent namespace pollution. More...
Classes | |
class | DB |
The DB class is the primary class used by GeoLite2++. More... | |
class | ErrorCategory |
Error class used to return libmaxminddb error codes and messages when C++ exceptions are thrown. More... | |
Typedefs | |
typedef std::map< std::string, std::string > | MStr |
Map of std::string to std::string. More... | |
typedef std::vector< const char * > | VCStr |
Vector of C-style string pointers. More... | |
Enumerations | |
enum | MMDBStatus { MMDBStatus::success = MMDB_SUCCESS, MMDBStatus::file_open = MMDB_FILE_OPEN_ERROR, MMDBStatus::corrupt_search_tree = MMDB_CORRUPT_SEARCH_TREE_ERROR, MMDBStatus::invalid_metadata = MMDB_INVALID_METADATA_ERROR, MMDBStatus::io = MMDB_IO_ERROR, MMDBStatus::out_of_memory = MMDB_OUT_OF_MEMORY_ERROR, MMDBStatus::unknown_db_format = MMDB_UNKNOWN_DATABASE_FORMAT_ERROR, MMDBStatus::invalid_data = MMDB_INVALID_DATA_ERROR, MMDBStatus::invalid_lookup_path = MMDB_INVALID_LOOKUP_PATH_ERROR, MMDBStatus::lookup_path_does_not_match = MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR, MMDBStatus::invalid_node_number = MMDB_INVALID_NODE_NUMBER_ERROR, MMDBStatus::ipv6_lookup_in_ipv4_db = MMDB_IPV6_LOOKUP_IN_IPV4_DATABASE_ERROR } |
Errors defined in maxminddb.h, converted to C++ enums. More... | |
Functions | |
const ErrorCategory & | get_error_category (void) noexcept |
All error category objects should actually be references to the exact same object, which is provided by this function. More... | |
std::error_code | make_error_code (MMDBStatus s) |
Associate an error value with the category. More... | |
std::error_condition | make_error_condition (MMDBStatus s) |
Associate an error_condition with the category. More... | |
The entire GeoLite2++ library is encapsulated in the GeoLite2PP namespace to prevent namespace pollution.
Note that GeoLite2++ builds on top of the existing C library "libmaxminddb". GeoLite2++ provides alternate C++ bindings, it is not a replacement! GeoLite2++ was written to provide an easier method from C++ to access MaxMind's GeoLite2 GeoIP database.
The original C libmaxminddb library is here: https://github.com/maxmind/libmaxminddb/
typedef std::map<std::string, std::string> GeoLite2PP::MStr |
Map of std::string to std::string.
typedef std::vector<const char *> GeoLite2PP::VCStr |
Vector of C-style string pointers.
|
strong |
Errors defined in maxminddb.h, converted to C++ enums.
|
noexcept |
All error category objects should actually be references to the exact same object, which is provided by this function.
Referenced by GeoLite2PP::DB::DB(), GeoLite2PP::DB::get_metadata(), GeoLite2PP::DB::lookup(), GeoLite2PP::DB::lookup_raw(), make_error_code(), and make_error_condition().
std::error_code GeoLite2PP::make_error_code | ( | GeoLite2PP::MMDBStatus | s | ) |
Associate an error value with the category.
References get_error_category().
std::error_condition GeoLite2PP::make_error_condition | ( | GeoLite2PP::MMDBStatus | s | ) |
Associate an error_condition with the category.
References get_error_category().