CLI  2.9
ExecutionContextManager Class Reference

Execution context manager class. More...

#include <exec_context_manager.h>

Public Member Functions

 ExecutionContextManager (void)
 Default constructor. More...
 
virtual ~ExecutionContextManager (void)
 Destructor. More...
 
void UseInstance (ExecutionContext &CLI_UserInstance)
 Instance registration. More...
 
void FreeInstance (ExecutionContext &CLI_UserInstance)
 Instance deregistration. More...
 
void StopAllExecutions (void)
 Stop execution of all running contexts. More...
 
const bool OpenUp (ExecutionContext &CLI_Context, IODevice &CLI_IODevice)
 Assumes input and output devices to be ready for execution. More...
 
const bool CloseDown (ExecutionContext &CLI_Context)
 Release input and output devices after execution. More...
 
const bool IsRunning (void) const
 Determines whether the execution context manager is currently running. More...
 
const bool IsRunning (const ExecutionContext &CLI_Context) const
 Determines whether the given execution context is currently running. More...
 
ExecutionContext *const GetCurrentContext (void)
 Returns the current execution context. More...
 
const IODeviceGetInput (void) const
 Input stream accessor. More...
 
const OutputDeviceGetStream (const STREAM_TYPE E_StreamType) const
 Output stream accessor. More...
 
const bool SetStream (const STREAM_TYPE E_StreamType, OutputDevice &CLI_Stream)
 Output stream positionning. More...
 
const bool StreamEnabled (const STREAM_TYPE E_StreamType) const
 Enabled/disabled stream accessor. More...
 
const bool EnableStream (const STREAM_TYPE E_StreamType, const bool B_Enable)
 Enable/disable stream. More...
 
void SetLang (const ResourceString::LANG E_Lang)
 Language setting. More...
 
const ResourceString::LANG GetLang (void) const
 Language access. More...
 
void SetBeep (const bool B_Enable)
 Beep configuration setting. More...
 
const bool GetBeep (void) const
 Beep configuration access. More...
 
void Beep (void)
 Sends a beep signal. More...
 

Static Public Member Functions

static const TraceClassGetTraceClass (void)
 Execution context trace class singleton. More...
 

Detailed Description

Execution context manager class.

Definition at line 51 of file exec_context_manager.h.

Constructor & Destructor Documentation

◆ ExecutionContextManager()

ExecutionContextManager::ExecutionContextManager ( void  )
explicit

Default constructor.

◆ ~ExecutionContextManager()

virtual ExecutionContextManager::~ExecutionContextManager ( void  )
virtual

Destructor.

Member Function Documentation

◆ Beep()

void ExecutionContextManager::Beep ( void  )

Sends a beep signal.

◆ CloseDown()

const bool ExecutionContextManager::CloseDown ( ExecutionContext CLI_Context)

Release input and output devices after execution.

Returns
true for success, false otherwise.
Parameters
CLI_ContextExecution context terminating its execution.

◆ EnableStream()

const bool ExecutionContextManager::EnableStream ( const STREAM_TYPE  E_StreamType,
const bool  B_Enable 
)

Enable/disable stream.

Returns
true for success, false otherwise.
Parameters
E_StreamTypeOutput stream identifier.
B_EnableEnable flag.

◆ FreeInstance()

void ExecutionContextManager::FreeInstance ( ExecutionContext CLI_UserInstance)

Instance deregistration.

Warning
Shall auto-delete the manager when no more instances registered.
Parameters
CLI_UserInstanceInstance to deregister.

◆ GetBeep()

const bool ExecutionContextManager::GetBeep ( void  ) const

Beep configuration access.

Returns
The current beep configuration. true if enabled, false otherwise.

◆ GetCurrentContext()

ExecutionContext* const ExecutionContextManager::GetCurrentContext ( void  )

Returns the current execution context.

Returns
Current execution context if any, NULL otherwise.

◆ GetInput()

const IODevice& ExecutionContextManager::GetInput ( void  ) const

Input stream accessor.

Returns
Input stream reference.

◆ GetLang()

const ResourceString::LANG ExecutionContextManager::GetLang ( void  ) const

Language access.

Returns
The language currently set.

◆ GetStream()

const OutputDevice& ExecutionContextManager::GetStream ( const STREAM_TYPE  E_StreamType) const

Output stream accessor.

Returns
Output stream reference.
Parameters
E_StreamTypeOutput stream identifier.

◆ GetTraceClass()

static const TraceClass& ExecutionContextManager::GetTraceClass ( void  )
static

Execution context trace class singleton.

Returns
Execution context trace class instance.

◆ IsRunning() [1/2]

const bool ExecutionContextManager::IsRunning ( void  ) const

Determines whether the execution context manager is currently running.

Returns
true if the execution context manager is currently running, false otherwise.

◆ IsRunning() [2/2]

const bool ExecutionContextManager::IsRunning ( const ExecutionContext CLI_Context) const

Determines whether the given execution context is currently running.

Returns
true if the given execution context is currently running, false otherwise.
Parameters
CLI_ContextExecution context to look for execution.

◆ OpenUp()

const bool ExecutionContextManager::OpenUp ( ExecutionContext CLI_Context,
IODevice CLI_IODevice 
)

Assumes input and output devices to be ready for execution.

Returns
true for success, false otherwise.
Parameters
CLI_ContextExecution context starting its execution.
CLI_IODeviceInput/output device to run onto.

◆ SetBeep()

void ExecutionContextManager::SetBeep ( const bool  B_Enable)

Beep configuration setting.

Parameters
B_EnableNew value.

◆ SetLang()

void ExecutionContextManager::SetLang ( const ResourceString::LANG  E_Lang)

Language setting.

Parameters
E_LangNew value.

◆ SetStream()

const bool ExecutionContextManager::SetStream ( const STREAM_TYPE  E_StreamType,
OutputDevice CLI_Stream 
)

Output stream positionning.

Returns
true for success, false otherwise.
Warning
Please ensure one of the following conditions regarding the given device:
  • Either the device is an auto-deleted device,
  • or it will be destroyed after this execution context object,
  • or another call to this method with the null device is done on termination. Otherwise you could experience consistency troubles. The null device and standard devices are not subject to this remark.
Parameters
E_StreamTypeOutput stream identifier.
CLI_StreamStream reference.

◆ StopAllExecutions()

void ExecutionContextManager::StopAllExecutions ( void  )

Stop execution of all running contexts.

◆ StreamEnabled()

const bool ExecutionContextManager::StreamEnabled ( const STREAM_TYPE  E_StreamType) const

Enabled/disabled stream accessor.

Returns
true if the stream is enabled, false otherwise.
Parameters
E_StreamTypeOutput stream identifier.

◆ UseInstance()

void ExecutionContextManager::UseInstance ( ExecutionContext CLI_UserInstance)

Instance registration.

Parameters
CLI_UserInstanceInstance to register.

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