/
ParsedDirFormat.cpp
66 lines (54 loc) · 1.54 KB
/
ParsedDirFormat.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// ParsedDirFormat.cpp: implementation of the CParsedDirFormat class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "mp3tagtools.h"
#include "ParsedDirFormat.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CParsedDirFormat::CParsedDirFormat()
{
m_dirpath = _T("<Current Folder>");
m_parformatlist.RemoveAll();
CParsedFormat pf1,pf2;
pf1.m_cftagstrlist.AddHead("<Artist>");
pf2.m_cftagstrlist.AddHead("<Title>");
m_parformatlist.AddHead(pf1);
m_parformatlist.AddTail(pf2);
}
CParsedDirFormat::CParsedDirFormat(const CParsedDirFormat& ParDirFormat)
{
m_dirpath = ParDirFormat.m_dirpath;
//Copy the list
POSITION p1 = ParDirFormat.m_parformatlist.GetHeadPosition();
m_parformatlist.RemoveAll();
while (p1!=NULL)
{
CParsedFormat pf1 = ParDirFormat.m_parformatlist.GetNext(p1);
m_parformatlist.AddTail(pf1);
}
}
CParsedDirFormat::~CParsedDirFormat()
{
}
CParsedDirFormat& CParsedDirFormat::operator=(const CParsedDirFormat& ParDirFormat)
{
if(this == &ParDirFormat)
return *this;
m_dirpath = ParDirFormat.m_dirpath;
//Copy the list
POSITION p1 = ParDirFormat.m_parformatlist.GetHeadPosition();
m_parformatlist.RemoveAll();
while (p1!=NULL)
{
CParsedFormat pf1 = ParDirFormat.m_parformatlist.GetNext(p1);
m_parformatlist.AddTail(pf1);
}
return *this;
}