40 const std::string& name) {
41 for (FIFE::ZipNodeContainer::const_iterator iter = container.begin(); iter != container.end(); ++iter) {
42 if ((*iter)->getName() == name) {
51 const std::string& name)
53 for (FIFE::ZipNodeContainer::iterator iter = container.begin(); iter != container.end(); ++iter) {
54 if ((*iter)->getName() == name) {
59 return container.end();
65 : comp(0), crc32(0), size_comp(0), size_real(0), offset(0) {
69 : m_name(name), m_parent(parent) {
84 ZipNodeContainer::iterator iter;
107 return (path.string());
124 switch (contentType) {
151 switch (contentType) {
201 ZipNodeContainer::iterator iter;
214 ZipNodeContainer::iterator iter = FindNameInContainer(
m_fileChildren, name);
254 os << node.
getName() << std::endl;
258 FIFE::ZipNodeContainer::iterator iter;
259 for (iter = fileChildren.begin(); iter != fileChildren.end(); ++iter) {
260 os << *(*iter) << std::endl;
265 for (iter = directoryChildren.begin(); iter != directoryChildren.end(); ++iter) {
266 os << *(*iter) << std::endl;
std::vector< ZipNode * > ZipNodeContainer
std::string getName() const
accessor for the name of this node
std::string getFullName() const
accessor for the absolute path name of this node
ZipEntryData()
constructor
std::vector< ZipNode * > getChildren(ZipContentType::Enum contentType=ZipContentType::All) const
gives access to retrieve the children of this node
std::ostream & operator<<(std::ostream &os, const Location &l)
Stream output operator.
bool isLeaf() const
accessor for checking if this node has any children
void removeChild(ZipNode *child)
allows removing a child from this node
const ZipEntryData & getZipEntryData() const
accessor for the entry data associated with this node in the zip archive
ZipNodeContainer m_directoryChildren
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 * getParent() const
accessor for the parent node of this node will be NULL if this node has no parent ...
ZipContentType::Enum getContentType() const
accessor for the content type of this node
ZipNode * addChild(const std::string &child)
allows adding a child node to this node
ZipNode * getChild(const std::string &name, ZipContentType::Enum contentType=ZipContentType::All) const
gives access to retrieving a specific child node by name
void setZipEntryData(const ZipEntryData &entryData)
sets the zip file entry information for this node in the zip archive
ZipNodeContainer m_fileChildren
bool isBranch() const
accessor for checking if this node has children
ZipContentType::Enum m_contentType