00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PALUDIS_GUARD_ARGS_ARGS_GROUP_HH
00021 #define PALUDIS_GUARD_ARGS_ARGS_GROUP_HH 1
00022
00023 #include <paludis/args/args_option.hh>
00024 #include <paludis/util/instantiation_policy.hh>
00025 #include <paludis/util/private_implementation_pattern.hh>
00026 #include <string>
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 namespace paludis
00039 {
00040
00041 namespace args
00042 {
00043 class ArgsSection;
00044
00045
00046
00047
00048
00049
00050
00051 class PALUDIS_VISIBLE ArgsGroup :
00052 private PrivateImplementationPattern<ArgsGroup>,
00053 private InstantiationPolicy<ArgsGroup, instantiation_method::NonCopyableTag>
00054 {
00055 private:
00056 const std::string _name;
00057 const std::string _description;
00058
00059 ArgsSection * _section;
00060
00061 public:
00062
00063
00064
00065 ArgsSection * section() const
00066 {
00067 return _section;
00068 }
00069
00070
00071
00072
00073
00074 void add(ArgsOption * const value);
00075
00076
00077
00078
00079
00080 void remove(ArgsOption * const value);
00081
00082
00083
00084
00085 struct ConstIteratorTag;
00086 typedef WrappedForwardIterator<ConstIteratorTag, ArgsOption * const> ConstIterator;
00087
00088 ConstIterator begin() const;
00089 ConstIterator end() const;
00090
00091
00092
00093
00094
00095
00096 ArgsGroup(ArgsSection * s, const std::string & name,
00097 const std::string & description);
00098
00099 ~ArgsGroup();
00100
00101
00102
00103
00104
00105
00106 const std::string & name() const
00107 {
00108 return _name;
00109 }
00110
00111
00112
00113
00114 const std::string & description() const
00115 {
00116 return _description;
00117 }
00118 };
00119 }
00120 }
00121
00122 #endif