-/* $Id: filter_backend_test.cpp,v 1.5 2005-10-26 18:53:49 adam Exp $
+/* $Id: filter_backend_test.cpp,v 1.6 2005-10-29 15:54:29 adam Exp $
Copyright (c) 2005, Index Data.
%LICENSE%
}
}
-yf::Backend_test::Backend_test() {
- m_p = new Backend_test::Rep;
+yf::Backend_test::Backend_test() : m_p(new Backend_test::Rep) {
m_p->m_support_named_result_sets = false;
}
yf::Backend_test::~Backend_test() {
- delete m_p;
}
void yf::Backend_test::process(Package &package) const
-/* $Id: filter_backend_test.hpp,v 1.1 2005-10-25 11:48:30 adam Exp $
+/* $Id: filter_backend_test.hpp,v 1.2 2005-10-29 15:54:29 adam Exp $
Copyright (c) 2005, Index Data.
%LICENSE%
#include <stdexcept>
#include <list>
+#include <boost/scoped_ptr.hpp>
#include "filter.hpp"
Backend_test();
void process(yp2::Package & package) const;
private:
- Rep *m_p;
+ boost::scoped_ptr<Rep> m_p;
};
}
}
-/* $Id: filter_virt_db.cpp,v 1.9 2005-10-26 18:53:49 adam Exp $
+/* $Id: filter_virt_db.cpp,v 1.10 2005-10-29 15:54:29 adam Exp $
Copyright (c) 2005, Index Data.
%LICENSE%
}
-yf::Virt_db::Virt_db() {
- m_p = new Virt_db::Rep;
+yf::Virt_db::Virt_db() : m_p(new Virt_db::Rep)
+{
}
yf::Virt_db::~Virt_db() {
- delete m_p;
}
void yf::Virt_db::Rep::release_session(Package &package)
-/* $Id: filter_virt_db.hpp,v 1.1 2005-10-24 14:33:30 adam Exp $
+/* $Id: filter_virt_db.hpp,v 1.2 2005-10-29 15:54:29 adam Exp $
Copyright (c) 2005, Index Data.
%LICENSE%
#include <stdexcept>
#include <list>
+#include <boost/scoped_ptr.hpp>
#include "filter.hpp"
void process(yp2::Package & package) const;
void add_map_db2vhost(std::string db, std::string vhost);
private:
- Rep *m_p;
+ boost::scoped_ptr<Rep> m_p;
};
}
}
-/* $Id: filter_z3950_client.cpp,v 1.5 2005-10-25 21:32:01 adam Exp $
+/* $Id: filter_z3950_client.cpp,v 1.6 2005-10-29 15:54:29 adam Exp $
Copyright (c) 2005, Index Data.
%LICENSE%
namespace yp2 {
namespace filter {
class Z3950Client::Assoc : public yazpp_1::Z_Assoc{
- friend class Pimpl;
+ friend class Rep;
public:
Assoc(yazpp_1::SocketManager *socket_manager,
yazpp_1::IPDU_Observable *PDU_Observable,
std::string m_host;
};
- class Z3950Client::Pimpl {
+ class Z3950Client::Rep {
public:
boost::mutex m_mutex;
std::map<yp2::Session,Z3950Client::Assoc *> m_clients;
}
-yf::Z3950Client::Z3950Client() {
- m_p = new yf::Z3950Client::Pimpl;
+yf::Z3950Client::Z3950Client() : m_p(new yf::Z3950Client::Rep)
+{
}
yf::Z3950Client::~Z3950Client() {
- delete m_p;
}
-yf::Z3950Client::Assoc *yf::Z3950Client::Pimpl::get_assoc(Package &package)
+yf::Z3950Client::Assoc *yf::Z3950Client::Rep::get_assoc(Package &package)
{
// only one thread messes with the clients list at a time
boost::mutex::scoped_lock lock(m_mutex);
return as;
}
-void yf::Z3950Client::Pimpl::send_and_receive(Package &package,
+void yf::Z3950Client::Rep::send_and_receive(Package &package,
yf::Z3950Client::Assoc *c)
{
Z_GDU *gdu = package.request().get();
;
}
-void yf::Z3950Client::Pimpl::release_assoc(Package &package,
+void yf::Z3950Client::Rep::release_assoc(Package &package,
yf::Z3950Client::Assoc *c)
{
if (package.session().is_closed())
-/* $Id: filter_z3950_client.hpp,v 1.1 2005-10-16 16:05:44 adam Exp $
+/* $Id: filter_z3950_client.hpp,v 1.2 2005-10-29 15:54:29 adam Exp $
Copyright (c) 2005, Index Data.
%LICENSE%
#include <stdexcept>
#include <list>
+#include <boost/scoped_ptr.hpp>
#include "filter.hpp"
namespace yp2 {
namespace filter {
class Z3950Client : public Base {
- class Pimpl;
+ class Rep;
class Assoc;
public:
~Z3950Client();
Z3950Client();
void process(yp2::Package & package) const;
private:
- Pimpl *m_p;
+ boost::scoped_ptr<Rep> m_p;
};
}
}