add string/cstring constructors to addresses.h; add addresses.h to include file
This commit is contained in:
parent
69026c31a3
commit
723470d6d6
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* Dependencies
|
||||
*/
|
||||
#include <cstring>
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue