blob: 30762e44e66ed7f1aa41ef3d737b7d5d5a33f9e6 (
plain)
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
|
#ifndef __DOCTREE_HH__
#define __DOCTREE_HH__
#include "lout/misc.hh"
class DoctreeNode {
public:
int num; // unique ascending id
int depth;
int element;
lout::misc::SimpleVector<char*> *klass;
const char *pseudo;
const char *id;
};
/**
* \brief HTML document tree interface.
*
* The Doctree class defines the interface to the parsed HTML document tree
* as it is used for CSS selector matching.
* Currently the Doctree can be represented as stack, however to support
* CSS adjacent siblings or for future JavaScript support it may have to
* be extended to a real tree.
*/
class Doctree {
public:
virtual ~Doctree () {};
virtual const DoctreeNode *top () = 0;
virtual const DoctreeNode *parent (const DoctreeNode *node) = 0;
};
#endif
|