Athena IO Library
athena::WiiFile Class Reference

Wii file container class. More...

#include <WiiFile.hpp>

Collaboration diagram for athena::WiiFile:
Collaboration graph

Public Types

enum  Permission {
  OtherRead = 0x01, OtherWrite = 0x02, GroupRead = 0x04, GroupWrite = 0x08,
  OwnerRead = 0x10, OwnerWrite = 0x20, OtherRW = (OtherRead | OtherWrite), GroupRW = (GroupRead | GroupWrite),
  OwnerRW = (OwnerRead | OwnerWrite)
}
 The Wii uses a bastardized unix permissions system so these flags reflect the file's individual permissions. More...
 
enum  Type { File = 0x01, Directory = 0x02 }
 The Type enum.
 

Public Member Functions

 WiiFile (const std::string &filename)
 WiiFile. More...
 
 WiiFile (const std::string &filename, atUint8 permissions, const atUint8 *data, atUint32 length)
 WiiFile. More...
 
void setFilename (const std::string &filename)
 setFilename More...
 
std::string filename () const
 filename More...
 
void setData (const atUint8 *data)
 setData More...
 
atUint8 * data () const
 data More...
 
void setLength (const int len)
 setLength More...
 
int length () const
 length More...
 
void setPermissions (const atUint8 permissions)
 setPermissions More...
 
atUint8 permissions () const
 permissions More...
 
void setAttributes (const atUint8 attr)
 setAttributes More...
 
atUint8 attributes () const
 attributes More...
 
void setType (Type type)
 setType More...
 
Type type () const
 type More...
 
bool isDirectory () const
 isDirectory More...
 
bool isFile () const
 isFile More...
 
void addChild (WiiFile *file)
 addChild More...
 
std::vector< WiiFile * > children ()
 children More...
 
WiiFilechild (const std::string &name)
 child More...
 
void removeChild (const std::string &name)
 removeChild More...
 
void removeChild (WiiFile *file)
 removeChild More...
 
WiiFileparent ()
 parent More...
 
void setParent (WiiFile *parent)
 setParent More...
 
atUint32 fileCount ()
 fileCount More...
 
std::vector< WiiFile * > allChildren ()
 allChildren More...
 
std::string fullpath ()
 fullpath More...
 

Detailed Description

Wii file container class.

Contains all relevant data for a file in a data.bin file.

Definition at line 20 of file WiiFile.hpp.

Member Enumeration Documentation

The Wii uses a bastardized unix permissions system so these flags reflect the file's individual permissions.

Enumerator
OtherRW 

Mask to get the Other group permissions.

Definition at line 28 of file WiiFile.hpp.

Constructor & Destructor Documentation

athena::WiiFile::WiiFile ( const std::string &  filename)

WiiFile.

Parameters
filename
athena::WiiFile::WiiFile ( const std::string &  filename,
atUint8  permissions,
const atUint8 *  data,
atUint32  length 
)

WiiFile.

Parameters
filename
permissions
data
length

Member Function Documentation

void athena::WiiFile::addChild ( WiiFile file)

addChild

Parameters
file
std::vector<WiiFile*> athena::WiiFile::allChildren ( )

allChildren

Returns
atUint8 athena::WiiFile::attributes ( ) const

attributes

Returns
WiiFile* athena::WiiFile::child ( const std::string &  name)

child

Parameters
name
Returns
std::vector<WiiFile*> athena::WiiFile::children ( )

children

Returns
atUint8* athena::WiiFile::data ( ) const

data

Returns
atUint32 athena::WiiFile::fileCount ( )

fileCount

Returns
std::string athena::WiiFile::filename ( ) const

filename

Returns
std::string athena::WiiFile::fullpath ( )

fullpath

Returns
bool athena::WiiFile::isDirectory ( ) const

isDirectory

Returns
bool athena::WiiFile::isFile ( ) const

isFile

Returns
int athena::WiiFile::length ( ) const

length

Returns
WiiFile* athena::WiiFile::parent ( )

parent

Returns
atUint8 athena::WiiFile::permissions ( ) const

permissions

Returns
void athena::WiiFile::removeChild ( const std::string &  name)

removeChild

Parameters
name
void athena::WiiFile::removeChild ( WiiFile file)

removeChild

Parameters
file
void athena::WiiFile::setAttributes ( const atUint8  attr)

setAttributes

Parameters
attr
void athena::WiiFile::setData ( const atUint8 *  data)

setData

Parameters
data
void athena::WiiFile::setFilename ( const std::string &  filename)

setFilename

Parameters
filename
void athena::WiiFile::setLength ( const int  len)

setLength

Parameters
len
void athena::WiiFile::setParent ( WiiFile parent)

setParent

Parameters
parent
void athena::WiiFile::setPermissions ( const atUint8  permissions)

setPermissions

Parameters
permissions
void athena::WiiFile::setType ( Type  type)

setType

Parameters
type
Type athena::WiiFile::type ( ) const

type

Returns

The documentation for this class was generated from the following file: