-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathASSLine.h
More file actions
75 lines (62 loc) · 1.39 KB
/
ASSLine.h
File metadata and controls
75 lines (62 loc) · 1.39 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
73
74
75
#ifndef __ASSLine__
#define __ASSLine__
#include "ASSTime.h"
#include <string>
#include <vector>
class ASSLine
{
protected:
ASSTime start;
ASSTime end;
std::string text;
std::string style;
std::string actor;
int leftMargin;
int rightMargin;
int verticalMargin;
std::string effect;
int layer;
bool iscomment;
bool isup;
bool isdialogue;
std::string removeAllTags(std::string input);
std::string removeNonKaraokeTags(std::string input);
public:
// Construtors
ASSLine();
ASSLine(std::string input);
// Operators
void operator=(ASSLine input);
// Setters
void setStart(ASSTime toSet);
void setEnd(ASSTime toSet);
void setText(std::string toSet);
void setStyle(std::string toSet);
void setLayer(int toSet);
void setComment();
void unsetComment();
void setUp();
void unsetUp();
void setDialogue();
void unsetDialogue();
// Getters
ASSTime getStart();
ASSTime getEnd();
std::string getText();
std::string getStyle();
int getLayer();
bool isComment();
bool isUp();
bool isDialogue();
// Returns the duration of the object
ASSTime getDuration();
// Returns a string representation of the object
std::string printASSLine();
// Remove all tags from the object's text field
void removeAllTags();
// Removes all non-karaoke tags from the object's text field
void removeNonKaraokeTags();
// Offsets line by specified duration
void offsetASSLine(ASSTime duration);
};
#endif