|
FIFE
|
#include <zipnode.h>
Collaboration diagram for FIFE::ZipNode:Public Member Functions | |
| ZipNode (const std::string &name, ZipNode *parent=0) | |
| constructor for creating a node More... | |
| ~ZipNode () | |
| destructor More... | |
| std::string | getName () const |
| accessor for the name of this node More... | |
| std::string | getFullName () const |
| accessor for the absolute path name of this node More... | |
| ZipContentType::Enum | getContentType () const |
| accessor for the content type of this node More... | |
| ZipNode * | getParent () const |
| accessor for the parent node of this node will be NULL if this node has no parent More... | |
| std::vector< ZipNode * > | getChildren (ZipContentType::Enum contentType=ZipContentType::All) const |
| gives access to retrieve the children of this node More... | |
| ZipNode * | getChild (const std::string &name, ZipContentType::Enum contentType=ZipContentType::All) const |
| gives access to retrieving a specific child node by name More... | |
| ZipNode * | addChild (const std::string &child) |
| allows adding a child node to this node More... | |
| void | removeChild (ZipNode *child) |
| allows removing a child from this node More... | |
| void | removeChild (const std::string &name) |
| allows removing a child node by name More... | |
| bool | isLeaf () const |
| accessor for checking if this node has any children More... | |
| bool | isBranch () const |
| accessor for checking if this node has children More... | |
| void | setZipEntryData (const ZipEntryData &entryData) |
| sets the zip file entry information for this node in the zip archive More... | |
| const ZipEntryData & | getZipEntryData () const |
| accessor for the entry data associated with this node in the zip archive More... | |
Private Attributes | |
| std::string | m_name |
| ZipContentType::Enum | m_contentType |
| ZipEntryData | m_entryData |
| ZipNode * | m_parent |
| ZipNodeContainer | m_fileChildren |
| ZipNodeContainer | m_directoryChildren |
| FIFE::ZipNode::ZipNode | ( | const std::string & | name, |
| ZipNode * | parent = 0 |
||
| ) |
constructor for creating a node
| name | the name of the node |
| parent | the parent of this node, defaults to NULL |
Definition at line 67 of file zipnode.cpp.
References FIFE::ZipContentType::Directory, FIFE::ZipContentType::File, FIFE::HasExtension(), m_contentType, and m_name.
Referenced by addChild().
Here is the caller graph for this function:| FIFE::ZipNode::~ZipNode | ( | ) |
destructor
Definition at line 82 of file zipnode.cpp.
References m_directoryChildren, and m_fileChildren.
| ZipNode * FIFE::ZipNode::addChild | ( | const std::string & | child | ) |
allows adding a child node to this node
| child | the name to add as a child node |
Definition at line 180 of file zipnode.cpp.
References FIFE::ZipContentType::Directory, FIFE::ZipContentType::File, getContentType(), m_directoryChildren, m_fileChildren, and ZipNode().
Referenced by FIFE::ZipTree::addNode().
Here is the caller graph for this function:| ZipNode * FIFE::ZipNode::getChild | ( | const std::string & | name, |
| ZipContentType::Enum | contentType = ZipContentType::All |
||
| ) | const |
gives access to retrieving a specific child node by name
| name | the name of the child node to search for |
| contentType | optional for filtering on the type of node to return |
Definition at line 146 of file zipnode.cpp.
References FIFE::ZipContentType::All, FIFE::ZipContentType::Directory, FIFE::ZipContentType::File, FIFE::HasExtension(), m_directoryChildren, and m_fileChildren.
Referenced by FIFE::ZipTree::addNode(), and FIFE::ZipTree::getNode().
Here is the caller graph for this function:| std::vector< ZipNode * > FIFE::ZipNode::getChildren | ( | ZipContentType::Enum | contentType = ZipContentType::All | ) | const |
gives access to retrieve the children of this node
| contentType | allows filtering on the type of nodes returned, |
Definition at line 122 of file zipnode.cpp.
References FIFE::ZipContentType::All, FIFE::ZipContentType::Directory, FIFE::ZipContentType::File, m_directoryChildren, and m_fileChildren.
Referenced by FIFE::ZipSource::listDirectories(), FIFE::ZipSource::listFiles(), and operator<<().
Here is the caller graph for this function:| ZipContentType::Enum FIFE::ZipNode::getContentType | ( | ) | const |
accessor for the content type of this node
Definition at line 114 of file zipnode.cpp.
References m_contentType.
Referenced by addChild(), and removeChild().
Here is the caller graph for this function:| std::string FIFE::ZipNode::getFullName | ( | ) | const |
accessor for the absolute path name of this node
Definition at line 99 of file zipnode.cpp.
References getFullName(), m_name, and m_parent.
Referenced by getFullName().
Here is the caller graph for this function:| std::string FIFE::ZipNode::getName | ( | ) | const |
accessor for the name of this node
Definition at line 95 of file zipnode.cpp.
References m_name.
Referenced by operator<<().
Here is the caller graph for this function:| ZipNode * FIFE::ZipNode::getParent | ( | ) | const |
accessor for the parent node of this node will be NULL if this node has no parent
Definition at line 118 of file zipnode.cpp.
References m_parent.
Referenced by FIFE::ZipTree::getNode().
Here is the caller graph for this function:| const ZipEntryData & FIFE::ZipNode::getZipEntryData | ( | ) | const |
accessor for the entry data associated with this node in the zip archive
Definition at line 245 of file zipnode.cpp.
References m_entryData.
Referenced by FIFE::ZipSource::open().
Here is the caller graph for this function:| bool FIFE::ZipNode::isBranch | ( | ) | const |
accessor for checking if this node has children
Definition at line 235 of file zipnode.cpp.
References isLeaf().
| bool FIFE::ZipNode::isLeaf | ( | ) | const |
accessor for checking if this node has any children
Definition at line 230 of file zipnode.cpp.
References m_directoryChildren, and m_fileChildren.
Referenced by isBranch().
Here is the caller graph for this function:| void FIFE::ZipNode::removeChild | ( | ZipNode * | child | ) |
allows removing a child from this node
| child | the child node to remove |
Definition at line 197 of file zipnode.cpp.
References FIFE::ZipContentType::File, getContentType(), and m_fileChildren.
| void FIFE::ZipNode::removeChild | ( | const std::string & | name | ) |
allows removing a child node by name
| name | the name of the child to remove |
Definition at line 211 of file zipnode.cpp.
References FIFE::HasExtension(), m_directoryChildren, and m_fileChildren.
| void FIFE::ZipNode::setZipEntryData | ( | const ZipEntryData & | entryData | ) |
sets the zip file entry information for this node in the zip archive
| entryData | the entry data that goes with this node |
Definition at line 240 of file zipnode.cpp.
References m_entryData.
Referenced by FIFE::ZipSource::readFileToIndex().
Here is the caller graph for this function:
|
private |
Definition at line 153 of file zipnode.h.
Referenced by getContentType(), and ZipNode().
|
private |
Definition at line 158 of file zipnode.h.
Referenced by addChild(), getChild(), getChildren(), isLeaf(), removeChild(), and ~ZipNode().
|
private |
Definition at line 154 of file zipnode.h.
Referenced by getZipEntryData(), and setZipEntryData().
|
private |
Definition at line 157 of file zipnode.h.
Referenced by addChild(), getChild(), getChildren(), isLeaf(), removeChild(), and ~ZipNode().
|
private |
Definition at line 152 of file zipnode.h.
Referenced by getFullName(), getName(), and ZipNode().
|
private |
Definition at line 156 of file zipnode.h.
Referenced by getFullName(), and getParent().