6 #include <c++utilities/conversion/types.h> 33 const std::string &label()
const;
34 void setLabel(
const std::string &label);
35 void makeLabelUnique();
37 void setParent(
NodeEntry *parent,
int index = -1);
39 bool isIndirectChildOf(
NodeEntry *entry)
const;
40 std::list<std::string> path()
const;
41 void path(std::list<std::string> &res)
const;
42 virtual void make(std::ostream &stream)
const = 0;
43 virtual Entry *clone()
const = 0;
44 static Entry *parse(std::istream &stream);
45 static bool denotesNodeEntry(byte version);
48 Entry(
const std::string &label = std::string(),
NodeEntry *parent =
nullptr);
108 const std::vector<Entry *> &children()
const;
109 void deleteChildren(
int begin,
int end);
110 void replaceChild(
size_t at,
Entry *newChild);
111 Entry *entryByPath(std::list<std::string> &path,
bool includeThis =
true,
EntryType *creationType =
nullptr);
112 bool isExpandedByDefault()
const;
113 void setExpandedByDefault(
bool expandedByDefault);
114 virtual void make(std::ostream &stream)
const;
118 std::vector<Entry *> m_children;
119 bool m_expandedByDefault;
134 return m_expandedByDefault;
139 m_expandedByDefault = expandedByDefault;
144 return (version & 0x80) == 0;
157 const std::vector<Field> &fields()
const;
158 std::vector<Field> &fields();
159 virtual void make(std::ostream &stream)
const;
162 std::vector<Field> m_fields;
virtual EntryType type() const
Returns the type of the entry.
The NodeEntry class acts as parent for other entries.
void setLabel(const std::string &label)
Sets the label.
const std::vector< Field > & fields() const
virtual EntryType type() const
Returns the type of the entry.
Contains all IO related classes.
const std::vector< Entry * > & children() const
std::string m_extendedData
The exception that is thrown when a parsing error occurs.
#define PASSWORD_FILE_EXPORT
static bool denotesNodeEntry(byte version)
const std::string & label() const
Returns the label.
bool isExpandedByDefault() const
EntryType
Specifies the entry type.
NodeEntry * parent() const
Returns the parent entry.
void setExpandedByDefault(bool expandedByDefault)
int index() const
Returns the index of the entry within its parent.
Instances of the Entry class form a hierarchic data strucutre used to store account information...