Audacity 3.2.0
Namespaces | Functions | Variables
Tags.cpp File Reference
#include "Tags.h"
#include <wx/wxprec.h>
#include <wx/setup.h>
#include <wx/log.h>
#include "FileNames.h"
#include "Prefs.h"
#include "Project.h"
Include dependency graph for Tags.cpp:

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{Tags.cpp}
 

Functions

bool anonymous_namespace{Tags.cpp}::EqualMaps (const TagMap &map1, const TagMap &map2)
 
bool operator== (const Tags &lhs, const Tags &rhs)
 

Variables

static const wxChar * DefaultGenres []
 
static ProjectFileIORegistry::ObjectReaderEntry readerEntry
 
static const AudacityProject::AttachedObjects::RegisteredFactory key
 
static ProjectFileIORegistry::ObjectWriterEntry entry
 
static UndoRedoExtensionRegistry::Entry sEntry
 

Function Documentation

◆ operator==()

bool operator== ( const Tags lhs,
const Tags rhs 
)

Definition at line 332 of file Tags.cpp.

333{
334 if (!EqualMaps(lhs.mXref, rhs.mXref))
335 return false;
336
337 if (!EqualMaps(lhs.mMap, rhs.mMap))
338 return false;
339
340 return lhs.mGenres == rhs.mGenres;
341}
TagMap mXref
Definition: Tags.h:127
TagMap mMap
Definition: Tags.h:128
wxArrayString mGenres
Definition: Tags.h:130
bool EqualMaps(const TagMap &map1, const TagMap &map2)
Definition: Tags.cpp:315

Variable Documentation

◆ DefaultGenres

const wxChar* DefaultGenres[]
static

Definition at line 50 of file Tags.cpp.

Referenced by Tags::GetGenre(), and Tags::LoadDefaultGenres().

◆ entry

Initial value:
{
[](const AudacityProject &project, XMLWriter &xmlFile){
Tags::Get(project).WriteXML(xmlFile);
}
}
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:89
void WriteXML(XMLWriter &xmlFile) const
Definition: Tags.cpp:549
static Tags & Get(AudacityProject &project)
Definition: Tags.cpp:214
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
Definition: XMLWriter.h:26

Definition at line 566 of file Tags.cpp.

◆ key

Initial value:
{
[](AudacityProject &){ return std::make_shared< Tags >(); }
}

Definition at line 210 of file Tags.cpp.

Referenced by Tags::Get(), Tags::GetTag(), Tags::HasTag(), Tags::Set(), and Tags::SetTag().

◆ readerEntry

Initial value:
{
"tags",
[]( AudacityProject &project ){ return &Tags::Get( project ); }
}

Definition at line 205 of file Tags.cpp.

◆ sEntry

Initial value:
{
[](AudacityProject &project) -> std::shared_ptr<UndoStateExtension> {
return Tags::Get(project).shared_from_this();
}
}

Definition at line 573 of file Tags.cpp.