aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-27 17:35:20 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-27 17:35:20 +0100
commit5c74698d6925da426632d0497a5751b9003d8ba0 (patch)
tree871a08f82c9f56b4ffa7be890056a02864ffd069
parent4e7b468c3d77b7292bef087ada60b68293dd5c57 (diff)
downloadpaludis-5c74698d6925da426632d0497a5751b9003d8ba0.tar.gz
paludis-5c74698d6925da426632d0497a5751b9003d8ba0.tar.xz
Rename MaskFile to TraditionalMaskFile
-rw-r--r--paludis/repositories/e/Makefile.am4
-rw-r--r--paludis/repositories/e/profile_file.cc12
-rw-r--r--paludis/repositories/e/traditional_mask_file.cc (renamed from paludis/repositories/e/e_repository_mask_file.cc)22
-rw-r--r--paludis/repositories/e/traditional_mask_file.hh (renamed from paludis/repositories/e/e_repository_mask_file.hh)33
-rw-r--r--paludis/repositories/e/traditional_mask_store.cc8
-rw-r--r--paludis/repositories/e/traditional_profile.cc6
6 files changed, 36 insertions, 49 deletions
diff --git a/paludis/repositories/e/Makefile.am b/paludis/repositories/e/Makefile.am
index a5a8a71..5b1f056 100644
--- a/paludis/repositories/e/Makefile.am
+++ b/paludis/repositories/e/Makefile.am
@@ -43,7 +43,6 @@ noinst_HEADERS = \
e_repository.hh \
e_repository_exceptions.hh \
e_repository_id.hh \
- e_repository_mask_file.hh \
e_repository_news.hh \
e_repository_params-se.hh \
e_repository_params.hh \
@@ -92,6 +91,7 @@ noinst_HEADERS = \
source_uri_finder.hh \
spec_tree_pretty_printer.hh \
traditional_layout.hh \
+ traditional_mask_file.hh \
traditional_mask_store.hh \
traditional_profile.hh \
use_desc.hh \
@@ -124,7 +124,6 @@ libpaludiserepository_la_SOURCES = \
e_repository.cc \
e_repository_exceptions.cc \
e_repository_id.cc \
- e_repository_mask_file.cc \
e_repository_news.cc \
e_repository_params.cc \
e_repository_sets.cc \
@@ -171,6 +170,7 @@ libpaludiserepository_la_SOURCES = \
source_uri_finder.cc \
spec_tree_pretty_printer.cc \
traditional_layout.cc \
+ traditional_mask_file.cc \
traditional_mask_store.cc \
traditional_profile.cc \
use_desc.cc \
diff --git a/paludis/repositories/e/profile_file.cc b/paludis/repositories/e/profile_file.cc
index d4a2fad..e276458 100644
--- a/paludis/repositories/e/profile_file.cc
+++ b/paludis/repositories/e/profile_file.cc
@@ -18,10 +18,10 @@
*/
#include <paludis/repositories/e/profile_file.hh>
-#include <paludis/repositories/e/e_repository_mask_file.hh>
#include <paludis/repositories/e/e_repository_exceptions.hh>
#include <paludis/repositories/e/eapi.hh>
#include <paludis/repositories/e/e_repository.hh>
+#include <paludis/repositories/e/traditional_mask_file.hh>
#include <paludis/util/log.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/config_file.hh>
@@ -106,10 +106,10 @@ namespace paludis
};
template <>
- struct WrappedForwardIteratorTraits<ProfileFile<MaskFile>::ConstIteratorTag>
+ struct WrappedForwardIteratorTraits<ProfileFile<TraditionalMaskFile>::ConstIteratorTag>
{
typedef std::list<std::pair<std::shared_ptr<const EAPI>,
- const std::remove_reference<MaskFile::ConstIterator::value_type>::type> >::const_iterator UnderlyingIterator;
+ const std::remove_reference<TraditionalMaskFile::ConstIterator::value_type>::type> >::const_iterator UnderlyingIterator;
};
template <typename T_>
@@ -210,8 +210,8 @@ template class WrappedForwardIterator<ProfileFile<LineConfigFile>::ConstIterator
std::shared_ptr<const EAPI>,
const std::remove_reference<LineConfigFile::ConstIterator::value_type>::type> >;
-template class ProfileFile<MaskFile>;
-template class WrappedForwardIterator<ProfileFile<MaskFile>::ConstIteratorTag, const std::pair<
+template class ProfileFile<TraditionalMaskFile>;
+template class WrappedForwardIterator<ProfileFile<TraditionalMaskFile>::ConstIteratorTag, const std::pair<
std::shared_ptr<const EAPI>,
- const std::remove_reference<MaskFile::ConstIterator::value_type>::type> >;
+ const std::remove_reference<TraditionalMaskFile::ConstIterator::value_type>::type> >;
diff --git a/paludis/repositories/e/e_repository_mask_file.cc b/paludis/repositories/e/traditional_mask_file.cc
index 0da55ab..9161c53 100644
--- a/paludis/repositories/e/e_repository_mask_file.cc
+++ b/paludis/repositories/e/traditional_mask_file.cc
@@ -17,8 +17,9 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <paludis/repositories/e/e_repository_mask_file.hh>
+#include <paludis/repositories/e/traditional_mask_file.hh>
#include <paludis/repositories/e/eapi.hh>
+
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/options.hh>
#include <paludis/util/sequence.hh>
@@ -31,6 +32,7 @@
#include <paludis/util/tokeniser.hh>
#include <paludis/util/log.hh>
#include <paludis/util/join.hh>
+
#include <paludis/mask.hh>
#include <vector>
@@ -44,19 +46,19 @@ typedef std::list<std::pair<const std::string, std::shared_ptr<const erepository
namespace paludis
{
template <>
- struct Imp<MaskFile>
+ struct Imp<TraditionalMaskFile>
{
MaskFileLines lines;
};
template <>
- struct WrappedForwardIteratorTraits<MaskFile::ConstIteratorTag>
+ struct WrappedForwardIteratorTraits<TraditionalMaskFile::ConstIteratorTag>
{
typedef MaskFileLines::const_iterator UnderlyingIterator;
};
}
-MaskFile::MaskFile(const FSPath & f, const LineConfigFileOptions & opts, const EAPI & eapi) :
+TraditionalMaskFile::TraditionalMaskFile(const FSPath & f, const LineConfigFileOptions & opts, const EAPI & eapi) :
_imp()
{
LineConfigFileOptions myopts(opts);
@@ -119,22 +121,22 @@ MaskFile::MaskFile(const FSPath & f, const LineConfigFileOptions & opts, const E
}
}
-MaskFile::ConstIterator
-MaskFile::begin() const
+TraditionalMaskFile::ConstIterator
+TraditionalMaskFile::begin() const
{
return ConstIterator(_imp->lines.begin());
}
-MaskFile::ConstIterator
-MaskFile::end() const
+TraditionalMaskFile::ConstIterator
+TraditionalMaskFile::end() const
{
return ConstIterator(_imp->lines.end());
}
-MaskFile::~MaskFile()
+TraditionalMaskFile::~TraditionalMaskFile()
{
}
-template class WrappedForwardIterator<MaskFile::ConstIteratorTag,
+template class WrappedForwardIterator<TraditionalMaskFile::ConstIteratorTag,
const std::pair<const std::string, std::shared_ptr<const MaskInfo> > >;
diff --git a/paludis/repositories/e/e_repository_mask_file.hh b/paludis/repositories/e/traditional_mask_file.hh
index ce64a22..17fa522 100644
--- a/paludis/repositories/e/e_repository_mask_file.hh
+++ b/paludis/repositories/e/traditional_mask_file.hh
@@ -17,14 +17,16 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_E_REPOSITORY_MASK_FILE_HH
-#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_E_REPOSITORY_MASK_FILE_HH 1
+#ifndef PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_TRADITIONAL_MASK_FILE_HH
+#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_TRADITIONAL_MASK_FILE_HH 1
#include <paludis/util/pimp.hh>
#include <paludis/util/attributes.hh>
#include <paludis/util/config_file.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
+
#include <paludis/mask-fwd.hh>
+
#include <paludis/repositories/e/mask_info.hh>
namespace paludis
@@ -33,41 +35,24 @@ namespace paludis
{
class EAPI;
- /**
- * A file listing masks in an ERepository.
- *
- * Handles parsing mask reasons from the comments.
- *
- * \ingroup grperepository
- */
- class PALUDIS_VISIBLE MaskFile
+ class PALUDIS_VISIBLE TraditionalMaskFile
{
private:
- Pimp<MaskFile> _imp;
+ Pimp<TraditionalMaskFile> _imp;
public:
- ///\name Basic operations
- ///\{
-
- MaskFile(const FSPath &, const LineConfigFileOptions &, const EAPI &);
- ~MaskFile();
-
- ///\}
-
- ///\name Iterate over our mask lines.
- ///\{
+ TraditionalMaskFile(const FSPath &, const LineConfigFileOptions &, const EAPI &);
+ ~TraditionalMaskFile();
struct ConstIteratorTag;
typedef WrappedForwardIterator<ConstIteratorTag,
const std::pair<const std::string, std::shared_ptr<const MaskInfo> > > ConstIterator;
ConstIterator begin() const;
ConstIterator end() const;
-
- ///\}
};
}
- extern template class WrappedForwardIterator<erepository::MaskFile::ConstIteratorTag,
+ extern template class WrappedForwardIterator<erepository::TraditionalMaskFile::ConstIteratorTag,
const std::pair<const std::string, std::shared_ptr<const erepository::MaskInfo> > >;
}
diff --git a/paludis/repositories/e/traditional_mask_store.cc b/paludis/repositories/e/traditional_mask_store.cc
index 801891c..002acf5 100644
--- a/paludis/repositories/e/traditional_mask_store.cc
+++ b/paludis/repositories/e/traditional_mask_store.cc
@@ -19,7 +19,7 @@
#include <paludis/repositories/e/traditional_mask_store.hh>
#include <paludis/repositories/e/profile_file.hh>
-#include <paludis/repositories/e/e_repository_mask_file.hh>
+#include <paludis/repositories/e/traditional_mask_file.hh>
#include <paludis/repositories/e/eapi.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/exception.hh>
@@ -85,11 +85,11 @@ TraditionalMaskStore::_populate()
using namespace std::placeholders;
- ProfileFile<MaskFile> repository_mask_file(_imp->eapi_for_file);
+ ProfileFile<TraditionalMaskFile> repository_mask_file(_imp->eapi_for_file);
std::for_each(_imp->files->begin(), _imp->files->end(),
- std::bind(&ProfileFile<MaskFile>::add_file, std::ref(repository_mask_file), _1));
+ std::bind(&ProfileFile<TraditionalMaskFile>::add_file, std::ref(repository_mask_file), _1));
- for (ProfileFile<MaskFile>::ConstIterator
+ for (ProfileFile<TraditionalMaskFile>::ConstIterator
line(repository_mask_file.begin()), line_end(repository_mask_file.end()) ;
line != line_end ; ++line)
{
diff --git a/paludis/repositories/e/traditional_profile.cc b/paludis/repositories/e/traditional_profile.cc
index 63ede75..27e3c00 100644
--- a/paludis/repositories/e/traditional_profile.cc
+++ b/paludis/repositories/e/traditional_profile.cc
@@ -19,7 +19,7 @@
#include <paludis/repositories/e/traditional_profile.hh>
#include <paludis/repositories/e/profile_file.hh>
-#include <paludis/repositories/e/e_repository_mask_file.hh>
+#include <paludis/repositories/e/traditional_mask_file.hh>
#include <paludis/repositories/e/e_repository_exceptions.hh>
#include <paludis/repositories/e/e_repository.hh>
#include <paludis/repositories/e/eapi.hh>
@@ -108,7 +108,7 @@ namespace paludis
ProfileFile<LineConfigFile> packages_file;
ProfileFile<LineConfigFile> virtuals_file;
- ProfileFile<MaskFile> package_mask_file;
+ ProfileFile<TraditionalMaskFile> package_mask_file;
std::shared_ptr<FSPathSequence> profiles_with_parents;
@@ -347,7 +347,7 @@ namespace
<< "Loading virtuals failed due to exception: " << e.message() << " (" << e.what() << ")";
}
- for (ProfileFile<MaskFile>::ConstIterator line(_imp->package_mask_file.begin()), line_end(_imp->package_mask_file.end()) ;
+ for (ProfileFile<TraditionalMaskFile>::ConstIterator line(_imp->package_mask_file.begin()), line_end(_imp->package_mask_file.end()) ;
line != line_end ; ++line)
{
if (line->second.first.empty())