aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-23 00:12:42 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-23 00:12:42 +0000
commit300b879d72761d0d22e718f13b0b01c118769ed8 (patch)
tree4a63a12fdaefb84832f742b64f54acb7cd94356c
parentc2f0f1e818ba3e810ea360aa6074b76061741d5e (diff)
downloadpaludis-300b879d72761d0d22e718f13b0b01c118769ed8.tar.gz
paludis-300b879d72761d0d22e718f13b0b01c118769ed8.tar.xz
More Doxygenation
-rw-r--r--paludis/attributes.hh2
-rw-r--r--paludis/counted_ptr.hh12
-rw-r--r--paludis/default_environment.hh10
-rw-r--r--paludis/exception.hh4
-rw-r--r--paludis/filter_insert_iterator.hh3
-rw-r--r--paludis/getenv.hh3
-rw-r--r--paludis/key_value_config_file.hh30
-rw-r--r--paludis/line_config_file.hh15
-rw-r--r--paludis/package_database.hh9
-rw-r--r--paludis/pstream.hh28
-rw-r--r--paludis/repository.hh18
-rw-r--r--paludis/tokeniser.hh18
-rw-r--r--paludis/transform_insert_iterator.hh1
-rw-r--r--paludis/version_metadata.hh3
-rw-r--r--paludis/visitor.hh9
15 files changed, 157 insertions, 8 deletions
diff --git a/paludis/attributes.hh b/paludis/attributes.hh
index c3b8178..9a65655 100644
--- a/paludis/attributes.hh
+++ b/paludis/attributes.hh
@@ -35,7 +35,7 @@
*/
#if (defined(__GNUC__) || defined(DOXYGEN))
-# if ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+# if ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || defined(DOXYGEN))
# define PALUDIS_ATTRIBUTE(x) __attribute__(x)
# define PALUDIS_CAN_USE_ATTRIBUTE 1
# else
diff --git a/paludis/counted_ptr.hh b/paludis/counted_ptr.hh
index 5b9dcaf..2f1c191 100644
--- a/paludis/counted_ptr.hh
+++ b/paludis/counted_ptr.hh
@@ -135,6 +135,9 @@ namespace paludis
*/
T_ * _ptr;
+ /**
+ * Constructor.
+ */
CountedPtrBase(T_ * ptr) :
ComparisonPolicy<CountedPtrBase<T_, dereference_policy::UncheckedDereferenceTag>,
comparison_mode::EqualityComparisonTag,
@@ -144,6 +147,9 @@ namespace paludis
{
}
+ /**
+ * Destructor.
+ */
~CountedPtrBase()
{
}
@@ -229,6 +235,9 @@ namespace paludis
*/
T_ * _ptr;
+ /**
+ * Constructor.
+ */
CountedPtrBase(T_ * ptr) :
ComparisonPolicy<CountedPtrBase<T_, dereference_policy::CheckedDereferenceTag>,
comparison_mode::EqualityComparisonTag,
@@ -238,6 +247,9 @@ namespace paludis
{
}
+ /**
+ * Destructor.
+ */
~CountedPtrBase()
{
}
diff --git a/paludis/default_environment.hh b/paludis/default_environment.hh
index cf87a26..a2ac4c9 100644
--- a/paludis/default_environment.hh
+++ b/paludis/default_environment.hh
@@ -48,14 +48,14 @@ namespace paludis
~DefaultEnvironment();
- protected:
- bool query_use(const UseFlagName &, const PackageDatabaseEntry &) const;
+ public:
+ virtual bool query_use(const UseFlagName &, const PackageDatabaseEntry &) const;
- bool accept_keyword(const KeywordName &, const PackageDatabaseEntry * const) const;
+ virtual bool accept_keyword(const KeywordName &, const PackageDatabaseEntry * const) const;
- bool query_user_masks(const PackageDatabaseEntry &) const;
+ virtual bool query_user_masks(const PackageDatabaseEntry &) const;
- bool query_user_unmasks(const PackageDatabaseEntry &) const;
+ virtual bool query_user_unmasks(const PackageDatabaseEntry &) const;
};
}
#endif
diff --git a/paludis/exception.hh b/paludis/exception.hh
index f3dbb09..7292496 100644
--- a/paludis/exception.hh
+++ b/paludis/exception.hh
@@ -94,7 +94,7 @@ namespace paludis
/**
* Constructor.
*
- * \param function Should be set to the PALUDIS_HERE macro.
+ * \param where Should be set to the PALUDIS_HERE macro.
*
* \param message A short message.
*/
@@ -103,7 +103,7 @@ namespace paludis
/**
* Constructor, with no message (deprecated).
*
- * \param function Should be set to the PALUDIS_HERE macro.
+ * \param where Should be set to the PALUDIS_HERE macro.
*
* \deprecated Use paludis::InternalError::InternalError(const char * const,
* const std::string &) instead.
diff --git a/paludis/filter_insert_iterator.hh b/paludis/filter_insert_iterator.hh
index 51ee8c5..5c42bd4 100644
--- a/paludis/filter_insert_iterator.hh
+++ b/paludis/filter_insert_iterator.hh
@@ -42,6 +42,9 @@ namespace paludis
Pred_ _p;
public:
+ /**
+ * Fake a container_type for use with other iterator adapters.
+ */
typedef typename Iter_::container_type container_type;
/**
diff --git a/paludis/getenv.hh b/paludis/getenv.hh
index c2c27c0..3366ae7 100644
--- a/paludis/getenv.hh
+++ b/paludis/getenv.hh
@@ -34,6 +34,9 @@ namespace paludis
class GetenvError : public Exception
{
public:
+ /**
+ * Constructor.
+ */
GetenvError(const std::string & key) throw ();
};
diff --git a/paludis/key_value_config_file.hh b/paludis/key_value_config_file.hh
index cff2e43..93ab818 100644
--- a/paludis/key_value_config_file.hh
+++ b/paludis/key_value_config_file.hh
@@ -43,6 +43,9 @@ namespace paludis
class KeyValueConfigFileError : public ConfigurationError
{
public:
+ /**
+ * Constructor.
+ */
KeyValueConfigFileError(const std::string & message,
const std::string & filename = "") throw ();
};
@@ -61,29 +64,56 @@ namespace paludis
protected:
void accept_line(const std::string &) const;
+ /**
+ * Handle variable replacement.
+ */
std::string replace_variables(const std::string &) const;
+ /**
+ * Handle quote removal.
+ */
std::string strip_quotes(const std::string &) const;
public:
+ /**
+ * Constructor, from a stream.
+ */
KeyValueConfigFile(std::istream * const);
+ /**
+ * Constructor, from a filename.
+ */
KeyValueConfigFile(const std::string & filename);
+ /**
+ * Destructor.
+ */
~KeyValueConfigFile();
+ /**
+ * Iterator 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.
+ */
std::string get(const std::string & key) const
{
return _entries[key];
diff --git a/paludis/line_config_file.hh b/paludis/line_config_file.hh
index 1898efd..b2b4361 100644
--- a/paludis/line_config_file.hh
+++ b/paludis/line_config_file.hh
@@ -47,17 +47,32 @@ namespace paludis
void accept_line(const std::string &) const;
public:
+ /**
+ * Constructor, from a stream.
+ */
LineConfigFile(std::istream * const);
+ /**
+ * Constructor, from a filename.
+ */
LineConfigFile(const std::string & filename);
+ /**
+ * Iterator 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();
diff --git a/paludis/package_database.hh b/paludis/package_database.hh
index 557e5c0..aa13b48 100644
--- a/paludis/package_database.hh
+++ b/paludis/package_database.hh
@@ -253,10 +253,19 @@ namespace paludis
const RepositoryName &) const;
+ /**
+ * Iterate over all of our repositories.
+ */
typedef std::list<Repository::ConstPointer>::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;
};
}
diff --git a/paludis/pstream.hh b/paludis/pstream.hh
index d83f7ae..47f49e5 100644
--- a/paludis/pstream.hh
+++ b/paludis/pstream.hh
@@ -48,6 +48,9 @@ namespace paludis
class PStreamError : public Exception
{
public:
+ /**
+ * Constructor.
+ */
PStreamError(const std::string & message) throw ();
};
@@ -73,14 +76,29 @@ namespace paludis
int _exit_status;
protected:
+ /**
+ * Our file descriptor.
+ */
FILE * fd;
+ /**
+ * At most how many characters can we put back?
+ */
static const int putback_size = std::numeric_limits<unsigned>::digits >> 3;
+ /**
+ * How large is our internal buffer?
+ */
static const int buffer_size = 3 * putback_size;
+ /**
+ * Internal buffer.
+ */
char buffer[buffer_size];
+ /**
+ * Called when an underflow occurs.
+ */
virtual int_type underflow();
public:
@@ -112,17 +130,27 @@ namespace paludis
/**
* For internal use by PStream classes.
+ *
+ * \ingroup PStream
*/
namespace pstream_internals
{
/**
* Avoid base from member issues for PStream.
+ *
+ * \ingroup PStream
*/
struct PStreamInBufBase :
private paludis::InstantiationPolicy<PStreamInBufBase, instantiation_method::NonCopyableTag>
{
+ /**
+ * Our buffer.
+ */
PStreamInBuf buf;
+ /**
+ * Constructor.
+ */
PStreamInBufBase(const std::string & command) :
buf(command)
{
diff --git a/paludis/repository.hh b/paludis/repository.hh
index 485980d..1bfa5a4 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -49,6 +49,9 @@ namespace paludis
const RepositoryName _name;
protected:
+ /**
+ * Our repository information.
+ */
std::map<std::string, std::string> _info;
/**
@@ -262,18 +265,30 @@ namespace paludis
return do_query_profile_masks(q.get<qpn_category>(), q.get<qpn_package>(), v);
}
+ /**
+ * Iterator to information about our repository.
+ */
typedef std::map<std::string, std::string>::const_iterator InfoIterator;
+ /**
+ * Start of repository information.
+ */
InfoIterator begin_info() const
{
return _info.begin();
}
+ /**
+ * Past the end of repository information.
+ */
InfoIterator end_info() const
{
return _info.end();
}
+ /**
+ * Query the state of the specified use flag.
+ */
UseFlagState query_use(const UseFlagName & u) const
{
if (do_query_use_mask(u))
@@ -282,6 +297,9 @@ namespace paludis
return do_query_use(u);
}
+ /**
+ * Query whether the specified use flag is masked.
+ */
bool query_use_mask(const UseFlagName & u) const
{
return do_query_use_mask(u);
diff --git a/paludis/tokeniser.hh b/paludis/tokeniser.hh
index 3d7494e..9e2e3a4 100644
--- a/paludis/tokeniser.hh
+++ b/paludis/tokeniser.hh
@@ -100,11 +100,17 @@ namespace paludis
template <typename Char_, typename Iter_>
struct Writer<delim_mode::DelimiterTag, Char_, Iter_>
{
+ /**
+ * Handle a token.
+ */
static void handle_token(const std::basic_string<Char_> & s, Iter_ & i)
{
*i++ = s;
}
+ /**
+ * Handle a delimiter.
+ */
static void handle_delim(const std::basic_string<Char_> &, const Iter_ &)
{
}
@@ -119,11 +125,17 @@ namespace paludis
template <typename Char_, typename Iter_>
struct Writer<delim_mode::BoundaryTag, Char_, Iter_>
{
+ /**
+ * Handle a token.
+ */
static void handle_token(const std::basic_string<Char_> & s, Iter_ & i)
{
*i++ = s;
}
+ /**
+ * Handle a delimiter.
+ */
static void handle_delim(const std::basic_string<Char_> & s, Iter_ & i)
{
*i++ = s;
@@ -154,11 +166,17 @@ namespace paludis
const std::basic_string<Char_> _delims;
public:
+ /**
+ * Constructor.
+ */
Tokeniser(const std::basic_string<Char_> & delims) :
_delims(delims)
{
}
+ /**
+ * Do the tokenisation.
+ */
template <typename Iter_>
void tokenise(const std::basic_string<Char_> & s, Iter_ iter) const;
};
diff --git a/paludis/transform_insert_iterator.hh b/paludis/transform_insert_iterator.hh
index cb037e5..0350930 100644
--- a/paludis/transform_insert_iterator.hh
+++ b/paludis/transform_insert_iterator.hh
@@ -47,6 +47,7 @@ namespace paludis
*/
struct container_type
{
+ /// Our value type.
typedef typename Trans_::argument_type value_type;
};
diff --git a/paludis/version_metadata.hh b/paludis/version_metadata.hh
index 1e56d1d..0c4921e 100644
--- a/paludis/version_metadata.hh
+++ b/paludis/version_metadata.hh
@@ -78,6 +78,8 @@ namespace paludis
*/
const std::string & get(const VersionMetadataKey key) const;
+ /// \name Convenience iterators
+ ///{
typedef std::set<UseFlagName>::const_iterator IuseIterator;
IuseIterator begin_iuse() const;
IuseIterator end_iuse() const;
@@ -89,6 +91,7 @@ namespace paludis
typedef std::set<QualifiedPackageName>::const_iterator ProvideIterator;
ProvideIterator begin_provide() const;
ProvideIterator end_provide() const;
+ ///}
/**
* Set a key, return self.
diff --git a/paludis/visitor.hh b/paludis/visitor.hh
index 5cd646a..63e4e1b 100644
--- a/paludis/visitor.hh
+++ b/paludis/visitor.hh
@@ -82,11 +82,17 @@ namespace paludis
class Visits
{
protected:
+ /**
+ * Destructor.
+ */
virtual ~Visits()
{
}
public:
+ /**
+ * Visit a node of the specified type.
+ */
virtual void visit(NodePtrType_ const) = 0;
};
@@ -99,6 +105,9 @@ namespace paludis
class Visits<const visitor_internals::NoType<n_> * >
{
protected:
+ /**
+ * Destructor.
+ */
~Visits()
{
}