summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEnrico Zini <enrico@enricozini.org>2010-05-10 12:10:33 +0100
committerEnrico Zini <enrico@enricozini.org>2010-05-10 12:10:33 +0100
commitfa398dec0d73728828b658ed92c79711044f7f6c (patch)
tree8c3216cc3ab8411aaf6e36905aaa2979b6876c1e /tools
parent32d70553051ec0720b9c02619e1efc2eff781f36 (diff)
downloadlibept-fa398dec0d73728828b658ed92c79711044f7f6c.tar.gz
Promote vocabulary to a standalone data provider, as it should be
Diffstat (limited to 'tools')
-rw-r--r--tools/Environment.cc2
-rw-r--r--tools/Environment.h10
-rw-r--r--tools/ept-cache.cc1
-rw-r--r--tools/info.cc1
4 files changed, 12 insertions, 2 deletions
diff --git a/tools/Environment.cc b/tools/Environment.cc
index 442f2f5..a293ab7 100644
--- a/tools/Environment.cc
+++ b/tools/Environment.cc
@@ -22,6 +22,7 @@
#include <ept/apt/apt.h>
#include <ept/debtags/debtags.h>
+#include <ept/debtags/vocabulary.h>
#include <ept/popcon/popcon.h>
#include <ept/popcon/local.h>
#include <ept/textsearch/textsearch.h>
@@ -50,6 +51,7 @@ void Environment::init(bool editable)
{
m_apt = new ept::apt::Apt;
m_debtags = new ept::debtags::Debtags(editable);
+ m_vocabulary = new ept::debtags::Vocabulary;
m_popcon = new ept::popcon::Popcon;
m_popconlocal = new ept::popcon::Local;
m_textsearch = new ept::textsearch::TextSearch;
diff --git a/tools/Environment.h b/tools/Environment.h
index d161f3d..4df4fc4 100644
--- a/tools/Environment.h
+++ b/tools/Environment.h
@@ -21,13 +21,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <ept/debtags/debtags.h>
#include <string>
namespace ept {
namespace apt {
class Apt;
}
+namespace debtags {
+class Debtags;
+class Vocabulary;
+}
namespace popcon {
class Popcon;
class Local;
@@ -46,6 +49,9 @@ protected:
/// Debtags data provider
ept::debtags::Debtags* m_debtags;
+ /// Debtags vocabulary data provider
+ ept::debtags::Vocabulary* m_vocabulary;
+
/// Popcon data provider
ept::popcon::Popcon* m_popcon;
@@ -80,7 +86,7 @@ public:
ept::debtags::Debtags& debtags() { return *m_debtags; }
/// Access the tag vocabulary
- ept::debtags::Vocabulary& voc() { return m_debtags->vocabulary(); }
+ ept::debtags::Vocabulary& voc() { return *m_vocabulary; }
/// Access the popcon data
ept::popcon::Popcon& popcon() { return *m_popcon; }
diff --git a/tools/ept-cache.cc b/tools/ept-cache.cc
index 6ee3205..483edb4 100644
--- a/tools/ept-cache.cc
+++ b/tools/ept-cache.cc
@@ -26,6 +26,7 @@
#include <ept/apt/apt.h>
#include <ept/apt/packagerecord.h>
+#include <ept/debtags/debtags.h>
#include <ept/popcon/popcon.h>
#include <ept/popcon/local.h>
#include <tagcoll/expression.h>
diff --git a/tools/info.cc b/tools/info.cc
index 64aff2e..2f7ba3e 100644
--- a/tools/info.cc
+++ b/tools/info.cc
@@ -24,6 +24,7 @@
#include <ept/apt/apt.h>
#include <ept/apt/packagerecord.h>
+#include <ept/debtags/debtags.h>
#include <ept/popcon/popcon.h>
#include <ept/popcon/local.h>