aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-16 20:36:56 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-16 20:36:56 +0000
commit1bfa6b673f51878e2e5799d7299341b5564b377c (patch)
treea566a509296119367d5cabbf54fb83a14f8f7b21
parent963828113c269681e1b9fea97924a4413c558ce7 (diff)
downloadpaludis-1bfa6b673f51878e2e5799d7299341b5564b377c.tar.gz
paludis-1bfa6b673f51878e2e5799d7299341b5564b377c.tar.xz
Document LiteralMetadataKey
-rw-r--r--doc/api/cplusplus/groups.doxygen8
-rw-r--r--paludis/literal_metadata_key.hh71
-rw-r--r--paludis/metadata_key.hh3
3 files changed, 82 insertions, 0 deletions
diff --git a/doc/api/cplusplus/groups.doxygen b/doc/api/cplusplus/groups.doxygen
index c81a096..8c89c77 100644
--- a/doc/api/cplusplus/groups.doxygen
+++ b/doc/api/cplusplus/groups.doxygen
@@ -42,6 +42,14 @@ using namespace paludis;
* - \ref example_contents.cc "example_contents.cc"
*/
+/** \defgroup g_literal_metadata_key Literal Metadata Keys
+ *
+ * \ingroup g_metadata_key
+ *
+ * Implementations of MetadataKey subclasses where the value is a literal string
+ * known at construction time.
+ */
+
/** \defgroup g_dep_spec Dependency specifications
*
* \ingroup g_paludis
diff --git a/paludis/literal_metadata_key.hh b/paludis/literal_metadata_key.hh
index ddaef15..39adcd5 100644
--- a/paludis/literal_metadata_key.hh
+++ b/paludis/literal_metadata_key.hh
@@ -26,8 +26,26 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/set.hh>
+/** \file
+ * Declarations for literal metadata key classes.
+ *
+ * \ingroup g_literal_metadata_key
+ *
+ * \section Examples
+ *
+ * - \ref example_metadata_key.cc "example_metadata_key.cc" (for metadata keys)
+ */
+
+
namespace paludis
{
+ /**
+ * A LiteralMetadataStringKey is a MetadataStringKey whose value is a
+ * literal string that is known at construction time.
+ *
+ * \ingroup g_literal_metadata_key
+ * \since 0.26
+ */
class PALUDIS_VISIBLE LiteralMetadataStringKey :
public MetadataStringKey,
private PrivateImplementationPattern<LiteralMetadataStringKey>
@@ -36,13 +54,25 @@ namespace paludis
PrivateImplementationPattern<LiteralMetadataStringKey>::ImpPtr & _imp;
public:
+ ///\name Basic operations
+ ///\{
+
LiteralMetadataStringKey(const std::string &, const std::string &, const MetadataKeyType,
const std::string &);
~LiteralMetadataStringKey();
+ ///\}
+
virtual const std::string value() const PALUDIS_ATTRIBUTE((warn_unused_result));
};
+ /**
+ * A LiteralMetadataFSEntryKey is a MetadataFSEntryKey whose value is a
+ * literal FSEntry that is known at construction time.
+ *
+ * \ingroup g_literal_metadata_key
+ * \since 0.26
+ */
class PALUDIS_VISIBLE LiteralMetadataFSEntryKey :
public MetadataFSEntryKey,
private PrivateImplementationPattern<LiteralMetadataFSEntryKey>
@@ -51,13 +81,25 @@ namespace paludis
PrivateImplementationPattern<LiteralMetadataFSEntryKey>::ImpPtr & _imp;
public:
+ ///\name Basic operations
+ ///\{
+
LiteralMetadataFSEntryKey(const std::string &, const std::string &, const MetadataKeyType,
const FSEntry &);
~LiteralMetadataFSEntryKey();
+ ///\}
+
virtual const FSEntry value() const PALUDIS_ATTRIBUTE((warn_unused_result));
};
+ /**
+ * A LiteralMetadataPackageIDKey is a MetadataPackageIDKey whose value is
+ * known at construction time.
+ *
+ * \ingroup g_literal_metadata_key
+ * \since 0.26
+ */
class PALUDIS_VISIBLE LiteralMetadataPackageIDKey :
public MetadataPackageIDKey,
private PrivateImplementationPattern<LiteralMetadataPackageIDKey>
@@ -66,13 +108,25 @@ namespace paludis
PrivateImplementationPattern<LiteralMetadataPackageIDKey>::ImpPtr & _imp;
public:
+ ///\name Basic operations
+ ///\{
+
LiteralMetadataPackageIDKey(const std::string &, const std::string &, const MetadataKeyType,
const tr1::shared_ptr<const PackageID> &);
~LiteralMetadataPackageIDKey();
+ ///\}
+
virtual const tr1::shared_ptr<const PackageID> value() const PALUDIS_ATTRIBUTE((warn_unused_result));
};
+ /**
+ * A LiteralMetadataFSEntrySequenceKey is a MetadataCollectionKey<FSEntrySequence>
+ * whose value is known at construction time.
+ *
+ * \ingroup g_literal_metadata_key
+ * \since 0.26
+ */
class PALUDIS_VISIBLE LiteralMetadataFSEntrySequenceKey :
public MetadataCollectionKey<FSEntrySequence>,
private PrivateImplementationPattern<LiteralMetadataFSEntrySequenceKey>
@@ -81,16 +135,28 @@ namespace paludis
PrivateImplementationPattern<LiteralMetadataFSEntrySequenceKey>::ImpPtr & _imp;
public:
+ ///\name Basic operations
+ ///\{
+
LiteralMetadataFSEntrySequenceKey(const std::string &, const std::string &, const MetadataKeyType,
const tr1::shared_ptr<const FSEntrySequence> &);
~LiteralMetadataFSEntrySequenceKey();
+ ///\}
+
virtual const tr1::shared_ptr<const FSEntrySequence> value() const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::string pretty_print_flat(const Formatter<FSEntry> &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
};
+ /**
+ * A LiteralMetadataStringSetKey is a MetadataCollectionKey<Set<std::string> >
+ * whose value is known at construction time.
+ *
+ * \ingroup g_literal_metadata_key
+ * \since 0.26
+ */
class PALUDIS_VISIBLE LiteralMetadataStringSetKey :
public MetadataCollectionKey<Set<std::string> >,
private PrivateImplementationPattern<LiteralMetadataStringSetKey>
@@ -99,10 +165,15 @@ namespace paludis
PrivateImplementationPattern<LiteralMetadataStringSetKey>::ImpPtr & _imp;
public:
+ ///\name Basic operations
+ ///\{
+
LiteralMetadataStringSetKey(const std::string &, const std::string &, const MetadataKeyType,
const tr1::shared_ptr<const Set<std::string> > &);
~LiteralMetadataStringSetKey();
+ ///\}
+
virtual const tr1::shared_ptr<const Set<std::string> > value() const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual std::string pretty_print_flat(const Formatter<std::string> &) const
diff --git a/paludis/metadata_key.hh b/paludis/metadata_key.hh
index 4495e31..2a82199 100644
--- a/paludis/metadata_key.hh
+++ b/paludis/metadata_key.hh
@@ -107,6 +107,9 @@ namespace paludis
* key. A ConstVisitor using MetadataKeyVisitorTypes can be used to get more
* detail.
*
+ * The header \ref paludis/literal_metadata_key.hh "literal_metadata_key.hh"
+ * contains various concrete implementations of MetadataKey subclasses.
+ *
* \ingroup g_metadata_key
* \since 0.26
* \nosubgrouping