aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-07-10 00:58:57 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-07-10 00:58:57 +0000
commiteeb5737b9fb8b6589d95f3f36b2609f439d82f1a (patch)
tree715188ecc7d9eb2c4a41f069e3587d6bcdada0fa
parent33015df117c4eae6afac1bfda0dca56d8ca96c08 (diff)
downloadpaludis-eeb5737b9fb8b6589d95f3f36b2609f439d82f1a.tar.gz
paludis-eeb5737b9fb8b6589d95f3f36b2609f439d82f1a.tar.xz
More code and doxygen cleanups. Remove DepAtomDumper class.
-rw-r--r--doc/doc_main.doxygen5
-rw-r--r--paludis/config_file.hh174
-rw-r--r--paludis/contents.hh49
-rw-r--r--paludis/default_config.hh102
-rw-r--r--paludis/dep_atom.hh134
-rw-r--r--paludis/dep_atom_dumper.cc86
-rw-r--r--paludis/dep_atom_dumper.hh69
-rw-r--r--paludis/dep_atom_dumper_TEST.cc65
-rw-r--r--paludis/files.m43
-rw-r--r--paludis/paludis.cc21
-rw-r--r--paludis/portage_dep_parser_TEST.cc83
11 files changed, 309 insertions, 482 deletions
diff --git a/doc/doc_main.doxygen b/doc/doc_main.doxygen
index a10bfcc..d165bc5 100644
--- a/doc/doc_main.doxygen
+++ b/doc/doc_main.doxygen
@@ -85,6 +85,11 @@
* \ingroup grpconfigfile
*/
+/** \defgroup grpnewsconfigfile News file
+ *
+ * \ingroup grpconfigfile
+ */
+
// ----- grpenvironment Subgroups -----
/** \defgroup grpdefaultenvironment Default environment
diff --git a/paludis/config_file.hh b/paludis/config_file.hh
index d34ff22..d7e1b49 100644
--- a/paludis/config_file.hh
+++ b/paludis/config_file.hh
@@ -48,10 +48,12 @@ namespace paludis
class ConfigFileError : public ConfigurationError
{
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
ConfigFileError(const std::string & message) throw ();
+
+ ///\}
};
/**
@@ -100,6 +102,9 @@ namespace paludis
*/
void need_lines() const;
+ ///\name Basic operations
+ ///\{
+
/**
* Constructor.
*/
@@ -115,6 +120,8 @@ namespace paludis
*/
ConfigFile(const FSEntry & filename);
+ ///\}
+
/**
* Our filename, or blank if unknown.
*/
@@ -124,10 +131,12 @@ namespace paludis
}
public:
- /**
- * Destructor.
- */
+ ///\name Basic operations
+ ///\{
+
virtual ~ConfigFile();
+
+ ///\}
};
/**
@@ -145,6 +154,9 @@ namespace paludis
void accept_line(const std::string &) const;
public:
+ ///\name Basic operations
+ ///\{
+
/**
* Constructor, from a stream.
*/
@@ -160,26 +172,24 @@ namespace paludis
*/
LineConfigFile(const FSEntry & filename);
- /**
- * Iterator over our lines.
- */
+ ///\}
+
+ ///\name Iterate over our lines
+ ///\{
+
typedef std::list<std::string>::const_iterator Iterator;
- /**
- * Iterator to the start of our lines.
- */
Iterator begin() const
{
return _lines.begin();
}
- /**
- * Iterator to past the end of our lines.
- */
Iterator end() const
{
return _lines.end();
}
+
+ ///\}
};
/**
@@ -192,11 +202,13 @@ namespace paludis
class KeyValueConfigFileError : public ConfigurationError
{
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
KeyValueConfigFileError(const std::string & message,
const std::string & filename = "") throw ();
+
+ ///\}
};
/**
@@ -224,6 +236,9 @@ namespace paludis
std::string strip_quotes(const std::string &) const;
public:
+ ///\name Basic operations
+ ///\{
+
/**
* Constructor, from a stream.
*/
@@ -257,32 +272,27 @@ namespace paludis
KeyValueConfigFile(const FSEntry & filename,
const std::map<std::string, std::string> &);
- /**
- * Destructor.
- */
~KeyValueConfigFile();
- /**
- * Iterator over our key/values.
- */
+ ///\}
+
+ ///\name Iterate over our key/values
+ ///\{
+
typedef std::map<std::string, std::string>::const_iterator Iterator;
- /**
- * Start of our key/values.
- */
Iterator begin() const
{
return _entries.begin();
}
- /**
- * Past the end of our key/values.
- */
Iterator end() const
{
return _entries.end();
}
+ ///\}
+
/**
* Fetch the specified key, or a blank string.
*/
@@ -299,11 +309,13 @@ namespace paludis
class AdvisoryFileError : public ConfigurationError
{
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
AdvisoryFileError(const std::string & message,
const std::string & filename = "") throw ();
+
+ ///\}
};
/**
@@ -329,12 +341,16 @@ namespace paludis
protected:
void accept_line(const std::string &) const;
+
/**
* Ensure that the AdvisoryFile contains all mandatory items.
*/
void sanitise();
public:
+ ///\name Basic operations
+ ///\{
+
/**
* Constructor, from a stream.
*/
@@ -368,69 +384,54 @@ namespace paludis
AdvisoryFile(const FSEntry & filename,
const std::map<std::string, std::string> &);
- /**
- * Destructor.
- */
~AdvisoryFile();
- /**
- * Iterator over our entries.
- */
- typedef std::map<std::string, std::string>::const_iterator EntriesIterator;
+ ///\}
- /**
- * Iterator over our lines.
- */
- typedef std::list<std::string>::const_iterator LineIterator;
+ ///\name Iterate over our entries
+ ///\{
+
+ typedef std::map<std::string, std::string>::const_iterator EntriesIterator;
- /**
- * Iterator to the start of our lines.
- */
EntriesIterator begin() const
{
return _entries.begin();
}
- /**
- * Iterator to past the end of our lines.
- */
EntriesIterator end() const
{
return _entries.end();
}
- /**
- * Iterator to the start of our Affected: lines.
- */
+ ///\}
+
+ ///\name Iterate over our Affected: and Unaffected: lines.
+ ///\{
+
+ typedef std::list<std::string>::const_iterator LineIterator;
+
LineIterator begin_affected() const
{
return _affected.begin();
}
- /**
- * Iterator to past the end of our Affected: lines.
- */
LineIterator end_affected() const
{
return _affected.end();
}
- /**
- * Iterator to the start of our Unaffected: lines.
- */
LineIterator begin_unaffected() const
{
return _unaffected.begin();
}
- /**
- * Iterator to past the end of our Unaffected: lines.
- */
LineIterator end_unaffected() const
{
return _unaffected.end();
}
+ ///\}
+
/**
* Fetch the specified key, or a blank string.
*/
@@ -444,7 +445,7 @@ namespace paludis
/**
* A NewsFile represents a GLEP 42 news file.
*
- * \ingroup grpconfigfile
+ * \ingroup grpnewconfigfile
*/
class NewsFile :
protected ConfigFile
@@ -459,73 +460,66 @@ namespace paludis
void accept_line(const std::string &) const;
public:
+ ///\name Basic operations
+ ///\{
+
/**
* Constructor, from a filename.
*/
NewsFile(const FSEntry & filename);
- /**
- * Iterator over display-if-installed headers.
- */
+ ///\}
+
+ ///\name Iterate over our Display-If-Installed headers
+ ///\{
+
typedef std::list<std::string>::const_iterator DisplayIfInstalledIterator;
- /**
- * Start of our display-if-installed headers.
- */
DisplayIfInstalledIterator begin_display_if_installed() const
{
return _display_if_installed.begin();
}
- /**
- * End of our display-if-installed headers.
- */
DisplayIfInstalledIterator end_display_if_installed() const
{
return _display_if_installed.end();
}
- /**
- * Iterator over display-if-keyword headers.
- */
+ ///\}
+
+ ///\name Iterate over our Display-If-Keyword headers
+ ///\{
+
typedef std::list<std::string>::const_iterator DisplayIfKeywordIterator;
- /**
- * Start of our display-if-keyword headers.
- */
DisplayIfKeywordIterator begin_display_if_keyword() const
{
return _display_if_keyword.begin();
}
- /**
- * End of our display-if-keyword headers.
- */
DisplayIfKeywordIterator end_display_if_keyword() const
{
return _display_if_keyword.end();
}
- /**
- * Iterator over display-if-profile headers.
- */
+ ///\}
+
+ ///\name Iterate over our Display-If-Profile headers
+ ///\{
+
typedef std::list<std::string>::const_iterator DisplayIfProfileIterator;
- /**
- * Start of our display-if-profile headers.
- */
DisplayIfProfileIterator begin_display_if_profile() const
{
return _display_if_profile.begin();
}
- /**
- * End of our display-if-profile headers.
- */
DisplayIfProfileIterator end_display_if_profile() const
{
return _display_if_profile.end();
}
+
+ ///\}
};
}
diff --git a/paludis/contents.hh b/paludis/contents.hh
index bfdb9e0..8674c9a 100644
--- a/paludis/contents.hh
+++ b/paludis/contents.hh
@@ -62,16 +62,24 @@ namespace paludis
std::string _name;
protected:
- /// Constructor.
+ ///\name Basic operations
+ ///\{
+
ContentsEntry(const std::string & name) :
_name(name)
{
}
+ ///\}
+
public:
- /// Destructor.
+ ///\name Basic operations
+ ///\{
+
virtual ~ContentsEntry();
+ ///\}
+
/// Our name.
std::string name() const
{
@@ -89,8 +97,12 @@ namespace paludis
public Visitable<ContentsFileEntry, ContentsVisitorTypes>
{
public:
- /// Constructor.
+ ///\name Basic operations
+ ///\{
+
ContentsFileEntry(const std::string & name);
+
+ ///\}
};
/**
@@ -103,8 +115,12 @@ namespace paludis
public Visitable<ContentsDirEntry, ContentsVisitorTypes>
{
public:
- /// Constructor.
+ ///\name Basic operations
+ ///\{
+
ContentsDirEntry(const std::string & name);
+
+ ///\}
};
/**
@@ -117,8 +133,12 @@ namespace paludis
public Visitable<ContentsMiscEntry, ContentsVisitorTypes>
{
public:
- /// Constructor.
+ ///\name Basic operations
+ ///\{
+
ContentsMiscEntry(const std::string & name);
+
+ ///\}
};
/**
@@ -134,9 +154,13 @@ namespace paludis
std::string _target;
public:
- /// Constructor.
+ ///\name Basic operations
+ ///\{
+
ContentsSymEntry(const std::string & name, const std::string & target);
+ ///\}
+
/// Our target (as per readlink).
std::string target() const
{
@@ -157,28 +181,35 @@ namespace paludis
std::list<ContentsEntry::ConstPointer> _c;
public:
+ ///\name Basic operations
+ ///\{
+
Contents();
+ ///\}
+
/// Add a new entry.
void add(ContentsEntry::ConstPointer c)
{
_c.push_back(c);
}
- /// Iterator over our entries.
+ ///\name Iterate over our entries
+ ///\{
+
typedef std::list<ContentsEntry::ConstPointer>::const_iterator Iterator;
- /// Start of our entries.
Iterator begin() const
{
return _c.begin();
}
- /// End of our entries.
Iterator end() const
{
return _c.end();
}
+
+ ///\}
};
}
diff --git a/paludis/default_config.hh b/paludis/default_config.hh
index ed89891..ebe7400 100644
--- a/paludis/default_config.hh
+++ b/paludis/default_config.hh
@@ -159,172 +159,85 @@ namespace paludis
*/
static std::string config_suffix();
- ///\name Repositories
+ ///\name Iterate over our repositories
///{
- /**
- * An iterator for our repositories.
- */
typedef std::list<RepositoryConfigEntry>::const_iterator RepositoryIterator;
- /**
- * Iterator to the start of our repositories.
- */
RepositoryIterator begin_repositories() const;
- /**
- * Iterator to past the end of our repositories.
- */
RepositoryIterator end_repositories() const;
///}
- ///\name Keywords
+ ///\name Iterate over our default and per-package keywords
///{
- /**
- * Iterate over our package.keywords entries.
- */
typedef std::vector<std::pair<PackageDepAtom::ConstPointer, KeywordName> >::const_iterator
PackageKeywordsIterator;
- /**
- * Iterator to the start of the package.keywords entries for a
- * particular package.
- */
PackageKeywordsIterator begin_package_keywords(const QualifiedPackageName & d) const;
- /**
- * Iterator to past the end of the package.keywords entries for a
- * particular file.
- */
PackageKeywordsIterator end_package_keywords(const QualifiedPackageName & d) const;
- /**
- * Iterator over the default keywords entries.
- */
typedef std::vector<KeywordName>::const_iterator DefaultKeywordsIterator;
- /**
- * Iterator to the start of our default keywords entries.
- */
DefaultKeywordsIterator begin_default_keywords() const;
- /**
- * Iterator to past the end of our default keywords entries.
- */
DefaultKeywordsIterator end_default_keywords() const;
///}
- ///\name Licenses
+ ///\name Iterate over our default and per-package licenses
///{
- /**
- * Iterate over our licenses entries.
- */
typedef std::vector<std::pair<PackageDepAtom::ConstPointer, std::string> >::const_iterator
PackageLicensesIterator;
- /**
- * Iterator to the start of the licenses entries for a
- * particular package.
- */
PackageLicensesIterator begin_package_licenses(const QualifiedPackageName & d) const;
- /**
- * Iterator to past the end of the licenses entries for a
- * particular file.
- */
PackageLicensesIterator end_package_licenses(const QualifiedPackageName & d) const;
- /**
- * Iterator over the default licenses entries.
- */
typedef std::vector<std::string>::const_iterator DefaultLicensesIterator;
- /**
- * Iterator to the start of our default license entries.
- */
DefaultLicensesIterator begin_default_licenses() const;
- /**
- * Iterator to past the end of our default license entries.
- */
DefaultLicensesIterator end_default_licenses() const;
///}
- ///\name Masks
+ ///\name Iterate over our masks and unmasks
///{
- /**
- * Iterator over user package masks.
- */
typedef IndirectIterator<std::vector<PackageDepAtom::ConstPointer>::const_iterator,
const PackageDepAtom> UserMasksIterator;
- /**
- * Iterator to the start of the user package masks.
- */
UserMasksIterator begin_user_masks(const QualifiedPackageName & d) const;
- /**
- * Iterator to past the end of the user package masks.
- */
UserMasksIterator end_user_masks(const QualifiedPackageName & d) const;
- /**
- * Iterator over the user package unmasks.
- */
typedef IndirectIterator<std::vector<PackageDepAtom::ConstPointer>::const_iterator,
const PackageDepAtom> UserUnmasksIterator;
- /**
- * Iterator to the start of the user package unmasks.
- */
UserUnmasksIterator begin_user_unmasks(const QualifiedPackageName & d) const;
- /**
- * Iterator to past the end of the user package unmasks.
- */
UserUnmasksIterator end_user_unmasks(const QualifiedPackageName & d) const;
///}
- ///\name Use
+ ///\name Iterate over our default and per-package use flags
///{
- /**
- * Iterator to the start of the use configuration.
- */
typedef std::vector<UseConfigEntry>::const_iterator UseConfigIterator;
- /**
- * Iterator to the start of the use configuration for a particular
- * package.
- */
UseConfigIterator begin_use_config(const QualifiedPackageName & q) const;
- /**
- * Iterator to past the end of the use configuration for a
- * particular package.
- */
UseConfigIterator end_use_config(const QualifiedPackageName & q) const;
- /**
- * Iterator over the default use settings.
- */
typedef std::vector<std::pair<UseFlagName, UseFlagState> >::const_iterator DefaultUseIterator;
- /**
- * Iterator to the start of the default use settings.
- */
DefaultUseIterator begin_default_use() const;
- /**
- * Iterator to past the end of the default use settings.
- */
DefaultUseIterator end_default_use() const;
///}
@@ -354,11 +267,16 @@ namespace paludis
*/
std::string config_dir() const;
+ ///\name Iterate over our mirrors
+ ///\{
+
typedef std::multimap<std::string, std::string>::const_iterator MirrorIterator;
MirrorIterator begin_mirrors(const std::string & m) const;
MirrorIterator end_mirrors(const std::string & m) const;
+
+ ///\}
};
}
diff --git a/paludis/dep_atom.hh b/paludis/dep_atom.hh
index 09ca9fc..9f44f46 100644
--- a/paludis/dep_atom.hh
+++ b/paludis/dep_atom.hh
@@ -70,16 +70,23 @@ namespace paludis
DepAtom();
public:
- /**
- * Destructor.
- */
+ ///\name Basic operations
+ ///\{
+
virtual ~DepAtom();
+ ///\}
+
+ ///\name Upcasts
+ ///\{
+
/**
* Return us as a UseDepAtom, or 0 if we are not a
* UseDepAtom.
*/
virtual const UseDepAtom * as_use_dep_atom() const;
+
+ ///\}
};
/**
@@ -95,47 +102,45 @@ namespace paludis
std::list<DepAtom::ConstPointer> _children;
protected:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
CompositeDepAtom();
+ ///\}
+
public:
+ ///\name Modify our children
+ ///\{
+
/**
* Append a child to our collection.
*/
virtual void add_child(DepAtom::ConstPointer);
- /**
- * Iterator for iterating over our children.
- */
+ ///\}
+
+ ///\name Iterate over our children
+ ///\{
+
typedef std::list<DepAtom::ConstPointer>::const_iterator Iterator;
- /**
- * Iterator to the start of our children.
- */
Iterator begin() const
{
return _children.begin();
}
- /**
- * Iterator to past the end of our children.
- */
Iterator end() const
{
return _children.end();
}
- /**
- * A non-constant smart pointer to ourself.
- */
+ ///\name Pointer types
+ ///\{
typedef CountedPtr<CompositeDepAtom, count_policy::InternalCountTag> Pointer;
- /**
- * A constant smart pointer to ourself.
- */
typedef CountedPtr<const CompositeDepAtom, count_policy::InternalCountTag> ConstPointer;
+ ///\}
};
/**
@@ -148,10 +153,12 @@ namespace paludis
public Visitable<AnyDepAtom, DepAtomVisitorTypes>
{
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
AnyDepAtom();
+
+ ///\}
};
/**
@@ -165,10 +172,12 @@ namespace paludis
public Visitable<AllDepAtom, DepAtomVisitorTypes>
{
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
AllDepAtom();
+
+ ///\}
};
/**
@@ -185,11 +194,13 @@ namespace paludis
const bool _inverse;
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
UseDepAtom(const UseFlagName &, bool);
+ ///\}
+
/**
* Fetch our use flag name.
*/
@@ -222,16 +233,15 @@ namespace paludis
const std::string _str;
protected:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
StringDepAtom(const std::string &);
- /**
- * Destructor.
- */
~StringDepAtom();
+ ///\}
+
public:
/**
* Fetch our text.
@@ -254,21 +264,23 @@ namespace paludis
std::map<UseFlagName, UseFlagState> _reqs;
public:
- /// Iterator over our USE requirements.
+ ///\name Iterate over our USE requirements
+ ///\{
+
typedef std::map<UseFlagName, UseFlagState>::const_iterator Iterator;
- /// Start of our USE requirements.
Iterator begin() const
{
return _reqs.begin();
}
- /// End of our USE requirements.
Iterator end() const
{
return _reqs.end();
}
+ ///\}
+
/// Find the requirement for a particular USE flag.
Iterator find(const UseFlagName & u) const
{
@@ -306,6 +318,9 @@ namespace paludis
DepTag::ConstPointer _tag;
public:
+ ///\name Basic operations
+ ///\{
+
/**
* Constructor, no version or SLOT restrictions.
*/
@@ -316,11 +331,10 @@ namespace paludis
*/
PackageDepAtom(const std::string &);
- /**
- * Destructor.
- */
~PackageDepAtom();
+ ///\}
+
/**
* Fetch the package name.
*/
@@ -369,6 +383,9 @@ namespace paludis
return _use_requirements;
}
+ ///\name Pointer types
+ ///\{
+
/**
* A non-constant smart pointer to ourself.
*/
@@ -379,6 +396,8 @@ namespace paludis
*/
typedef CountedPtr<const PackageDepAtom, count_policy::InternalCountTag> ConstPointer;
+ ///\}
+
/**
* Fetch our tag.
*/
@@ -412,11 +431,16 @@ namespace paludis
public Visitable<PlainTextDepAtom, DepAtomVisitorTypes>
{
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
PlainTextDepAtom(const std::string &);
+ ///\}
+
+ ///\name Pointer types
+ ///\{
+
/**
* A non-constant smart pointer to ourself.
*/
@@ -426,6 +450,8 @@ namespace paludis
* A constant smart pointer to ourself.
*/
typedef CountedPtr<const PlainTextDepAtom, count_policy::InternalCountTag> ConstPointer;
+
+ ///\}
};
/**
@@ -438,10 +464,12 @@ namespace paludis
public Exception
{
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
PackageDepAtomError(const std::string & msg) throw ();
+
+ ///\}
};
/**
@@ -466,11 +494,16 @@ namespace paludis
PackageDepAtom::ConstPointer _atom;
public:
+ ///\name Basic operations
+ ///\{
+
/**
* Constructor, with blocking atom.
*/
BlockDepAtom(PackageDepAtom::ConstPointer atom);
+ ///\}
+
/**
* Fetch the atom we're blocking.
*/
@@ -479,6 +512,9 @@ namespace paludis
return _atom;
}
+ ///\name Pointer operations
+ ///\{
+
/**
* A non-constant smart pointer to ourself.
*/
@@ -488,6 +524,8 @@ namespace paludis
* A constant smart pointer to ourself.
*/
typedef CountedPtr<const BlockDepAtom, count_policy::InternalCountTag> ConstPointer;
+
+ ///\}
};
}
diff --git a/paludis/dep_atom_dumper.cc b/paludis/dep_atom_dumper.cc
deleted file mode 100644
index ce845d9..0000000
--- a/paludis/dep_atom_dumper.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2005, 2006 Ciaran McCreesh <ciaran.mccreesh@blueyonder.co.uk>
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <algorithm>
-#include <paludis/dep_atom.hh>
-#include <paludis/dep_atom_dumper.hh>
-
-/** \file
- * Implementation for dep_atom_dumper.hh.
- *
- * \ingroup grpdepatomdumper
- */
-
-using namespace paludis;
-
-DepAtomDumper::DepAtomDumper(std::ostream * const o) :
- _o(o)
-{
-}
-
-void
-DepAtomDumper::visit(const AllDepAtom * const a)
-{
- *_o << "<all>";
- std::for_each(a->begin(), a->end(), accept_visitor(this));
- *_o << "</all>";
-}
-
-void
-DepAtomDumper::visit(const AnyDepAtom * const a)
-{
- *_o << "<any>";
- std::for_each(a->begin(), a->end(), accept_visitor(this));
- *_o << "</any>";
-}
-
-void
-DepAtomDumper::visit(const UseDepAtom * const a)
-{
- *_o << "<use flag=\"" << a->flag() << "\" inverse=\""
- << (a->inverse() ? "true" : "false") << "\">";
- std::for_each(a->begin(), a->end(), accept_visitor(this));
- *_o << "</use>";
-}
-
-void
-DepAtomDumper::visit(const PackageDepAtom * const p)
-{
- *_o << "<package";
- if (p->slot_ptr())
- *_o << " slot=\"" << *p->slot_ptr() << "\"";
- if (p->version_spec_ptr())
- *_o << " version=\"" << p->version_operator() << *p->version_spec_ptr() << "\"";
- *_o << ">" << p->package() << "</package>";
-}
-
-void
-DepAtomDumper::visit(const PlainTextDepAtom * const t)
-{
- *_o << "<text>" << t->text() << "</text>";
-}
-
-void
-DepAtomDumper::visit(const BlockDepAtom * const b)
-{
- *_o << "<block>";
- b->blocked_atom()->accept(this);
- *_o << "</block>";
-}
-
diff --git a/paludis/dep_atom_dumper.hh b/paludis/dep_atom_dumper.hh
deleted file mode 100644
index 44f39f0..0000000
--- a/paludis/dep_atom_dumper.hh
+++ /dev/null
@@ -1,69 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2005, 2006 Ciaran McCreesh <ciaran.mccreesh@blueyonder.co.uk>
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef PALUDIS_GUARD_PALUDIS_DEP_ATOM_DUMPER_HH
-#define PALUDIS_GUARD_PALUDIS_DEP_ATOM_DUMPER_HH 1
-
-#include <ostream>
-#include <paludis/util/instantiation_policy.hh>
-
-/** \file
- * Declarations for the DepAtomDumper class.
- *
- * \ingroup grpdepatomdumper
- */
-
-namespace paludis
-{
- /**
- * Dump dependency atoms to a stream in pseudo-XML form, for testing.
- *
- * \ingroup grpdepatomdumper
- */
- class DepAtomDumper :
- public DepAtomVisitorTypes::ConstVisitor,
- private InstantiationPolicy<DepAtomDumper, instantiation_method::NonCopyableTag>
- {
- private:
- std::ostream * const _o;
-
- public:
- /**
- * Constructor.
- */
- DepAtomDumper(std::ostream * const o);
-
- /// \name Visit functions
- ///{
- void visit(const AllDepAtom * const);
-
- void visit(const AnyDepAtom * const);
-
- void visit(const UseDepAtom * const);
-
- void visit(const PackageDepAtom * const);
-
- void visit(const PlainTextDepAtom * const);
-
- void visit(const BlockDepAtom * const);
- ///}
- };
-}
-
-#endif
diff --git a/paludis/dep_atom_dumper_TEST.cc b/paludis/dep_atom_dumper_TEST.cc
deleted file mode 100644
index c6bbc1c..0000000
--- a/paludis/dep_atom_dumper_TEST.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2005, 2006 Ciaran McCreesh <ciaran.mccreesh@blueyonder.co.uk>
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <paludis/dep_atom.hh>
-#include <paludis/dep_atom_dumper.hh>
-#include <sstream>
-#include <test/test_framework.hh>
-#include <test/test_runner.hh>
-
-using namespace test;
-using namespace paludis;
-
-/** \file
- * Test cases for DepAtomDumper.
- *
- * \ingroup grptestcases
- */
-
-namespace test_cases
-{
- /**
- * \test Test DepAtomDumper.
- *
- * \ingroup grptestcases
- */
- struct DepAtomDumperTest : TestCase
- {
- DepAtomDumperTest() : TestCase("dump") { }
-
- void run()
- {
- std::stringstream s;
- DepAtomDumper d(&s);
- AllDepAtom::Pointer all(new AllDepAtom);
- PackageDepAtom::Pointer p1(new PackageDepAtom("one/one"));
- AnyDepAtom::Pointer any(new AnyDepAtom);
- PackageDepAtom::Pointer p2(new PackageDepAtom("two/two"));
- PackageDepAtom::Pointer p3(new PackageDepAtom("three/three"));
- all->add_child(p1);
- all->add_child(any);
- any->add_child(p2);
- any->add_child(p3);
- all->accept(&d);
- TEST_CHECK_EQUAL(s.str(), "<all><package>one/one</package>"
- "<any><package>two/two</package><package>three/three</package></any></all>");
- }
- } test_dep_atom_dumper;
-}
-
diff --git a/paludis/files.m4 b/paludis/files.m4
index 539aafa..a048e81 100644
--- a/paludis/files.m4
+++ b/paludis/files.m4
@@ -14,7 +14,6 @@ add(`contents', `hh', `cc')
add(`default_config', `hh', `cc')
add(`default_environment', `hh', `cc')
add(`dep_atom', `hh', `cc', `test')
-add(`dep_atom_dumper', `hh', `cc', `test')
add(`dep_atom_flattener', `hh', `cc')
add(`dep_atom_pretty_printer', `hh', `cc')
add(`dep_list', `hh', `cc', `test')
@@ -29,7 +28,7 @@ add(`name', `hh', `cc', `test')
add(`nothing_repository', `hh', `cc')
add(`package_database', `hh', `cc', `test')
add(`package_database_entry', `hh')
-add(`paludis', `hh', `cc')
+add(`paludis', `hh')
add(`portage_repository', `hh', `cc', `test', `testscript')
add(`portage_dep_lexer', `hh', `cc', `test')
add(`portage_dep_parser', `hh', `cc', `test')
diff --git a/paludis/paludis.cc b/paludis/paludis.cc
deleted file mode 100644
index 05135ac..0000000
--- a/paludis/paludis.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2005, 2006 Ciaran McCreesh <ciaran.mccreesh@blueyonder.co.uk>
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <paludis/paludis.hh>
-
diff --git a/paludis/portage_dep_parser_TEST.cc b/paludis/portage_dep_parser_TEST.cc
index 0047aca..47f2f73 100644
--- a/paludis/portage_dep_parser_TEST.cc
+++ b/paludis/portage_dep_parser_TEST.cc
@@ -31,6 +31,89 @@ using namespace paludis;
* \ingroup grptestcases
*/
+#ifndef DOXYGEN
+namespace
+{
+ class DepAtomDumper :
+ public DepAtomVisitorTypes::ConstVisitor,
+ private InstantiationPolicy<DepAtomDumper, instantiation_method::NonCopyableTag>
+ {
+ private:
+ std::ostream * const _o;
+
+ public:
+ DepAtomDumper(std::ostream * const o);
+
+ void visit(const AllDepAtom * const);
+
+ void visit(const AnyDepAtom * const);
+
+ void visit(const UseDepAtom * const);
+
+ void visit(const PackageDepAtom * const);
+
+ void visit(const PlainTextDepAtom * const);
+
+ void visit(const BlockDepAtom * const);
+ };
+
+ DepAtomDumper::DepAtomDumper(std::ostream * const o) :
+ _o(o)
+ {
+ }
+
+ void
+ DepAtomDumper::visit(const AllDepAtom * const a)
+ {
+ *_o << "<all>";
+ std::for_each(a->begin(), a->end(), accept_visitor(this));
+ *_o << "</all>";
+ }
+
+ void
+ DepAtomDumper::visit(const AnyDepAtom * const a)
+ {
+ *_o << "<any>";
+ std::for_each(a->begin(), a->end(), accept_visitor(this));
+ *_o << "</any>";
+ }
+
+ void
+ DepAtomDumper::visit(const UseDepAtom * const a)
+ {
+ *_o << "<use flag=\"" << a->flag() << "\" inverse=\""
+ << (a->inverse() ? "true" : "false") << "\">";
+ std::for_each(a->begin(), a->end(), accept_visitor(this));
+ *_o << "</use>";
+ }
+
+ void
+ DepAtomDumper::visit(const PackageDepAtom * const p)
+ {
+ *_o << "<package";
+ if (p->slot_ptr())
+ *_o << " slot=\"" << *p->slot_ptr() << "\"";
+ if (p->version_spec_ptr())
+ *_o << " version=\"" << p->version_operator() << *p->version_spec_ptr() << "\"";
+ *_o << ">" << p->package() << "</package>";
+ }
+
+ void
+ DepAtomDumper::visit(const PlainTextDepAtom * const t)
+ {
+ *_o << "<text>" << t->text() << "</text>";
+ }
+
+ void
+ DepAtomDumper::visit(const BlockDepAtom * const b)
+ {
+ *_o << "<block>";
+ b->blocked_atom()->accept(this);
+ *_o << "</block>";
+ }
+}
+#endif
+
namespace test_cases
{
/**