1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-14 17:14:07 +01:00

Define class Identifier and template TaggedIdentifier...

... Identifier holds strings used for internal purposes and not shown to users;
TaggedIdentifier generates subclasses of Identifier for different purposes,
which won't implicitly (that is, inadvertently) interconvert as function
arguments.
This commit is contained in:
Paul Licameli
2019-02-26 14:50:35 -05:00
parent 172c8abe03
commit 3eeb91f23a
4 changed files with 222 additions and 4 deletions

View File

@@ -30,6 +30,12 @@ class AUDACITY_DLL_API XMLWriter /* not final */ {
virtual void StartTag(const wxString &name);
virtual void EndTag(const wxString &name);
// nonvirtual pass-through
void WriteAttr(const wxString &name, const Identifier &value)
// using GET once here, permitting Identifiers in XML,
// so no need for it at each WriteAttr call
{ WriteAttr( name, value.GET() ); }
virtual void WriteAttr(const wxString &name, const wxString &value);
virtual void WriteAttr(const wxString &name, const wxChar *value);