39 const std::string& name) {
40 for (FIFE::ZipNodeContainer::const_iterator iter = container.begin(); iter != container.end(); ++iter) {
41 if ((*iter)->getName() == name) {
50 const std::string& name)
52 for (FIFE::ZipNodeContainer::iterator iter = container.begin(); iter != container.end(); ++iter) {
53 if ((*iter)->getName() == name) {
58 return container.end();
64 : comp(0), crc32(0), size_comp(0), size_real(0), offset(0) {
68 : m_name(name), m_parent(parent) {
83 ZipNodeContainer::iterator iter;
106 return (path.string());
123 switch (contentType) {
150 switch (contentType) {
200 ZipNodeContainer::iterator iter;
213 ZipNodeContainer::iterator iter = FindNameInContainer(
m_fileChildren, name);
253 os << node.
getName() << std::endl;
257 FIFE::ZipNodeContainer::iterator iter;
258 for (iter = fileChildren.begin(); iter != fileChildren.end(); ++iter) {
259 os << *(*iter) << std::endl;
264 for (iter = directoryChildren.begin(); iter != directoryChildren.end(); ++iter) {
265 os << *(*iter) << std::endl;
std::vector< ZipNode * > ZipNodeContainer
bool isBranch() const
accessor for checking if this node has children
std::vector< ZipNode * > getChildren(ZipContentType::Enum contentType=ZipContentType::All) const
gives access to retrieve the children of this node
ZipContentType::Enum getContentType() const
accessor for the content type of this node
std::string getName() const
accessor for the name of this node
ZipEntryData()
constructor
std::ostream & operator<<(std::ostream &os, const Location &l)
Stream output operator.
void removeChild(ZipNode *child)
allows removing a child from this node
ZipNodeContainer m_directoryChildren
ZipNode * getChild(const std::string &name, ZipContentType::Enum contentType=ZipContentType::All) const
gives access to retrieving a specific child node by name
ZipNode(const std::string &name, ZipNode *parent=0)
constructor for creating a node
bool HasExtension(const std::string &path)
Helper function to check if a filename has an extension.
ZipNode * addChild(const std::string &child)
allows adding a child node to this node
ZipNode * getParent() const
accessor for the parent node of this node will be NULL if this node has no parent ...
std::string getFullName() const
accessor for the absolute path name of this node
void setZipEntryData(const ZipEntryData &entryData)
sets the zip file entry information for this node in the zip archive
ZipNodeContainer m_fileChildren
bool isLeaf() const
accessor for checking if this node has any children
const ZipEntryData & getZipEntryData() const
accessor for the entry data associated with this node in the zip archive
ZipContentType::Enum m_contentType