-
Notifications
You must be signed in to change notification settings - Fork 0
/
tag.h
executable file
·55 lines (49 loc) · 1.32 KB
/
tag.h
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
/*Copyright 2001
*
* tag.h
*
* Author: Gregory Ford [email protected]
* RTF token parser based on:
* rtf2html by Dmitry Porapov <[email protected]>,
* based on earlier work of Chuck Shotton.
* distributed under BSD-style license
* RTF token lists and hashing algorithm based on
* RTF Tools, Release 1.10
* 6 April 1994
* Paul DuBois [email protected]
*
* Copying permitted under GNU licence (see COPYING)
*/
// tag.h: interface for the Tag class.
//
//////////////////////////////////////////////////////////////////////
typedef enum tag_TagType {
noTag,
bTag, iTag, uTag, subTag, supTag, maxCharTag,
aTag, brTag, hrTag, pTag, h1Tag, h2Tag, h3Tag, h4Tag, h5Tag,
tableTag, ulTag, olTag, trTag, tdTag, liTag, maxTag
} TagType;
typedef struct tag_TagItem {
bool hasEndTag;
char text[12];
} TagItem;
class Tag
{
public:
static string tagIdToString( TagType tagId, bool endTag = false );
bool isTable();
bool isParagraphFormat();
bool isCharacterFormat();
void setAttributes( string& attributes);
string getAttributes();
Tag(TagType tagId, string& tagAttributes );
Tag( TagType tagId );
string toString(); // you'll need to delete this when you're finished with it
virtual ~Tag();
Tag();
TagType tagType;
bool endTag;
string attributes;
private:
protected:
};