Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
LispifiedCommandOutputTargets Class Reference

LispifiedCommandOutputTargets is a CommandOutputTargets that replaces the status message target with the LispyCommandMessageTarget version. More...

#include <CommandTargets.h>

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

Public Member Functions

 LispifiedCommandOutputTargets (CommandOutputTargets &target)
 
 ~LispifiedCommandOutputTargets ()
 
- Public Member Functions inherited from CommandOutputTargets
 CommandOutputTargets (std::unique_ptr< CommandProgressTarget > pt=TargetFactory::ProgressDefault(), std::shared_ptr< CommandMessageTarget > st=TargetFactory::MessageDefault(), std::shared_ptr< CommandMessageTarget > et=TargetFactory::MessageDefault())
 
 ~CommandOutputTargets ()
 
void Progress (double completed)
 
void Status (const wxString &status, bool bFlush=false)
 
void Error (const wxString &message)
 
void StartArray ()
 
void EndArray ()
 
void StartStruct ()
 
void EndStruct ()
 
void StartField (const wxString &name)
 
void EndField ()
 
void AddItem (const wxString &value, const wxString &name={})
 
void AddBool (const bool value, const wxString &name={})
 
void AddItem (const double value, const wxString &name={})
 

Private Attributes

CommandOutputTargetspToRestore
 

Additional Inherited Members

- Public Attributes inherited from CommandOutputTargets
std::unique_ptr< CommandProgressTargetmProgressTarget
 
std::shared_ptr< CommandMessageTargetmStatusTarget
 
std::shared_ptr< CommandMessageTargetmErrorTarget
 

Detailed Description

LispifiedCommandOutputTargets is a CommandOutputTargets that replaces the status message target with the LispyCommandMessageTarget version.

Definition at line 359 of file CommandTargets.h.

Constructor & Destructor Documentation

◆ LispifiedCommandOutputTargets()

LispifiedCommandOutputTargets::LispifiedCommandOutputTargets ( CommandOutputTargets target)

Definition at line 259 of file CommandTargets.cpp.

261 pToRestore( &target )
262{
263 mProgressTarget = std::move(target.mProgressTarget),
264 mStatusTarget = std::make_shared<LispyCommandMessageTarget>( *target.mStatusTarget.get() ),
265 mErrorTarget = std::move( target.mErrorTarget );
266}
std::shared_ptr< CommandMessageTarget > mStatusTarget
std::unique_ptr< CommandProgressTarget > mProgressTarget
CommandOutputTargets(std::unique_ptr< CommandProgressTarget > pt=TargetFactory::ProgressDefault(), std::shared_ptr< CommandMessageTarget > st=TargetFactory::MessageDefault(), std::shared_ptr< CommandMessageTarget > et=TargetFactory::MessageDefault())
std::shared_ptr< CommandMessageTarget > mErrorTarget
CommandOutputTargets * pToRestore

References CommandOutputTargets::mErrorTarget, CommandOutputTargets::mProgressTarget, and CommandOutputTargets::mStatusTarget.

◆ ~LispifiedCommandOutputTargets()

LispifiedCommandOutputTargets::~LispifiedCommandOutputTargets ( )

Definition at line 268 of file CommandTargets.cpp.

269{
271 //The status was never captured so does not need restoring.
272 //pToRestore->mStatusTarget = std::move( mStatusTarget );
273 pToRestore->mErrorTarget = std::move( mErrorTarget );
274}

References CommandOutputTargets::mErrorTarget, CommandOutputTargets::mProgressTarget, and pToRestore.

Member Data Documentation

◆ pToRestore

CommandOutputTargets* LispifiedCommandOutputTargets::pToRestore
private

Definition at line 366 of file CommandTargets.h.

Referenced by ~LispifiedCommandOutputTargets().


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