Audacity 3.2.0
Public Member Functions | List of all members
BriefCommandMessageTarget Class Reference

BriefCommandMessageTarget is a CommandOutputTarget that provides status in a briefer listing. More...

#include <CommandTargets.h>

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

Public Member Functions

 BriefCommandMessageTarget (CommandMessageTarget &target)
 
 ~BriefCommandMessageTarget () override
 
virtual void StartArray () override
 
virtual void EndArray () override
 
virtual void StartStruct () override
 
virtual void EndStruct () override
 
virtual void AddItem (const wxString &value, const wxString &name={}) override
 
virtual void AddBool (const bool value, const wxString &name={}) override
 
virtual void AddItem (const double value, const wxString &name={}) override
 
virtual void StartField (const wxString &name={}) override
 
virtual void EndField () override
 
- Public Member Functions inherited from CommandMessageTargetDecorator
 CommandMessageTargetDecorator (CommandMessageTarget &target)
 
 ~CommandMessageTargetDecorator () override
 
void Update (const wxString &message) override
 
void StartArray () override
 
void EndArray () override
 
void StartStruct () override
 
void EndStruct () override
 
void AddItem (const wxString &value, const wxString &name={}) override
 
void AddBool (const bool value, const wxString &name={}) override
 
void AddItem (const double value, const wxString &name={}) override
 
void StartField (const wxString &name={}) override
 
void EndField () override
 
void Flush () override
 
- Public Member Functions inherited from CommandMessageTarget
 CommandMessageTarget ()
 
virtual ~CommandMessageTarget ()
 
virtual void Update (const wxString &message)=0
 
virtual void StartArray ()
 
virtual void EndArray ()
 
virtual void StartStruct ()
 
virtual void EndStruct ()
 
virtual void AddItem (const wxString &value, const wxString &name={})
 
virtual void AddBool (const bool value, const wxString &name={})
 
virtual void AddItem (const double value, const wxString &name={})
 
virtual void StartField (const wxString &name={})
 
virtual void EndField ()
 
virtual void Flush ()
 
wxString Escaped (const wxString &str)
 

Additional Inherited Members

- Public Attributes inherited from CommandMessageTargetDecorator
CommandMessageTargetmTarget
 
- Public Attributes inherited from CommandMessageTarget
std::vector< int > mCounts
 

Detailed Description

BriefCommandMessageTarget is a CommandOutputTarget that provides status in a briefer listing.

Definition at line 137 of file CommandTargets.h.

Constructor & Destructor Documentation

◆ BriefCommandMessageTarget()

BriefCommandMessageTarget::BriefCommandMessageTarget ( CommandMessageTarget target)
inline

Definition at line 141 of file CommandTargets.h.

CommandMessageTargetDecorator(CommandMessageTarget &target)

◆ ~BriefCommandMessageTarget()

BriefCommandMessageTarget::~BriefCommandMessageTarget ( )
overridedefault

Member Function Documentation

◆ AddBool()

void BriefCommandMessageTarget::AddBool ( const bool  value,
const wxString &  name = {} 
)
overridevirtual

Reimplemented from CommandMessageTargetDecorator.

Definition at line 219 of file CommandTargets.cpp.

219 {
220 if( mCounts.size() <= 3 )
221 Update( wxString::Format( "%s%s", (mCounts.back()>0)?" ":"",value?"True":"False"));
222 mCounts.back() += 1;
223}
void Update(const wxString &message) override
std::vector< int > mCounts

References CommandMessageTarget::mCounts, and CommandMessageTargetDecorator::Update().

Here is the call graph for this function:

◆ AddItem() [1/2]

virtual void BriefCommandMessageTarget::AddItem ( const double  value,
const wxString &  name = {} 
)
overridevirtual

Reimplemented from CommandMessageTargetDecorator.

◆ AddItem() [2/2]

virtual void BriefCommandMessageTarget::AddItem ( const wxString &  value,
const wxString &  name = {} 
)
overridevirtual

Reimplemented from CommandMessageTargetDecorator.

◆ EndArray()

void BriefCommandMessageTarget::EndArray ( )
overridevirtual

Reimplemented from CommandMessageTargetDecorator.

Definition at line 192 of file CommandTargets.cpp.

192 {
193 if( mCounts.size() > 1 ){
194 mCounts.pop_back();
195 }
196 if( mCounts.size() <= 3 )
197 Update( " " );
198}

References CommandMessageTarget::mCounts, and CommandMessageTargetDecorator::Update().

Here is the call graph for this function:

◆ EndField()

void BriefCommandMessageTarget::EndField ( )
overridevirtual

Reimplemented from CommandMessageTargetDecorator.

Definition at line 235 of file CommandTargets.cpp.

235 {
236 if( mCounts.size() > 1 ){
237 mCounts.pop_back();
238 }
239}

References CommandMessageTarget::mCounts.

◆ EndStruct()

void BriefCommandMessageTarget::EndStruct ( )
overridevirtual

Reimplemented from CommandMessageTargetDecorator.

Definition at line 207 of file CommandTargets.cpp.

207 {
208 if( mCounts.size() > 1 ){
209 mCounts.pop_back();
210 }
211 if( mCounts.size() <= 3 )
212 Update( " " );
213}

References CommandMessageTarget::mCounts, and CommandMessageTargetDecorator::Update().

Here is the call graph for this function:

◆ StartArray()

void BriefCommandMessageTarget::StartArray ( )
overridevirtual

Reimplemented from CommandMessageTargetDecorator.

Definition at line 182 of file CommandTargets.cpp.

183{
184 wxString Padding;
185 Padding.Pad( mCounts.size() *2 -2);
186 if( mCounts.size() <= 3 )
187 Update( wxString::Format( "%s%s ", ( mCounts.back() > 0 ) ? " \n" : "", Padding ));
188 mCounts.back() += 1;
189 mCounts.push_back( 0 );
190}

References CommandMessageTarget::mCounts, anonymous_namespace{CommonTrackInfo.cpp}::Padding, and CommandMessageTargetDecorator::Update().

Here is the call graph for this function:

◆ StartField()

void BriefCommandMessageTarget::StartField ( const wxString &  name = {})
overridevirtual

Reimplemented from CommandMessageTargetDecorator.

Definition at line 230 of file CommandTargets.cpp.

230 {
231 mCounts.back() += 1;
232 mCounts.push_back( 0 );
233}

References CommandMessageTarget::mCounts.

◆ StartStruct()

void BriefCommandMessageTarget::StartStruct ( )
overridevirtual

Reimplemented from CommandMessageTargetDecorator.

Definition at line 199 of file CommandTargets.cpp.

199 {
200 wxString Padding;
201 Padding.Pad( mCounts.size() *2 -2);
202 if( mCounts.size() <= 3 )
203 Update( wxString::Format( "%s%s ", ( mCounts.back() > 0 ) ? " \n" : "", Padding ));
204 mCounts.back() += 1;
205 mCounts.push_back( 0 );
206}

References CommandMessageTarget::mCounts, anonymous_namespace{CommonTrackInfo.cpp}::Padding, and CommandMessageTargetDecorator::Update().

Here is the call graph for this function:

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