diff options
Diffstat (limited to 'src/entry.h')
-rw-r--r-- | src/entry.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/entry.h b/src/entry.h index ddb2017..36d23c6 100644 --- a/src/entry.h +++ b/src/entry.h @@ -289,23 +289,43 @@ class Entry Entry(); Entry(const Entry &); - ~Entry(); + ~Entry(); + + /*! Returns the static size of the Entry (so excluding any dynamic memory) */ int getSize(); + void addSpecialListItem(const char *listName,int index); void createNavigationIndex(EntryNav *rootNav,FileStorage *storage,FileDef *fd); // while parsing a file these function can be used to navigate/build the tree void setParent(Entry *parent) { m_parent = parent; } + + /*! Returns the parent for this Entry or 0 if this entry has no parent. */ Entry *parent() const { return m_parent; } + + /*! Returns the list of children for this Entry + * @see addSubEntry() and removeSubEntry() + */ const QList<Entry> *children() const { return m_sublist; } - /*! Adds entry \e as a child to this entry */ - void addSubEntry (Entry* e) ; + /*! Adds entry \a e as a child to this entry */ + void addSubEntry (Entry* e) ; + + /*! Removes entry \a e from the list of children. + * Returns a pointer to the entry or 0 if the entry was not a child. + * Note the entry will not be deleted. + */ + Entry *removeSubEntry(Entry *e); + /*! Restore the state of this Entry to the default value it has * at construction time. */ void reset(); + + /*! Serialize this entry to a persistent storage stream. */ void marshall(StorageIntf *); + + /*! Reinitialize this entry from a persistent storage stream. */ void unmarshall(StorageIntf *); public: @@ -366,6 +386,7 @@ class Entry bool artificial; //!< Artificially introduced item GroupDocType groupDocType; + static int num; //!< counts the total number of entries /// return the command name used to define GROUPDOC_SEC |