protected:
const char *_name;
const char *_desc;
+ std::vector<Flag *> _kids;
public:
Flag(const char *name, const char *desc);
std::string name() const { return _name; }
std::string desc() const { return _desc; }
+ std::vector<Flag *> kids() { return _kids; }
virtual void enable() = 0;
virtual void disable() = 0;
class CompoundFlag : public SimpleFlag
{
protected:
- std::vector<Flag *> flags;
+ void
+ addFlag(Flag &f)
+ {
+ if (&f != NULL)
+ _kids.push_back(&f);
+ }
public:
CompoundFlag(const char *name, const char *desc,
addFlag(f15); addFlag(f16); addFlag(f17); addFlag(f18); addFlag(f19);
}
- void
- addFlag(Flag &f)
- {
- if (&f != NULL)
- flags.push_back(&f);
- }
-
void enable();
void disable();
};