[AC_MSG_RESULT([no])
continue])
+ AC_MSG_CHECKING(override method support)
+ feature="override method"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [class Foo {
+ public:
+ virtual ~Foo() {};
+ virtual void foobar();
+ };
+ class Bar : public Foo {
+ public:
+ virtual ~Bar() {};
+ virtual void foobar() override;
+ };],[])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ continue])
+
AC_MSG_CHECKING(aggregate initialization support)
feature="aggregate initialization"
AC_COMPILE_IFELSE(
[AC_MSG_RESULT([no])
continue])
+ AC_MSG_CHECKING(constexpr support)
+ feature="constexpr"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <string>
+ typedef char const* const Tag;
+ constexpr Tag FOOBAR = "FOOBAR";],
+ [const std::string foobar(FOOBAR);
+ return static_cast<int>(foobar.length());])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ continue])
+
AC_MSG_CHECKING(lambda support)
feature="lambda"
AC_COMPILE_IFELSE(
AM_CPPFLAGS += $(PGSQL_CPPFLAGS)
endif
if HAVE_CQL
-AM_CPPFLAGS += $(CQL_CPPFLAGS)
+AM_CPPFLAGS += $(CQL_CPPFLAGS) $(CRYPTO_INCLUDES)
endif
AM_CXXFLAGS = $(KEA_CXXFLAGS)
-// Copyright (C) 2016-2017 Deutsche Telekom AG.
+// Copyright (C) 2016-2018 Deutsche Telekom AG.
//
// Author: Andrei Pavel <andrei.pavel@qualitance.com>
//
/// @brief Constructor
///
/// Specifies table columns.
- /// @param connection specifies the connection to conduct this exchange on
- CqlHostExchange(CqlConnection& connection);
+ CqlHostExchange();
/// @brief Virtual destructor.
virtual ~CqlHostExchange();
/// Pointer to Host object holding information being inserted into database.
HostPtr host_;
- /// @brief Connection to the Cassandra database
- CqlConnection& connection_;
-
/// @brief Primary key. Aggregates: host_identifier, host_identifier_type,
/// reserved_ipv6_prefix_address, reserved_ipv6_prefix_length, option_code,
/// option_space.
};
-CqlHostExchange::CqlHostExchange(CqlConnection& connection)
- : host_(NULL), connection_(connection), id_(0), host_identifier_type_(0),
- host_ipv4_subnet_id_(0), host_ipv6_subnet_id_(0), host_ipv4_address_(0),
+CqlHostExchange::CqlHostExchange()
+ : host_(NULL), id_(0), host_identifier_type_(0), host_ipv4_subnet_id_(0),
+ host_ipv6_subnet_id_(0), host_ipv4_address_(0),
reserved_ipv6_prefix_length_(NULL_RESERVED_IPV6_PREFIX_LENGTH),
reserved_ipv6_prefix_address_type_(NULL_RESERVED_IPV6_PREFIX_ADDRESS_TYPE),
iaid_(NULL_IAID), option_universe_(NULL_OPTION_UNIVERSE),
AnyArray& where_values) const {
// Run statement.
- std::unique_ptr<CqlHostExchange> host_exchange(new CqlHostExchange(dbconn_));
+ std::unique_ptr<CqlHostExchange> host_exchange(new CqlHostExchange());
AnyArray collection = host_exchange->executeSelect(dbconn_, where_values,
statement_tag, false);
const OptionDescriptor& option_descriptor) {
AnyArray assigned_values;
- std::unique_ptr<CqlHostExchange> host_exchange(new CqlHostExchange(dbconn_));
+ std::unique_ptr<CqlHostExchange> host_exchange(new CqlHostExchange());
try {
host_exchange->createBindForMutation(
-// Copyright (C) 2016-2017 Deutsche Telekom AG.
+// Copyright (C) 2016-2018 Deutsche Telekom AG.
//
// Author: Andrei Pavel <andrei.pavel@qualitance.com>
//
/// there.
/// @throw various exceptions in case of errors
virtual bool del(const SubnetID& subnet_id,
- const asiolink::IOAddress& addr);
+ const asiolink::IOAddress& addr) override;
/// @brief Attempts to delete a host by (subnet-id4, identifier-type,
/// identifier).
virtual bool del4(const SubnetID& subnet_id,
const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
- const size_t identifier_len);
+ const size_t identifier_len) override;
/// @brief Attempts to delete a host by (subnet-id6, identifier-type,
/// identifier).
virtual bool del6(const SubnetID& subnet_id,
const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
- const size_t identifier_len);
+ const size_t identifier_len) override;
/// @brief Returns textual description of the backend.
///
public:
/// @brief Constructor
///
- /// @param conn A open connection to the database housing the lease data
+ /// @param conn An open connection to the database housing the lease data
/// @param statement The lease data SQL prepared statement tag to execute
/// @param fetch_type Indicates whether or not lease_type should be
/// fetched from the result set (should be true for v6)
/// @param subnet_id subnet identifier.
///
/// @return Lease collection (may be empty if no IPv4 lease found).
- virtual Lease4Collection getLeases4(SubnetID subnet_id) const;
+ virtual Lease4Collection getLeases4(SubnetID subnet_id) const override;
/// @brief Returns all IPv4 leases.
///
/// @return Lease collection (may be empty if no IPv4 lease found).
- virtual Lease4Collection getLeases4() const;
+ virtual Lease4Collection getLeases4() const override;
/// @brief Returns existing IPv6 lease for a given IPv6 address.
///
///
/// @throw isc::dhcp::DbOperationError An operation on the open database has
/// failed.
- virtual bool deleteLease(const isc::asiolink::IOAddress& addr);
+ virtual bool deleteLease(const isc::asiolink::IOAddress& addr) override;
/// @brief Deletes all expired and reclaimed DHCPv4 leases.
///
/// The query object is then returned.
///
/// @return The populated query as a pointer to an LeaseStatsQuery
- virtual LeaseStatsQueryPtr startLeaseStatsQuery4();
+ virtual LeaseStatsQueryPtr startLeaseStatsQuery4() override;
/// @brief Creates and runs the IPv6 lease stats query
///
/// The query object is then returned.
///
/// @return The populated query as a pointer to an LeaseStatsQuery
- virtual LeaseStatsQueryPtr startLeaseStatsQuery6();
+ virtual LeaseStatsQueryPtr startLeaseStatsQuery6() override;
/// @brief Removes specified IPv4 leases.
///
///
/// @param subnet_id identifier of the subnet
/// @return number of leases removed.
- virtual size_t wipeLeases4(const SubnetID& subnet_id);
+ virtual size_t wipeLeases4(const SubnetID& subnet_id) override;
/// @brief Removed specified IPv6 leases.
///
///
/// @param subnet_id identifier of the subnet
/// @return number of leases removed.
- virtual size_t wipeLeases6(const SubnetID& subnet_id);
+ virtual size_t wipeLeases6(const SubnetID& subnet_id) override;
/// @brief Return backend type
///
/// @brief Base class for fulfilling a statistical lease data query
///
/// LeaseMgr derivations implement this class such that it provides
-/// upto date statistical lease data organized as rows of LeaseStatsRow
+/// up to date statistical lease data organized as rows of LeaseStatsRow
/// instances. The rows must be accessible in ascending order by subnet id.
class LeaseStatsQuery {
public:
///
/// LeaseMgr derivations implement this method such that it creates and
/// returns an instance of an LeaseStatsQuery whose result set has been
- /// populated with upto date IPv4 lease statistical data. Each row of the
+ /// populated with up to date IPv4 lease statistical data. Each row of the
/// result set is an LeaseStatRow which ordered ascending by subnet ID.
///
/// @return A populated LeaseStatsQuery
///
/// LeaseMgr derivations implement this method such that it creates and
/// returns an instance of an LeaseStatsQuery whose result set has been
- /// populated with upto date IPv6 lease statistical data. Each row of the
+ /// populated with up to date IPv6 lease statistical data. Each row of the
/// result set is an LeaseStatRow which ordered ascending by subnet ID.
///
/// @return A populated LeaseStatsQuery