Audacity  3.0.3
Public Member Functions | Private Attributes | List of all members
Identifier Class Reference

#include <Types.h>

Inheritance diagram for Identifier:
[legend]

Public Member Functions

 Identifier ()=default
 
 Identifier (const wxString &str)
 
 Identifier (const wxChar *str)
 
 Identifier (const char *str)
 
 Identifier (const Identifier &)=default
 
Identifieroperator= (const Identifier &)=default
 
 Identifier (wxString &&str)
 
 Identifier (Identifier &&id)
 
Identifieroperator= (Identifier &&id)
 
void swap (Identifier &id)
 
 Identifier (std::initializer_list< Identifier > components, wxChar separator)
 
bool empty () const
 
size_t size () const
 
size_t length () const
 
const wxString & GET () const
 
std::vector< Identifiersplit (wxChar separator) const
 

Private Attributes

wxString value
 

Detailed Description

Definition at line 63 of file Types.h.

Constructor & Destructor Documentation

◆ Identifier() [1/8]

Identifier::Identifier ( )
default

◆ Identifier() [2/8]

Identifier::Identifier ( const wxString &  str)
inline

Definition at line 70 of file Types.h.

70 : value{ str } {}

◆ Identifier() [3/8]

Identifier::Identifier ( const wxChar *  str)
inline

Definition at line 73 of file Types.h.

73 : value{ str } {}

◆ Identifier() [4/8]

Identifier::Identifier ( const char *  str)
inline

Definition at line 76 of file Types.h.

76 : value{ str } {}

◆ Identifier() [5/8]

Identifier::Identifier ( const Identifier )
default

◆ Identifier() [6/8]

Identifier::Identifier ( wxString &&  str)
inline

Definition at line 83 of file Types.h.

84  { value.swap( str ); }

◆ Identifier() [7/8]

Identifier::Identifier ( Identifier &&  id)
inline

Definition at line 85 of file Types.h.

86  { swap( id ); }

◆ Identifier() [8/8]

Identifier::Identifier ( std::initializer_list< Identifier components,
wxChar  separator 
)
explicit

Definition at line 283 of file Internat.cpp.

285 {
286  if( components.size() < 2 )
287  {
288  wxASSERT( false );
289  return;
290  }
291  auto iter = components.begin(), end = components.end();
292  value = (*iter++).value;
293  while (iter != end)
294  value += separator + (*iter++).value;
295 }

References value.

Member Function Documentation

◆ empty()

bool Identifier::empty ( ) const
inline

Definition at line 104 of file Types.h.

104 { return value.empty(); }

References value.

Referenced by anonymous_namespace{Registry.cpp}::CollectItem(), GetInfoCommand::ExploreMenu(), CommandManager::FormatLabelForMenu(), CommandManager::FormatLabelWithDisabledAccel(), EffectManager::GetEffectByIdentifier(), CommandManager::HandleTextualCommand(), MacrosWindow::InsertCommandAt(), and CommandManager::NewIdentifier().

Here is the caller graph for this function:

◆ GET()

const wxString& Identifier::GET ( ) const
inline

◆ length()

size_t Identifier::length ( ) const
inline

Definition at line 106 of file Types.h.

106 { return value.length(); }

References value.

◆ operator=() [1/2]

Identifier& Identifier::operator= ( const Identifier )
default

◆ operator=() [2/2]

Identifier& Identifier::operator= ( Identifier &&  id)
inline

Definition at line 87 of file Types.h.

88  {
89  if ( this != &id )
90  value.clear(), swap( id );
91  return *this;
92  }

References swap(), and value.

Here is the call graph for this function:

◆ size()

size_t Identifier::size ( ) const
inline

Definition at line 105 of file Types.h.

105 { return value.size(); }

References value.

◆ split()

std::vector< Identifier > Identifier::split ( wxChar  separator) const

Definition at line 297 of file Internat.cpp.

298 {
299  auto strings = ::wxSplit( value, separator );
300  return { strings.begin(), strings.end() };
301 }

References value.

◆ swap()

void Identifier::swap ( Identifier id)
inline

Definition at line 95 of file Types.h.

95 { value.swap( id.value ); }

References value.

Referenced by TaggedIdentifier< Tag, CaseSensitive >::Identifier(), and operator=().

Here is the caller graph for this function:

Member Data Documentation

◆ value

wxString Identifier::value
private

The documentation for this class was generated from the following files:
Identifier::value
wxString value
Definition: Types.h:115
Identifier::swap
void swap(Identifier &id)
Definition: Types.h:95