tbx  0.7.5
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

◆ IterBlock()

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

◆ info()

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

◆ next()

bool PathInfo::Iterator::IterBlock::next ( )

Move to next record returned from OS.

Returns
true if more data to read

◆ release()

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

◆ _dirName

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

Directory name

◆ _nextRecord

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

Next record in buffer

◆ _readData

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

Buffer for read data

◆ _ref

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

Reference count

◆ _regs

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

registers for swi calls

◆ _toRead

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

Bytes left to read

◆ _wildCard

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

Wild card for searching


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