Audacity  2.2.2
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:
Shuttle

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 46 of file Shuttle.h.

Constructor & Destructor Documentation

ShuttleCli::ShuttleCli ( )
inline

Definition at line 50 of file Shuttle.h.

References mParams.

50 { mParams = wxT("") ;}
wxString mParams
Definition: Shuttle.h:49
virtual ShuttleCli::~ShuttleCli ( )
inlinevirtual

Definition at line 51 of file Shuttle.h.

51 {}

Member Function Documentation

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

Reimplemented from Shuttle.

Definition at line 271 of file Shuttle.cpp.

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

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

Member Data Documentation

wxString ShuttleCli::mParams

Definition at line 49 of file Shuttle.h.

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


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