NDEVR
API Documentation
InputInfoPipe

Used with InfoPipe to allow for input such as user input. More...

Inheritance diagram for InputInfoPipe:
[legend]
Collaboration diagram for InputInfoPipe:
[legend]

Public Member Functions

 InputInfoPipe ()
 Constructs a default InputInfoPipe with no associated pipe and an invalid index.
 InputInfoPipe (const InputInfoPipe &info)=delete
 Copy constructor is deleted to prevent duplicate input guard ownership.
 InputInfoPipe (const TranslatedString &name, const LogPtr &pipe)
 Constructs an InputInfoPipe from a LogPtr reference and registers an input guard.
 InputInfoPipe (const TranslatedString &name, InfoPipe &pipe)
 Constructs an InputInfoPipe from an InfoPipe reference and registers an input guard.
 InputInfoPipe (const TranslatedString &name, InfoPipe *pipe)
 Constructs an InputInfoPipe from a raw InfoPipe pointer and registers an input guard.
 ~InputInfoPipe ()
 Destructor that removes the registered input guard from the pipe.
void clearInput ()
 Clears the input buffer for this input guard without reading it.
void finish ()
 Removes the current input guard and invalidates the index.
String getInput (bool clear)
 Retrieves the current input string from the pipe.
void restart (const TranslatedString &name)
 Removes the current input guard and registers a new one with the given name.
void restart (const TranslatedString &name, InfoPipe *log)
 Removes the current input guard, reassigns the pipe, and registers a new input guard.
void setPipe (InfoPipe *pipe)
 Replaces the associated pipe, finishing the current input guard first.

Protected Attributes

uint04 m_idx
 The index of the registered input guard within the pipe.

Additional Inherited Members

Protected Member Functions inherited from LogPtr
uint04 addCancelGuard (const TranslatedString &name) final override
 If added, signals to any LogStream that cancel is enabled.
virtual uint04 addProgressSource (const TranslatedString &name, fltp04 progress) final override
 Adds a progress gaurd, which.
void removeCancelGuard (uint04 idx) final override
 If removed, signals to any LogStream that cancel is disabled, assuming there are no more cancel gaurds.

Detailed Description

Used with InfoPipe to allow for input such as user input.


Definition at line 9 of file InputInfoPipe.h.

Constructor & Destructor Documentation

◆ InputInfoPipe() [1/3]

InputInfoPipe::InputInfoPipe ( const TranslatedString & name,
InfoPipe * pipe )
inline

Constructs an InputInfoPipe from a raw InfoPipe pointer and registers an input guard.

Parameters
[in]nameThe translated display name for the input guard.
[in]pipeThe InfoPipe to associate with this input.

Definition at line 24 of file InputInfoPipe.h.

References m_idx, and name.

◆ InputInfoPipe() [2/3]

InputInfoPipe::InputInfoPipe ( const TranslatedString & name,
const LogPtr & pipe )
inline

Constructs an InputInfoPipe from a LogPtr reference and registers an input guard.

Parameters
[in]nameThe translated display name for the input guard.
[in]pipeThe LogPtr to copy pipe information from.

Definition at line 35 of file InputInfoPipe.h.

References m_idx, and name.

◆ InputInfoPipe() [3/3]

InputInfoPipe::InputInfoPipe ( const TranslatedString & name,
InfoPipe & pipe )
inline

Constructs an InputInfoPipe from an InfoPipe reference and registers an input guard.

Parameters
[in]nameThe translated display name for the input guard.
[in]pipeThe InfoPipe reference to associate with this input.

Definition at line 46 of file InputInfoPipe.h.

References m_idx, and name.

Member Function Documentation

◆ getInput()

String InputInfoPipe::getInput ( bool clear)
inline

Retrieves the current input string from the pipe.

Parameters
[in]clearWhether to clear the input buffer after reading.
Returns
The input string collected from the pipe.

Definition at line 103 of file InputInfoPipe.h.

References m_idx.

◆ restart() [1/2]

void InputInfoPipe::restart ( const TranslatedString & name)
inline

Removes the current input guard and registers a new one with the given name.

Parameters
[in]nameThe translated display name for the new input guard.

Definition at line 82 of file InputInfoPipe.h.

References m_idx, and name.

◆ restart() [2/2]

void InputInfoPipe::restart ( const TranslatedString & name,
InfoPipe * log )
inline

Removes the current input guard, reassigns the pipe, and registers a new input guard.

Parameters
[in]nameThe translated display name for the new input guard.
[in]logThe new InfoPipe to associate with this input.

Definition at line 92 of file InputInfoPipe.h.

References m_idx, and name.

◆ setPipe()

void InputInfoPipe::setPipe ( InfoPipe * pipe)
inline

Replaces the associated pipe, finishing the current input guard first.

Parameters
[in]pipeThe new InfoPipe to associate with this input.

Definition at line 65 of file InputInfoPipe.h.

References finish().


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