using namespace isc::util;
using namespace boost::asio;
using namespace boost::asio::ip;
-
namespace ph = std::placeholders;
namespace {
#include <mutex>
using namespace std;
+namespace ph = std::placeholders;
namespace isc {
namespace asiolink {
// Pass a function bound with a shared_ptr to this.
timer_.async_wait(std::bind(&IntervalTimerImpl::callback,
shared_from_this(),
- std::placeholders::_1)); //error
+ ph::_1)); //error
} catch (const boost::system::system_error& e) {
isc_throw(isc::Unexpected, "Failed to update timer: " << e.what());
} catch (const boost::bad_weak_ptr&) {
#include <string>
using namespace isc::asiolink;
+namespace ph = std::placeholders;
namespace {
SERVER_PORT);
socket_.async_connect(endpoint,
std::bind(&TCPClient::connectHandler, this,
- std::placeholders::_1));
+ ph::_1));
}
/// @brief Callback function for connect().
/// retained in the connections_ list.
void accept() {
TCPAcceptorCallback cb = std::bind(&TCPAcceptorTest::acceptHandler,
- this, std::placeholders::_1);
+ this, ph::_1);
AcceptorPtr conn(new Acceptor(io_service_, acceptor_, cb));
connections_.push_back(conn);
connections_.back()->accept();
#include <sstream>
using namespace boost::asio::local;
+namespace ph = std::placeholders;
namespace isc {
namespace asiolink {
void start() {
socket_->async_read_some(boost::asio::buffer(&raw_buf_[0], raw_buf_.size()),
std::bind(&Connection::readHandler, shared_from_this(),
- std::placeholders::_1, // error
- std::placeholders::_2)); // bytes_transferred
+ ph::_1, // error
+ ph::_2)); // bytes_transferred
}
/// @brief Closes the socket.
TestServerUnixSocket::accept() {
server_acceptor_.async_accept(*(connection_pool_->getSocket()),
std::bind(&TestServerUnixSocket::acceptHandler, this,
- std::placeholders::_1)); // error
+ ph::_1)); // error
}
void
UDPEndpointPtr data_source(new asiolink::UDPEndpoint());
recv_callback_.reset(new UDPCallback(buffer, RECV_BUF_MAX, data_source,
std::bind(&NameChangeUDPListener::receiveCompletionHandler,
- this, ph::_1, ph::_2)));
+ this, ph::_1, ph::_2)));
}
NameChangeUDPListener::~NameChangeUDPListener() {
bool depend_on_known = false;
if (test_cfg) {
ExpressionParser parser;
- using std::placeholders::_1;
auto check_defined =
[&class_dictionary, &depend_on_known]
(const ClientClass& cclass) {
#include <cctype>
#include <cerrno>
-using namespace std;
using namespace isc::dns::rdata;
+using namespace std;
+namespace ph = std::placeholders;
+
namespace isc {
namespace dns {
namespace {
loadHelper(InputType input, const Name& origin,
const RRClass& zone_class, MasterLoadCallback callback)
{
- RRCollator rr_collator(std::bind(callbackWrapper, std::placeholders::_1,
- callback, &origin));
+ RRCollator rr_collator(std::bind(callbackWrapper, ph::_1, callback,
+ &origin));
MasterLoader loader(input, origin, zone_class,
MasterLoaderCallbacks::getNullCallbacks(),
rr_collator.getCallback());
#include <algorithm>
#include <functional>
+using namespace isc::dns::rdata;
+namespace ph = std::placeholders;
+
namespace isc {
namespace dns {
-using namespace rdata;
class RRCollator::Impl {
public:
AddRRCallback
RRCollator::getCallback() {
- namespace ph = std::placeholders;
return (std::bind(&RRCollator::Impl::addRR, this->impl_,
ph::_1, ph::_2, ph::_3, ph::_4, ph::_5));
}
using boost::lexical_cast;
using std::string;
+namespace ph = std::placeholders;
namespace isc {
namespace dns {
const ZoneCheckerCallbacks& callbacks) {
bool had_error = false;
ZoneCheckerCallbacks my_callbacks(
- std::bind(errorWrapper, std::placeholders::_1, &callbacks, &had_error),
- std::bind(&ZoneCheckerCallbacks::warn, &callbacks, std::placeholders::_1));
+ std::bind(errorWrapper, ph::_1, &callbacks, &had_error),
+ std::bind(&ZoneCheckerCallbacks::warn, &callbacks, ph::_1));
checkSOA(zone_name, zone_class, zone_rrsets, my_callbacks);
checkNS(zone_name, zone_class, zone_rrsets, my_callbacks);
using namespace isc::asiolink;
using namespace isc::http;
using namespace isc::util;
+namespace ph = std::placeholders;
namespace {
static_cast<unsigned short>(url_.getPort()));
SocketCallback socket_cb(std::bind(&Connection::connectCallback, shared_from_this(),
connect_callback, current_transid_,
- std::placeholders::_1));
+ ph::_1));
// Establish new connection or use existing connection.
socket_.open(&endpoint, socket_cb);
SocketCallback socket_cb(std::bind(&Connection::sendCallback,
shared_from_this(),
transid,
- std::placeholders::_1,
- std::placeholders::_2));
+ ph::_1,
+ ph::_2));
try {
socket_.asyncSend(&buf_[0], buf_.size(), socket_cb);
SocketCallback socket_cb(std::bind(&Connection::receiveCallback,
shared_from_this(),
transid,
- std::placeholders::_1,
- std::placeholders::_2));
+ ph::_1,
+ ph::_2));
try {
socket_.asyncReceive(static_cast<void*>(input_buf_.data()), input_buf_.size(), 0,
#include <functional>
using namespace isc::asiolink;
+namespace ph = std::placeholders;
namespace {
// as needed.
HttpAcceptorCallback cb = std::bind(&HttpConnection::acceptorCallback,
shared_from_this(),
- std::placeholders::_1); // error
+ ph::_1); // error
try {
acceptor_.asyncAccept(socket_, cb);
SocketCallback cb(std::bind(&HttpConnection::socketReadCallback,
shared_from_this(),
transaction,
- std::placeholders::_1, // error
- std::placeholders::_2)); //bytes_transferred
+ ph::_1, // error
+ ph::_2)); //bytes_transferred
socket_.asyncReceive(static_cast<void*>(transaction->getInputBufData()),
transaction->getInputBufSize(),
0, &endpoint, cb);
SocketCallback cb(std::bind(&HttpConnection::socketWriteCallback,
shared_from_this(),
transaction,
- std::placeholders::_1, // error
- std::placeholders::_2)); // bytes_transferred
+ ph::_1, // error
+ ph::_2)); // bytes_transferred
socket_.asyncSend(transaction->getOutputBufData(),
transaction->getOutputBufSize(),
cb);
#include <http/listener_impl.h>
using namespace isc::asiolink;
+namespace ph = std::placeholders;
namespace isc {
namespace http {
// depends on the use case.
HttpResponseCreatorPtr response_creator = creator_factory_->create();
HttpAcceptorCallback acceptor_callback =
- std::bind(&HttpListenerImpl::acceptHandler, this,
- std::placeholders::_1);
+ std::bind(&HttpListenerImpl::acceptHandler, this, ph::_1);
HttpConnectionPtr conn = createConnection(response_creator,
acceptor_callback);
// Add this new connection to the pool.
using namespace isc::data;
using namespace isc::config;
+namespace ph = std::placeholders;
namespace isc {
namespace process {
io_signal_set_.reset(new IOSignalSet(io_service_,
std::bind(&DControllerBase::
processSignal,
- this,
- std::placeholders::_1)));
+ this, ph::_1)));
// Register for the signals we wish to handle.
io_signal_set_->add(SIGHUP);
io_signal_set_->add(SIGINT);
#include <errno.h>
using namespace isc::data;
+namespace ph = std::placeholders;
/// @brief provides default implementation for basic daemon operations
///
void Daemon::handleSignal() {
if (signal_set_ && signal_handler_) {
- signal_set_->handleNext(std::bind(signal_handler_, std::placeholders::_1));
+ signal_set_->handleNext(std::bind(signal_handler_, ph::_1));
}
}
#include <functional>
using namespace isc::asiolink;
+namespace ph = std::placeholders;
namespace isc {
namespace process {
void
IOSignalSetImpl::install() {
signal_set_.async_wait(std::bind(&IOSignalSetImpl::callback,
- shared_from_this(),
- std::placeholders::_1,
- std::placeholders::_2));
+ shared_from_this(), ph::_1, ph::_2));
}
void
#include <functional>
#include <queue>
+namespace ph = std::placeholders;
+
namespace isc {
namespace process {
io_signal_set_.reset(new IOSignalSet(
io_service_,
std::bind(&IOSignalTest::processSignal,
- this, std::placeholders::_1)));
+ this, ph::_1)));
}
/// @brief Destructor.
#include <unistd.h>
#include <sys/wait.h>
+namespace ph = std::placeholders;
+
namespace isc {
namespace util {
// Set the handler which is invoked immediately when the signal
// is received.
signals_->setOnReceiptHandler(std::bind(&ProcessSpawnImpl::waitForProcess,
- this, std::placeholders::_1));
+ this, ph::_1));
// Conversion of the arguments to the C-style array we start by setting
// all pointers within an array to NULL to indicate that they haven't
// been allocated yet.