1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
#include"Node.h"
#include<Memory>
template<class data_type, typename key_type, size_t cost_type>
template<class data_type, typename key_type, size_t cost_type>
class Node<data_type,key_type,cost_type>::NodePimp
{
public:
NodePimp(const data_type & value, const key_type & key,
const cost_type & cost);
~NodePimp();
//other methods
private:
std::unique_ptr<data_type> value_;
std::unique_ptr<key_type > key_ ;
std::unique_ptr<cost_type> cost_ ;
};
template<class data_type, typename key_type, size_t cost_type>
template<class data_type, typename key_type, size_t cost_type>
Node<data_type, key_type, size_t>::NodePimp<data_type, key_type, cost_type>::
NodePimp(const data_type & value, const key_type & key,const cost_type & cost) :
value_(new data_type(value)), key_(new key_type(key)),
cost_(new cost_type(cost))
{
};
//.....
|