ldas-tools-al 2.6.7
 
Loading...
Searching...
No Matches
Directory::Internals Class Reference
Inheritance diagram for Directory::Internals:
Collaboration diagram for Directory::Internals:

Public Types

enum  mode_type { MODE_BLOCK_READ , MODE_OPEN , MODE_CLOSE , MODE_NEXT }
 
enum  state_type {
  STATE_OPEN , STATE_OPENING , STATE_READING , STATE_CLOSING ,
  STATE_CLOSED
}
 
typedef boost::shared_ptr< char > name_type
 
typedef boost::shared_ptr< char > name_type
 
typedef Thread::cancel_type cancel_method
 
typedef Thread::cancel_type cancel_method
 
typedef Thread::signal_type signal_type
 Data class for passing signal information.
 
typedef Thread::signal_type signal_type
 Data class for passing signal information.
 

Public Member Functions

 Internals ()
 
virtual ~Internals ()
 
void DirectoryName (const std::string &Name)
 Store the name of the directory to be read.
 
state_type State () const
 Return the current directory state.
 
void State (state_type State)
 Establish the state of the object;.
 
const std::string & DirName () const
 
int Fd () const
 
const char * Filename () const
 Obtain the name of the file in the directory buffer.
 
int Eval (mode_type Mode)
 
virtual bool makeAvailable () const
 Test if the object should be made immediate available.
 
int SystemErrNo () const
 Return the thread specific value of errno.
 
int SystemErrNo () const
 Return the thread specific value of errno.
 
int SystemReturnCode () const
 Return the return code of the system call.
 
int SystemReturnCode () const
 Return the return code of the system call.
 
MutexLock::baton_type Baton () const
 Retrieve baton to gain exclusive access.
 
MutexLock::baton_type Baton () const
 Retrieve baton to gain exclusive access.
 
cancel_method CancelMethod () const
 Retrieve method to use for terminating the task.
 
cancel_method CancelMethod () const
 Retrieve method to use for terminating the task.
 
signal_type CancelSignal () const
 Retrieve signal to use for terminating the task.
 
signal_type CancelSignal () const
 Retrieve signal to use for terminating the task.
 
bool DeleteOnCompletion () const
 Retrieve state information concearning deletion.
 
bool DeleteOnCompletion () const
 Retrieve state information concearning deletion.
 
virtual void OnCompletion (int TaskThreadState)
 Action to be done when task completes.
 
virtual void OnCompletion (int TaskThreadState)
 Action to be done when task completes.
 
name_type TaskName () const
 Get the name of the current task.
 
name_type TaskName () const
 Get the name of the current task.
 

Public Attributes

mode_type m_mode
 
union { 
 
   bool   next 
 
m_retval 
 
block_read_type m_block_read
 

Static Public Attributes

static int m_wait_time_max = 20
 

Protected Member Functions

virtual int eval ()
 Do the system call.
 
state_type stateNoLock () const
 
void stateNoLock (state_type State)
 
void taskName (const std::string &Name)
 
void taskName (const std::string &Name)
 
void delete_on_completion (bool Value)
 
void delete_on_completion (bool Value)
 

Protected Attributes

int m_returnCode
 Return code of the system call.
 
int m_errNo
 Thread specific value of errno at time of exit.
 

Private Member Functions

void mode (mode_type Mode)
 
virtual void operator() ()
 Setup the running of the system call.
 
virtual void operator() ()
 Action to perform.
 

Private Attributes

std::string m_dirname
 
DIR * m_dirp
 
int m_fd
 
union { 
 
   dirent_type   entry 
 
   char   padding [8 *1024] 
 
m_buffer 
 
state_type m_state
 
MutexLock::baton_type m_state_baton
 
name_type name
 
std::unique_ptr< _p_type_p
 

Member Typedef Documentation

◆ cancel_method [1/2]

◆ cancel_method [2/2]

◆ name_type [1/2]

typedef boost::shared_ptr< char > LDASTools::AL::Task::name_type
inherited

◆ name_type [2/2]

typedef boost::shared_ptr< char > LDASTools::AL::Task::name_type
inherited

◆ signal_type [1/2]

Data class for passing signal information.

◆ signal_type [2/2]

Data class for passing signal information.

Member Enumeration Documentation

◆ mode_type

Enumerator
MODE_BLOCK_READ 
MODE_OPEN 
MODE_CLOSE 
MODE_NEXT 

◆ state_type

Enumerator
STATE_OPEN 
STATE_OPENING 
STATE_READING 
STATE_CLOSING 
STATE_CLOSED 

Constructor & Destructor Documentation

◆ Internals()

LDASTools::AL::Directory::Internals::Internals ( )

◆ ~Internals()

LDASTools::AL::Directory::Internals::~Internals ( )
virtual

Member Function Documentation

◆ Baton() [1/2]

MutexLock::baton_type LDASTools::AL::Task::Baton ( ) const
inherited

Retrieve baton to gain exclusive access.

◆ Baton() [2/2]

MutexLock::baton_type LDASTools::AL::Task::Baton ( ) const
inherited

Retrieve baton to gain exclusive access.

◆ CancelMethod() [1/2]

Task::cancel_method LDASTools::AL::Task::CancelMethod ( ) const
inherited

Retrieve method to use for terminating the task.

Returns
The method to be used to terminate the task.

◆ CancelMethod() [2/2]

cancel_method LDASTools::AL::Task::CancelMethod ( ) const
inherited

Retrieve method to use for terminating the task.

Returns
The method to be used to terminate the task.

◆ CancelSignal() [1/2]

Task::signal_type LDASTools::AL::Task::CancelSignal ( ) const
inherited

Retrieve signal to use for terminating the task.

Returns
The signal to be used to terminate the task.

◆ CancelSignal() [2/2]

signal_type LDASTools::AL::Task::CancelSignal ( ) const
inherited

Retrieve signal to use for terminating the task.

Returns
The signal to be used to terminate the task.

◆ delete_on_completion() [1/2]

void LDASTools::AL::Task::delete_on_completion ( bool Value)
protectedinherited

◆ delete_on_completion() [2/2]

void LDASTools::AL::Task::delete_on_completion ( bool Value)
protectedinherited

◆ DeleteOnCompletion() [1/2]

bool LDASTools::AL::Task::DeleteOnCompletion ( ) const
inherited

Retrieve state information concearning deletion.

Returns
True if the task should be deleted once terminated.

◆ DeleteOnCompletion() [2/2]

bool LDASTools::AL::Task::DeleteOnCompletion ( ) const
inherited

Retrieve state information concearning deletion.

Returns
True if the task should be deleted once terminated.

◆ DirectoryName()

void LDASTools::AL::Directory::Internals::DirectoryName ( const std::string & Name)
inline

Store the name of the directory to be read.

◆ DirName()

const std::string & LDASTools::AL::Directory::Internals::DirName ( ) const
inline

◆ Eval()

int LDASTools::AL::Directory::Internals::Eval ( mode_type Mode)
inline

◆ eval()

int LDASTools::AL::Directory::Internals::eval ( )
protectedvirtual

Do the system call.

Returns
Upon successful completion, the value zero is returned. Upon failure, the value -1 is returned and errno is set.

Implements LDASTools::AL::SystemCallTask.

◆ Fd()

int LDASTools::AL::Directory::Internals::Fd ( ) const
inline

◆ Filename()

const char * LDASTools::AL::Directory::Internals::Filename ( ) const
inline

Obtain the name of the file in the directory buffer.

◆ makeAvailable()

bool LDASTools::AL::Directory::Internals::makeAvailable ( ) const
virtual

Test if the object should be made immediate available.

Virtual method called to test if object should be made immedately available.

Returns
True if the object can be immediately reused.

Reimplemented from LDASTools::AL::TriStateInterface.

◆ mode()

void LDASTools::AL::Directory::Internals::mode ( mode_type Mode)
inlineprivate

◆ OnCompletion() [1/2]

void LDASTools::AL::Task::OnCompletion ( int TaskThreadState)
virtualinherited

Action to be done when task completes.

This function is called regardless of why the task was terminated. It allows for any special cleanup or other action that needs to happen at the end of a task regardless of why the task terminated.

◆ OnCompletion() [2/2]

virtual void LDASTools::AL::Task::OnCompletion ( int TaskThreadState)
virtualinherited

Action to be done when task completes.

◆ operator()() [1/2]

void LDASTools::AL::SystemCallTask::operator() ( )
privatevirtualinherited

Setup the running of the system call.

Implements LDASTools::AL::Task.

◆ operator()() [2/2]

virtual void LDASTools::AL::SystemCallTask::operator() ( )
privatevirtualinherited

Action to perform.

Implements LDASTools::AL::Task.

◆ State() [1/2]

Directory::Internals::state_type LDASTools::AL::Directory::Internals::State ( ) const
inline

Return the current directory state.

◆ State() [2/2]

void LDASTools::AL::Directory::Internals::State ( state_type State)
inline

Establish the state of the object;.

◆ stateNoLock() [1/2]

Directory::Internals::state_type LDASTools::AL::Directory::Internals::stateNoLock ( ) const
inlineprotected

◆ stateNoLock() [2/2]

void LDASTools::AL::Directory::Internals::stateNoLock ( state_type State)
inlineprotected

◆ SystemErrNo() [1/2]

int LDASTools::AL::SystemCall::SystemErrNo ( ) const
inlineinherited

Return the thread specific value of errno.

◆ SystemErrNo() [2/2]

int LDASTools::AL::SystemCall::SystemErrNo ( ) const
inherited

Return the thread specific value of errno.

◆ SystemReturnCode() [1/2]

int LDASTools::AL::SystemCall::SystemReturnCode ( ) const
inlineinherited

Return the return code of the system call.

◆ SystemReturnCode() [2/2]

int LDASTools::AL::SystemCall::SystemReturnCode ( ) const
inherited

Return the return code of the system call.

◆ TaskName() [1/2]

Task::name_type LDASTools::AL::Task::TaskName ( ) const
inlineinherited

Get the name of the current task.

◆ TaskName() [2/2]

name_type LDASTools::AL::Task::TaskName ( ) const
inherited

Get the name of the current task.

◆ taskName() [1/2]

void LDASTools::AL::Task::taskName ( const std::string & Name)
inlineprotectedinherited

◆ taskName() [2/2]

void LDASTools::AL::Task::taskName ( const std::string & Name)
protectedinherited

Member Data Documentation

◆ _p

std::unique_ptr< _p_type > LDASTools::AL::Task::_p
privateinherited

◆ entry

dirent_type LDASTools::AL::Directory::Internals::entry

◆ m_block_read

block_read_type LDASTools::AL::Directory::Internals::m_block_read

◆ [union]

union { ... } LDASTools::AL::Directory::Internals::m_buffer

◆ m_dirname

std::string LDASTools::AL::Directory::Internals::m_dirname
private

◆ m_dirp

DIR* LDASTools::AL::Directory::Internals::m_dirp
private

◆ m_errNo

int LDASTools::AL::SystemCall::m_errNo
protectedinherited

Thread specific value of errno at time of exit.

This allows for the thread specific errno value to be known outside of the calling thread. It is most benificial for error recovery as some conditions should cause a retry.

◆ m_fd

int LDASTools::AL::Directory::Internals::m_fd
private

◆ m_mode

mode_type LDASTools::AL::Directory::Internals::m_mode

◆ m_returnCode

int LDASTools::AL::SystemCall::m_returnCode
protectedinherited

Return code of the system call.

This is the return code returned by the system call as defined by the system call's documentation.

◆ [union]

union { ... } LDASTools::AL::Directory::Internals::m_retval

◆ m_state

state_type LDASTools::AL::Directory::Internals::m_state
private

◆ m_state_baton

MutexLock::baton_type LDASTools::AL::Directory::Internals::m_state_baton
mutableprivate

◆ m_wait_time_max

int LDASTools::AL::Directory::Internals::m_wait_time_max = 20
static

◆ name

name_type LDASTools::AL::Task::name
privateinherited

◆ next

bool LDASTools::AL::Directory::Internals::next

◆ padding

char LDASTools::AL::Directory::Internals::padding[8 *1024]

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