diff --git a/include/amqpcpp.h b/include/amqpcpp.h index ebb064e..deb69d9 100644 --- a/include/amqpcpp.h +++ b/include/amqpcpp.h @@ -77,6 +77,7 @@ #include "amqpcpp/channel.h" #include "amqpcpp/login.h" #include "amqpcpp/address.h" +#include "amqpcpp/addresses.h" #include "amqpcpp/connectionhandler.h" #include "amqpcpp/connectionimpl.h" #include "amqpcpp/connection.h" diff --git a/include/amqpcpp/addresses.h b/include/amqpcpp/addresses.h index 3af0e76..2379658 100644 --- a/include/amqpcpp/addresses.h +++ b/include/amqpcpp/addresses.h @@ -12,6 +12,11 @@ */ #pragma once +/** + * Dependencies + */ +#include + /** * Begin of namespace */ @@ -68,6 +73,20 @@ public: throw std::runtime_error("no addresses"); } + /** + * Constructor for a comma separated list + * @param buffer + * @throws std::runtime_error + */ + Addresses(const char *buffer) : Addresses(buffer, strlen(buffer)) {} + + /** + * Constructor for a comma separated list + * @param buffer + * @throws std::runtime_error + */ + Addresses(const std::string &buffer) : Addresses(buffer.data(), buffer.size()) {} + /** * Destructed */