Audacity 3.2.0
Public Member Functions | Public Attributes | List of all members
anonymous_namespace{CommandBuilder.cpp}::ShuttleCli Struct Referencefinal

Public Member Functions

bool TransferString (const wxString &Name, wxString &strValue)
 
bool ExchangeWithMaster (const wxString &Name)
 

Public Attributes

wxString mValueString
 
wxString mParams
 

Detailed Description

Definition at line 88 of file CommandBuilder.cpp.

Member Function Documentation

◆ ExchangeWithMaster()

bool anonymous_namespace{CommandBuilder.cpp}::ShuttleCli::ExchangeWithMaster ( const wxString &  Name)

Definition at line 101 of file CommandBuilder.cpp.

102{
103 int i;
104 mParams = L" " + mParams;
105 i = mParams.Find( L" " + Name + L"=" );
106 if( i >= 0 ){
107 int j = i + 2 + Name.Length();
108 wxString terminator = L' ';
109 if (mParams.GetChar(j) == L'"') //Strings are surrounded by quotes
110 {
111 terminator = L'"';
112 j++;
113 }
114 else if(mParams.GetChar(j) == L'\'') // or by single quotes.
115 {
116 terminator = L'\'';
117 j++;
118 }
119 i = j;
120 while( j<(int)mParams.Length() && mParams.GetChar(j) != terminator )
121 j++;
122 mValueString = mParams.Mid(i, j - i);
123 return true;
124 }
125 return false;
126}

◆ TransferString()

bool anonymous_namespace{CommandBuilder.cpp}::ShuttleCli::TransferString ( const wxString &  Name,
wxString &  strValue 
)

Definition at line 128 of file CommandBuilder.cpp.

129{
130 if( ExchangeWithMaster(Name)) {
131 strValue = mValueString;
132 return true;
133 }
134 else
135 return false;
136}

Member Data Documentation

◆ mParams

wxString anonymous_namespace{CommandBuilder.cpp}::ShuttleCli::mParams

Definition at line 92 of file CommandBuilder.cpp.

◆ mValueString

wxString anonymous_namespace{CommandBuilder.cpp}::ShuttleCli::mValueString

Definition at line 90 of file CommandBuilder.cpp.


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