98 wxT(
"Instrumental Pop"),
99 wxT(
"Instrumental Rock"),
103 wxT(
"Techno-Industrial"),
108 wxT(
"Southern Rock"),
113 wxT(
"Christian Rap"),
116 wxT(
"Native American"),
134 wxT(
"National Folk"),
144 wxT(
"Progressive Rock"),
145 wxT(
"Psychedelic Rock"),
146 wxT(
"Symphonic Rock"),
150 wxT(
"Easy Listening"),
156 wxT(
"Chamber Music"),
170 wxT(
"Rhythmic Soul"),
191 wxT(
"Christian Gangsta Rap"),
195 wxT(
"Contemporary Christian"),
196 wxT(
"Christian Rock"),
226 auto &result = *tags;
243 return std::make_shared<Tags>(*
this);
248 for (
auto &pair : other.
mMap ) {
249 SetTag( pair.first, pair.second );
309 if (map1.size() != map2.size())
312 for (
const auto &pair : map2) {
313 auto iter = map1.find(pair.first);
314 if (iter == map1.end() || iter->second != pair.second)
349 wxTextFile tf(
fn.GetFullPath());
351 if (!tf.Exists() || !tf.Open()) {
358 int cnt = tf.GetLineCount();
359 for (
int i = 0; i < cnt; i++) {
360 mGenres.push_back(tf.GetLine(i));
377 if (i >= 0 && i < cnt) {
388 for (
int i = 0; i < cnt; i++) {
403 return (iter !=
mXref.end());
413 if (iter ==
mXref.end()) {
414 return wxEmptyString;
417 auto iter2 =
mMap.find(iter->second);
418 if (iter2 ==
mMap.end()) {
420 return wxEmptyString;
423 return iter2->second;
428 return {
mMap.begin(),
mMap.end() };
439 if (!
name.IsAscii()) {
440 wxLogError(
"Tag rejected (Non-ascii character in name)");
449 TagMap::iterator iter =
mXref.find(
key);
454 if (value.empty() && bSpecialTag) {
456 if (iter ==
mXref.end())
460 mMap.erase(iter->second);
466 if (iter ==
mXref.end()) {
473 else if (iter->second !=
name) {
476 mMap.erase(iter->second);
481 mMap[iter->second] = value;
500 for (
auto pair : attrs)
502 auto attr = pair.first;
503 auto value = pair.second;
505 if (attr ==
"name") {
506 n = value.ToWString();
508 else if (attr ==
"value") {
509 v = value.ToWString();
513 if (n ==
wxT(
"id3v2")) {
542 xmlFile.StartTag(
wxT(
"tags"));
544 for (
const auto &pair : GetRange()) {
545 const auto &n = pair.first;
546 const auto &v = pair.second;
547 xmlFile.StartTag(
wxT(
"tag"));
548 xmlFile.WriteAttr(
wxT(
"name"), n);
549 xmlFile.WriteAttr(
wxT(
"value"), v);
550 xmlFile.EndTag(
wxT(
"tag"));
553 xmlFile.EndTag(
wxT(
"tags"));
audacity::BasicSettings * gPrefs
std::vector< Attribute > AttributesList
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Client code makes static instance from a factory of attachments; passes it to Get or Find as a retrie...
This class is an interface which should be implemented by classes which wish to be able to load and s...
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
GroupScope BeginGroup(const wxString &prefix)
Appends a prefix to the current group or sets a new absolute path. Group that was set as current befo...
virtual wxArrayString GetChildKeys() const =0
Returns all child keys within the current group.
virtual bool Read(const wxString &key, bool *value) const =0
FILES_API FilePath DataDir()
Audacity user data directory.
A convenience for use with range-for.
Typically statically constructed.
Typically statically constructed.