libwps_OLE::DirEntry Class Reference documentation

libwps_OLE::DirEntry Class Reference

## Public Types
enum | { End = 0xffffffff }

## Public Member Functions
| DirEntry ()
| constructor
bool | is_dir () const
| returns true for a directory
std::string | name () const
| returns the simplified file name
std::string const & | filename () const
| returns the string which was store inside the file.
void | setName (std::string const &nm)
| sets the file name
void | load (unsigned char *buffer, unsigned len)
| reads a entry content in buffer
void | save (unsigned char *buffer) const
| saves a entry content in buffer *‍/

## Static Public Member Functions
static unsigned | saveSize ()
| returns space required to save a dir entry

## Public Attributes
bool | m_valid
bool | m_macRootEntry
| false if invalid (should be skipped)
unsigned | m_type
| true if this is a classic mac directory entry
unsigned | m_colour
| the type
unsigned long | m_size
| the red/black color: 0 means red
unsigned long | m_start
| size (not valid if directory)
unsigned | m_right
| starting block
unsigned | m_left
| previous sibling
unsigned | m_child
| next sibling
DirInfo | m_info
| first child

## Protected Attributes
std::string | m_name
| the file information

## Member Enumeration Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
End |

## Constructor & Destructor Documentation

## ◆ DirEntry()

libwps_OLE::DirEntry::DirEntry | ( |  | ) |
| inline

constructor

Referenced by load().

## Member Function Documentation

## ◆ filename()

std::string const & libwps_OLE::DirEntry::filename | ( |  | ) | const
| inline

returns the string which was store inside the file.

Note
  : either name() or a index (unknown) followed by name()

Referenced by libwps_OLE::DirTree::getSubStreamList().

## ◆ is_dir()

bool libwps_OLE::DirEntry::is_dir | ( |  | ) | const
| inline

returns true for a directory

Referenced by libwps_OLE::IStream::createOleFromDirectory(), libwps_OLE::DirTree::getSubStreamList(), and libwps_OLE::IStorage::isSubStream().

## ◆ load()

void libwps_OLE::DirEntry::load | ( | unsigned char * | buffer,
|  | unsigned | len )

reads a entry content in buffer

Referenced by libwps_OLE::DirTree::load().

## ◆ name()

std::string libwps_OLE::DirEntry::name | ( |  | ) | const
| inline

returns the simplified file name

Referenced by libwps_OLE::DirTree::find_child(), and libwps_OLE::DirTree::CompareEntryName::operator()().

## ◆ save()

void libwps_OLE::DirEntry::save | ( | unsigned char * | buffer | ) | const

saves a entry content in buffer *‍/

Referenced by libwps_OLE::DirTree::save().

## ◆ saveSize()

unsigned libwps_OLE::DirEntry::saveSize | ( |  | ) |
| inlinestatic

returns space required to save a dir entry

Referenced by libwps_OLE::DirTree::save(), and libwps_OLE::DirTree::saveSize().

## ◆ setName()

void libwps_OLE::DirEntry::setName | ( | std::string const & | nm | ) |
| inline

sets the file name

Referenced by libwps_OLE::DirTree::index().

## Member Data Documentation

## ◆ m_child

unsigned libwps_OLE::DirEntry::m_child

next sibling

Referenced by libwps_OLE::IStream::createOleFromDirectory(), DirEntry(), libwps_OLE::DirTree::find_child(), libwps_OLE::DirTree::getSubStreamList(), load(), save(), and libwps_OLE::DirTree::setInRedBlackTreeForm().

## ◆ m_colour

unsigned libwps_OLE::DirEntry::m_colour

the type

Referenced by DirEntry(), load(), save(), libwps_OLE::DirTree::setInRBTForm(), and libwps_OLE::DirTree::setInRedBlackTreeForm().

## ◆ m_info

DirInfo libwps_OLE::DirEntry::m_info

first child

Referenced by libwps_OLE::IStream::createOleFromDirectory(), DirEntry(), load(), save(), and libwps_OLE::OStorage::setInformation().

## ◆ m_left

unsigned libwps_OLE::DirEntry::m_left

previous sibling

Referenced by DirEntry(), libwps_OLE::DirTree::get_siblings(), libwps_OLE::DirTree::index(), load(), save(), and libwps_OLE::DirTree::setInRBTForm().

## ◆ m_macRootEntry

bool libwps_OLE::DirEntry::m_macRootEntry

false if invalid (should be skipped)

Referenced by DirEntry(), load(), and save().

## ◆ m_name

std::string libwps_OLE::DirEntry::m_name
| protected

the file information

Referenced by DirEntry(), filename(), load(), name(), save(), and setName().

## ◆ m_right

unsigned libwps_OLE::DirEntry::m_right

starting block

Referenced by DirEntry(), libwps_OLE::DirTree::get_siblings(), load(), save(), and libwps_OLE::DirTree::setInRBTForm().

## ◆ m_size

unsigned long libwps_OLE::DirEntry::m_size

the red/black color: 0 means red

Referenced by libwps_OLE::OStorage::addStream(), libwps_OLE::IStream::createOleFromDirectory(), DirEntry(), load(), save(), and libwps_OLE::OStorage::updateToSave().

## ◆ m_start

unsigned long libwps_OLE::DirEntry::m_start

size (not valid if directory)

Referenced by libwps_OLE::OStorage::addStream(), DirEntry(), load(), save(), and libwps_OLE::OStorage::updateToSave().

## ◆ m_type

unsigned libwps_OLE::DirEntry::m_type

true if this is a classic mac directory entry

Referenced by libwps_OLE::OStorage::addDirectory(), DirEntry(), libwps_OLE::DirTree::index(), is_dir(), load(), and save().

## ◆ m_valid

bool libwps_OLE::DirEntry::m_valid

Referenced by libwps_OLE::IStream::createOleFromDirectory(), DirEntry(), libwps_OLE::DirTree::find_child(), libwps_OLE::DirTree::getSubStreamList(), libwps_OLE::DirTree::index(), load(), and libwps_OLE::DirTree::setInRedBlackTreeForm().

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

- WPSOLEStream.cpp