Audacity  2.2.2
Public Member Functions | Private Attributes | List of all members
CommandOutputTarget Class Reference

#include <CommandTargets.h>

Public Member Functions

 CommandOutputTarget (std::unique_ptr< CommandProgressTarget > &&pt=TargetFactory::ProgressDefault(), std::shared_ptr< CommandMessageTarget > &&st=TargetFactory::MessageDefault(), std::shared_ptr< CommandMessageTarget > &&et=TargetFactory::MessageDefault())
 
 ~CommandOutputTarget ()
 
void Progress (double completed)
 
void Status (const wxString &status)
 
void Error (const wxString &message)
 

Private Attributes

std::unique_ptr
< CommandProgressTarget
mProgressTarget
 
std::shared_ptr
< CommandMessageTarget
mStatusTarget
 
std::shared_ptr
< CommandMessageTarget
mErrorTarget
 

Detailed Description

Used to aggregate the various output targets a command may have. Assumes responsibility for pointers passed into it.

Definition at line 186 of file CommandTargets.h.

Constructor & Destructor Documentation

CommandOutputTarget::CommandOutputTarget ( std::unique_ptr< CommandProgressTarget > &&  pt = TargetFactory::ProgressDefault(),
std::shared_ptr< CommandMessageTarget > &&  st = TargetFactory::MessageDefault(),
std::shared_ptr< CommandMessageTarget > &&  et = TargetFactory::MessageDefault() 
)
inline

Definition at line 193 of file CommandTargets.h.

196  : mProgressTarget(std::move(pt)), mStatusTarget(st), mErrorTarget(et)
197  { }
std::shared_ptr< CommandMessageTarget > mErrorTarget
std::unique_ptr< CommandProgressTarget > mProgressTarget
std::shared_ptr< CommandMessageTarget > mStatusTarget
CommandOutputTarget::~CommandOutputTarget ( )
inline

Definition at line 198 of file CommandTargets.h.

199  {
200  }

Member Function Documentation

void CommandOutputTarget::Error ( const wxString &  message)
inline

Definition at line 211 of file CommandTargets.h.

References mErrorTarget.

212  {
213  if (mErrorTarget)
214  mErrorTarget->Update(message);
215  }
std::shared_ptr< CommandMessageTarget > mErrorTarget
void CommandOutputTarget::Progress ( double  completed)
inline

Definition at line 201 of file CommandTargets.h.

References mProgressTarget.

202  {
203  if (mProgressTarget)
204  mProgressTarget->Update(completed);
205  }
std::unique_ptr< CommandProgressTarget > mProgressTarget
void CommandOutputTarget::Status ( const wxString &  status)
inline

Definition at line 206 of file CommandTargets.h.

References mStatusTarget.

207  {
208  if (mStatusTarget)
209  mStatusTarget->Update(status);
210  }
std::shared_ptr< CommandMessageTarget > mStatusTarget

Member Data Documentation

std::shared_ptr<CommandMessageTarget> CommandOutputTarget::mErrorTarget
private

Definition at line 191 of file CommandTargets.h.

Referenced by Error().

std::unique_ptr<CommandProgressTarget> CommandOutputTarget::mProgressTarget
private

Definition at line 189 of file CommandTargets.h.

Referenced by Progress().

std::shared_ptr<CommandMessageTarget> CommandOutputTarget::mStatusTarget
private

Definition at line 190 of file CommandTargets.h.

Referenced by Status().


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