tbx  0.7.3
Public Types | Public Member Functions | Public Attributes | List of all members
tbx::PathInfo::Iterator::IterBlock Class Reference

Low level class to deal with the file iteration kernel calls. More...

#include <path.h>

Public Types

enum  { _readSize = 2048 }
 

Public Member Functions

 IterBlock (const std::string &dirName, const char *wildCard)
 Constructe Iterator block for given directory and file name. More...
 
bool next ()
 Move to next record returned from OS. More...
 
const char * next_record () const
 Return next record from iteration block.
 
bool info (PathInfo &info)
 Get path information for iterator block. More...
 
void add_ref ()
 Increase reference count on this block.
 
void release ()
 Decrease reference count on this block. More...
 

Public Attributes

int _ref
 
_kernel_swi_regs _regs
 
char * _dirName
 
char * _wildCard
 
char _readData [_readSize]
 
int _toRead
 
char * _nextRecord
 

Detailed Description

Low level class to deal with the file iteration kernel calls.

Constructor & Destructor Documentation

PathInfo::Iterator::IterBlock::IterBlock ( const std::string &  dirName,
const char *  wildCard 
)

Constructe Iterator block for given directory and file name.

Parameters
dirNamedirectory name
wildCardWild card for search

Member Function Documentation

bool PathInfo::Iterator::IterBlock::info ( PathInfo info)

Get path information for iterator block.

Parameters
infoupdated with path information if any
Returns
true if there is more path information
bool PathInfo::Iterator::IterBlock::next ( )

Move to next record returned from OS.

Returns
true if more data to read
void tbx::PathInfo::Iterator::IterBlock::release ( )
inline

Decrease reference count on this block.

If the reference count reaches zero it will be deleted

Member Data Documentation

char* tbx::PathInfo::Iterator::IterBlock::_dirName

Directory name

char* tbx::PathInfo::Iterator::IterBlock::_nextRecord

Next record in buffer

char tbx::PathInfo::Iterator::IterBlock::_readData[_readSize]

Buffer for read data

int tbx::PathInfo::Iterator::IterBlock::_ref

Reference count

_kernel_swi_regs tbx::PathInfo::Iterator::IterBlock::_regs

registers for swi calls

int tbx::PathInfo::Iterator::IterBlock::_toRead

Bytes left to read

char* tbx::PathInfo::Iterator::IterBlock::_wildCard

Wild card for searching


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