All Classes Files Functions Variables Enumerations Enumerator Macros
episode.cpp
Go to the documentation of this file.
1 
20 #include "episode.hpp"
21 
24 {};
25 
35 Episode::Episode( int num, int xep, string pep, string titl,
36  string file1, string dir1, string file2, string dir2 )
37 {
38  // Store the episode number
39  number = num;
40  // Store the extra episode number
41  extra = xep;
42  // Store the partial episode number
43  part = pep;
44  // Store the name of the episode
45  title = titl;
46  // Store the old name of the file
47  filename = file1;
48  // Store the old location of the file on disk
49  directory = dir1;
50  // Store the new name of the file
51  oldfile = file2;
52  // Store the new location of the file on disk
53  olddir = dir2;
54 };
55 
58 {};
59 
70 bool Episode::reset( int num, int xep, string pep, string titl,
71  string file1, string dir1, string file2, string dir2 )
72 {
73  // Store the episode number
74  number = num;
75  // Store the extra episode number
76  extra = xep;
77  // Store the partial episode number
78  part = pep;
79  // Store the name of the episode
80  title = titl;
81  // Store the old name of the file
82  filename = file1;
83  // Store the old location of the file on disk
84  directory = dir1;
85  // Store the new name of the file
86  oldfile = file2;
87  // Store the new location of the file on disk
88  olddir = dir2;
89 
90  // success = nonzero for loops
91  return 1;
92 };
93 
95 int Episode::getNumber() const
96 {
97  return number;
98 };
99 
101 int Episode::getExtra() const
102 {
103  return extra;
104 };
105 
107 string Episode::getPart() const
108 {
109  return part;
110 };
111 
113 string Episode::getTitle() const
114 {
115  return title;
116 };
117 
119 string Episode::getOldFile() const
120 {
121  return oldfile;
122 };
123 
125 string Episode::getOldDir() const
126 {
127  return olddir;
128 };
129 
131 string Episode::getFilename() const
132 {
133  return filename;
134 };
135 
137 string Episode::getDirectory() const
138 {
139  return directory;
140 };
int extra
The extra episode number.
Definition: episode.hpp:49
string getFilename() const
Definition: episode.cpp:131
~Episode()
Default destructor.
Definition: episode.cpp:57
int getExtra() const
Definition: episode.cpp:101
The Episode class stores parsed file information regarding a single episode; to be used as a vector...
string getTitle() const
Definition: episode.cpp:113
string part
The episode part.
Definition: episode.hpp:50
string directory
The new location of the file on disk.
Definition: episode.hpp:55
int getNumber() const
Definition: episode.cpp:95
string getPart() const
Definition: episode.cpp:107
string getOldDir() const
Definition: episode.cpp:125
int number
The episode number.
Definition: episode.hpp:48
string getOldFile() const
Definition: episode.cpp:119
Episode()
Default constructor.
Definition: episode.cpp:23
string filename
The new name of the file.
Definition: episode.hpp:54
bool reset(int, int, string, string, string, string, string, string)
Resets the info required to describe a particular episode.
Definition: episode.cpp:70
string oldfile
The old name of the file.
Definition: episode.hpp:52
string getDirectory() const
Definition: episode.cpp:137
string title
The name of the episode.
Definition: episode.hpp:51
string olddir
The old location of the file on disk.
Definition: episode.hpp:53