6 #include <c++utilities/conversion/types.h> 32 const std::string &label()
const;
33 void setLabel(
const std::string &label);
34 void makeLabelUnique();
36 void setParent(
NodeEntry *parent,
int index = -1);
38 bool isIndirectChildOf(
NodeEntry *entry)
const;
39 std::list<std::string> path()
const;
40 void path(std::list<std::string> &res)
const;
41 virtual void make(std::ostream &stream)
const = 0;
42 virtual Entry *clone()
const = 0;
43 static Entry *parse(std::istream &stream);
44 static bool denotesNodeEntry(byte version);
47 Entry(
const std::string &label = std::string(),
NodeEntry *parent =
nullptr);
106 const std::vector<Entry *> &children()
const;
107 void deleteChildren(
int begin,
int end);
108 void replaceChild(
size_t at,
Entry *newChild);
109 Entry *entryByPath(std::list<std::string> &path,
bool includeThis =
true,
EntryType *creationType =
nullptr);
110 bool isExpandedByDefault()
const;
111 void setExpandedByDefault(
bool expandedByDefault);
112 virtual void make(std::ostream &stream)
const;
116 std::vector<Entry *> m_children;
117 bool m_expandedByDefault;
132 return m_expandedByDefault;
137 m_expandedByDefault = expandedByDefault;
142 return (version & 0x80) == 0;
154 const std::vector<Field> &fields()
const;
155 std::vector<Field> &fields();
156 virtual void make(std::ostream &stream)
const;
160 std::vector<Field> m_fields;
NodeEntry * parent() const
Returns the parent entry.
The NodeEntry class acts as parent for other entries.
const std::string & label() const
Returns the label.
void setLabel(const std::string &label)
Sets the label.
bool isExpandedByDefault() const
virtual EntryType type() const
Returns the type of the entry.
Contains all IO related classes.
int index() const
Returns the index of the entry within its parent.
std::string m_extendedData
The exception that is thrown when a parsing error occurs.
#define PASSWORD_FILE_EXPORT
Marks the symbol to be exported by the passwordfile library.
static bool denotesNodeEntry(byte version)
const std::vector< Entry * > & children() const
const std::vector< Field > & fields() const
EntryType
Specifies the entry type.
void setExpandedByDefault(bool expandedByDefault)
virtual EntryType type() const
Returns the type of the entry.
Instances of the Entry class form a hierarchic data strucutre used to store account information...