: finished_(false),
io_service_(new IOService()),
thread_(),
- agent_(new NakedNetconfAgent) {
+ agent_(new NakedNetconfAgent()) {
}
/// @brief Destructor.
/// @param expected_response expected text response.
void testSynchronizeHandler(const std::string& ha_sync_command,
const std::string& expected_response) {
- io_service_.reset(new IOService);
+ io_service_.reset(new IOService());
ha_impl_.reset(new HAImpl());
ASSERT_NO_THROW(ha_impl_->configure(createValidJsonConfiguration()));
TEST(TCPSocket, processReceivedData) {
const uint16_t PACKET_SIZE = 16382; // Amount of "real" data in the buffer
- IOServicePtr service(new IOService); // Used to instantiate socket
+ IOServicePtr service(new IOService()); // Used to instantiate socket
TCPSocket<TCPCallback> test(service); // Socket under test
uint8_t inbuff[PACKET_SIZE + 2]; // Buffer to check
OutputBufferPtr outbuff(new OutputBuffer(16));
}
return;
}
- element = ElementPtr(new NullElement);
+ element = ElementPtr(new NullElement());
}
void
LibDHCP::initOptionDefs() {
for (uint32_t i = 0; OPTION_DEF_PARAMS[i].optionDefParams; ++i) {
string space = OPTION_DEF_PARAMS[i].space;
- option_defs_[space] = OptionDefContainerPtr(new OptionDefContainer);
+ option_defs_[space] = OptionDefContainerPtr(new OptionDefContainer());
initOptionSpace(option_defs_[space],
OPTION_DEF_PARAMS[i].optionDefParams,
OPTION_DEF_PARAMS[i].size);
NameChangeSender::NameChangeSender(RequestSendHandler& send_handler,
size_t send_queue_max)
: sending_(false), send_handler_(send_handler),
- send_queue_max_(send_queue_max), mutex_(new mutex) {
+ send_queue_max_(send_queue_max), mutex_(new mutex()) {
// Queue size must be big enough to hold at least 1 entry.
setQueueMaxSize(send_queue_max);
config_ctl_info->addConfigDatabase(access);
CfgMgr::instance().getCurrentCfg()->setConfigControlInfo(config_ctl_info);
- std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry);
+ std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry());
// Connect to the CB backend.
ASSERT_THROW(addBackend(access), DbOpenErrorWithRetry);
config_ctl_info->addConfigDatabase(access);
CfgMgr::instance().getCurrentCfg()->setConfigControlInfo(config_ctl_info);
- std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry);
+ std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry());
// Connect to the CB backend.
ASSERT_THROW(addBackend(access), DbOpenErrorWithRetry);
config_ctl_info->addConfigDatabase(access);
CfgMgr::instance().getCurrentCfg()->setConfigControlInfo(config_ctl_info);
- std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry);
+ std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry());
// Connect to the CB backend.
ASSERT_THROW(addBackend(access), DbOpenErrorWithRetry);
config_ctl_info->addConfigDatabase(access);
CfgMgr::instance().getCurrentCfg()->setConfigControlInfo(config_ctl_info);
- std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry);
+ std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry());
// Connect to the CB backend.
ASSERT_THROW(addBackend(access), DbOpenErrorWithRetry);
access += " retry-on-startup=true";
CfgMgr::instance().getCurrentCfg()->getCfgDbAccess()->setHostDbAccessString(access);
- std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry);
+ std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry());
// Create the HostMgr.
HostMgr::create();
access += " retry-on-startup=true";
CfgMgr::instance().getCurrentCfg()->getCfgDbAccess()->setHostDbAccessString(access);
- std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry);
+ std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry());
// Create the HostMgr.
HostMgr::create();
access += extra;
CfgMgr::instance().getCurrentCfg()->getCfgDbAccess()->setHostDbAccessString(access);
- std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry);
+ std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry());
// Create the HostMgr.
HostMgr::create();
access += extra;
CfgMgr::instance().getCurrentCfg()->getCfgDbAccess()->setHostDbAccessString(access);
- std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry);
+ std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry());
// Create the HostMgr.
HostMgr::create();
access += " retry-on-startup=true";
CfgMgr::instance().getCurrentCfg()->getCfgDbAccess()->setLeaseDbAccessString(access);
- std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry);
+ std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry());
// Connect to the lease backend.
ASSERT_THROW(LeaseMgrFactory::create(access), DbOpenErrorWithRetry);
access += " retry-on-startup=true";
CfgMgr::instance().getCurrentCfg()->getCfgDbAccess()->setLeaseDbAccessString(access);
- std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry);
+ std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry());
// Connect to the lease backend.
ASSERT_THROW(LeaseMgrFactory::create(access), DbOpenErrorWithRetry);
access += extra;
CfgMgr::instance().getCurrentCfg()->getCfgDbAccess()->setLeaseDbAccessString(access);
- std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry);
+ std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry());
// Connect to the lease backend.
ASSERT_THROW(LeaseMgrFactory::create(access), DbOpenErrorWithRetry);
access += extra;
CfgMgr::instance().getCurrentCfg()->getCfgDbAccess()->setLeaseDbAccessString(access);
- std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry);
+ std::shared_ptr<DbConnectionInitWithRetry> dbr(new DbConnectionInitWithRetry());
// Connect to the lease backend.
ASSERT_THROW(LeaseMgrFactory::create(access), DbOpenErrorWithRetry);
bool previous_was_eol_;
};
-MasterLexer::MasterLexer() : impl_(new MasterLexerImpl) {
+MasterLexer::MasterLexer() : impl_(new MasterLexerImpl()) {
}
MasterLexer::~MasterLexer() {
MessageRenderer::MessageRenderer() :
AbstractMessageRenderer(),
- impl_(new MessageRendererImpl)
-{}
+ impl_(new MessageRendererImpl()) {
+}
MessageRenderer::~MessageRenderer() {
delete impl_;
/// \brief Default constructor.
OPT::OPT() :
- impl_(new OPTImpl)
+ impl_(new OPTImpl())
{
}
OPT::OPT(InputBuffer& buffer, size_t rdata_len) :
impl_(NULL)
{
- std::unique_ptr<OPTImpl> impl_ptr(new OPTImpl);
+ std::unique_ptr<OPTImpl> impl_ptr(new OPTImpl());
while (true) {
if (rdata_len == 0) {
/// \brief Default constructor.
OPT::OPT() :
- impl_(new OPTImpl)
+ impl_(new OPTImpl())
{
}
OPT::OPT(InputBuffer& buffer, size_t rdata_len) :
impl_(NULL)
{
- std::unique_ptr<OPTImpl> impl_ptr(new OPTImpl);
+ std::unique_ptr<OPTImpl> impl_ptr(new OPTImpl());
while (true) {
if (rdata_len == 0) {
// Add factories so that we can treat this pair just like in::A.
RRParamRegistry::getRegistry().add(test_type_str, test_type_code,
test_class_str, test_class_code,
- RdataFactoryPtr(new TestRdataFactory));
+ RdataFactoryPtr(new TestRdataFactory()));
// Now it should be accepted, and should be identical to the same data of
// in::A.
EXPECT_EQ(0, in::A("192.0.2.1").compare(
InvalidRdataText);
// Add the factories also as a class independent RRtype
RRParamRegistry::getRegistry().add(test_type_str, test_type_code,
- RdataFactoryPtr(new TestRdataFactory));
+ RdataFactoryPtr(new TestRdataFactory()));
// Now it should be okay for other classes than the test class.
EXPECT_EQ(0, in::A("192.0.2.1").compare(
*createRdata(RRType(test_type_code), RRClass("IN"),
RdataPtr
createRdataHelper(const std::string& str) {
- boost::scoped_ptr<AbstractRdataFactory> rdf(new TestRdataFactory);
+ boost::scoped_ptr<AbstractRdataFactory> rdf(new TestRdataFactory());
std::stringstream ss(str);
MasterLexer lexer;
TSIGKeyMap keys;
};
-TSIGKeyRing::TSIGKeyRing() : impl_(new TSIGKeyRingImpl) {
+TSIGKeyRing::TSIGKeyRing() : impl_(new TSIGKeyRingImpl()) {
}
TSIGKeyRing::~TSIGKeyRing() {
public:
/// @brief Constructor
- DStubCfgMgrTest():cfg_mgr_(new DStubCfgMgr) {
+ DStubCfgMgrTest():cfg_mgr_(new DStubCfgMgr()) {
}
/// @brief Destructor
// Verifies that Daemon destruction deletes the PID file
TEST_F(DaemonTest, PIDFileCleanup) {
boost::shared_ptr<DaemonImpl> instance;
- instance.reset(new DaemonImpl);
+ instance.reset(new DaemonImpl());
instance->setConfigFile("test.conf");
instance->setProcName("daemon_test");
}
StatsMgr::StatsMgr() :
- global_(boost::make_shared<StatContext>()), mutex_(new mutex) {
+ global_(boost::make_shared<StatContext>()), mutex_(new mutex()) {
}
void