Audacity  3.0.3
Public Member Functions | Public Attributes | List of all members
ShuttleCli Class Referencefinal

Derived from Shuttle, this class exchanges string parameters with a binary representation. More...

#include <Shuttle.h>

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

Public Member Functions

 ShuttleCli ()
 
virtual ~ShuttleCli ()
 
bool ExchangeWithMaster (const wxString &Name) override
 
- Public Member Functions inherited from Shuttle
 Shuttle ()
 
virtual ~Shuttle ()
 
virtual bool TransferBool (const wxString &Name, bool &bValue, const bool &bDefault)
 
virtual bool TransferFloat (const wxString &Name, float &fValue, const float &fDefault)
 
virtual bool TransferDouble (const wxString &Name, double &dValue, const double &dDefault)
 
virtual bool TransferInt (const wxString &Name, int &iValue, const int &iDefault)
 
virtual bool TransferInt (const wxString &Name, wxLongLong_t &iValue, const wxLongLong_t &iDefault)
 
virtual bool TransferLongLong (const wxString &Name, wxLongLong_t &iValue, const wxLongLong_t &iDefault)
 
virtual bool TransferString (const wxString &Name, wxString &strValue, const wxString &strDefault)
 
virtual bool TransferEnum (const wxString &Name, int &iValue, const int nChoices, const wxString *pFirstStr)
 
virtual bool TransferWrappedType (const wxString &Name, WrappedType &W)
 

Public Attributes

wxString mParams
 
- Public Attributes inherited from Shuttle
bool mbStoreInClient
 
wxString mValueString
 

Detailed Description

Derived from Shuttle, this class exchanges string parameters with a binary representation.

See also
ShuttleBase
ShuttleGui

Definition at line 45 of file Shuttle.h.

Constructor & Destructor Documentation

◆ ShuttleCli()

ShuttleCli::ShuttleCli ( )
inline

Definition at line 49 of file Shuttle.h.

49 {}

◆ ~ShuttleCli()

virtual ShuttleCli::~ShuttleCli ( )
inlinevirtual

Definition at line 50 of file Shuttle.h.

50 {}

Member Function Documentation

◆ ExchangeWithMaster()

bool ShuttleCli::ExchangeWithMaster ( const wxString &  Name)
overridevirtual

Reimplemented from Shuttle.

Definition at line 269 of file Shuttle.cpp.

270 {
271  if( !mbStoreInClient )
272  {
273  mParams += wxT(" ");
274  mParams +=Name;
275  mParams += wxT("=");
277  }
278  else
279  {
280  int i;
281  mParams = wxT(" ")+mParams;
282  i=mParams.Find( wxT(" ")+Name+wxT("=") );
283  if( i>=0 )
284  {
285  int j=i+2+Name.length();
286  wxString terminator = wxT(' ');
287  if(mParams.GetChar(j) == wxT('"')) //Strings are surrounded by quotes
288  {
289  terminator = wxT('"');
290  j++;
291  }
292  else if(mParams.GetChar(j) == wxT('\'')) // or by single quotes.
293  {
294  terminator = wxT('\'');
295  j++;
296  }
297  i=j;
298  while( j<(int)mParams.length() && mParams.GetChar(j) != terminator )
299  j++;
300  mValueString = mParams.Mid(i,j-i);
301  return true;
302  }
303  return false;
304  }
305  return true;
306 }

References Shuttle::mbStoreInClient, mParams, and Shuttle::mValueString.

Member Data Documentation

◆ mParams

wxString ShuttleCli::mParams

Definition at line 48 of file Shuttle.h.

Referenced by CommandBuilder::BuildCommand(), and ExchangeWithMaster().


The documentation for this class was generated from the following files:
ShuttleCli::mParams
wxString mParams
Definition: Shuttle.h:48
Shuttle::mValueString
wxString mValueString
Definition: Shuttle.h:27
Shuttle::mbStoreInClient
bool mbStoreInClient
Definition: Shuttle.h:26