-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathASSFile.h
More file actions
72 lines (53 loc) · 1.47 KB
/
ASSFile.h
File metadata and controls
72 lines (53 loc) · 1.47 KB
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
67
68
69
70
71
72
#ifndef __ASSFile__
#define __ASSFile__
#include "ASSLine.h"
#include "ASSLineWithSwitch.h"
#include <vector>
#include <string>
#include <fstream>
class ASSFile
{
private:
std::vector <ASSLine> lines;
protected:
std::vector <std::string> preprocess;
std::string title;
ASSFile();
ASSFile(std::string inFileName);
// Converts all underscores in a std::string to spaces
std::string convertUnderscoreToSpace(std::string input);
void readPreprocessLines(std::ifstream &fin);
void processLyricLines(std::ifstream &fin);
public:
void readPreprocessLines(std::string inFileName);
void removeAllTags();
void removeNonKaraokeTags();
void printASSFile(std::string outFileName);
int getNumLines();
ASSTime getEndTime();
void insertLine(ASSLine toInsert);
};
class ASSFileWithSwitch : public ASSFile
{
private:
std::vector <ASSLineWithSwitch> lines;
void processLyricLines(std::ifstream &fin);
public:
ASSFileWithSwitch();
ASSFileWithSwitch(std::string inFileName);
void operator=(ASSFileWithSwitch toSet);
std::vector <ASSLineWithSwitch> getLines();
ASSLineWithSwitch getLine(int index);
int getNumLines();
ASSTime getStartTime();
ASSTime getEndTime();
void setLine(ASSLineWithSwitch toSet, int index);
void insertLine(ASSLineWithSwitch toInsert);
void deleteLine(int index);
void clearLines();
void swapLines(int index1, int index2);
void appendFile(ASSFileWithSwitch toAppend);
void offsetFile(ASSTime offset);
void printASSFile(std::string outFileName);
};
#endif