rib: Use only a forward declaration of RibManager in the header of Nrd class

Change-Id: I8a681dc9a75ac8cdabc289e685ec6a505cfb5aac
This commit is contained in:
Alexander Afanasyev
2015-02-12 20:14:16 -08:00
parent 2bda6f8d9c
commit c3ea5a7886
2 changed files with 14 additions and 1 deletions
+7
View File
@@ -52,6 +52,13 @@ Nrd::Nrd(const ConfigSection& config, ndn::KeyChain& keyChain)
{
}
Nrd::~Nrd()
{
// It is necessary to explicitly define the destructor, because some member variables
// (e.g., unique_ptr<RibManager>) are forward-declared, but implicitly declared destructor
// requires complete types for all members when instantiated.
}
void
Nrd::initialize()
{
+7 -1
View File
@@ -28,7 +28,6 @@
#include "common.hpp"
#include "core/config-file.hpp"
#include "rib-manager.hpp"
#include <ndn-cxx/face.hpp>
#include <ndn-cxx/security/key-chain.hpp>
@@ -37,6 +36,8 @@
namespace nfd {
namespace rib {
class RibManager;
/**
* \brief Class representing NRD (NFD RIB Manager) instance
* This class can be used to initialize all components of NRD
@@ -68,6 +69,11 @@ public:
*/
Nrd(const ConfigSection& config, ndn::KeyChain& keyChain);
/**
* \brief Destructor
*/
~Nrd();
/**
* \brief Perform initialization of NFD instance
* After initialization, NFD instance can be started by invoking run on globalIoService