This source file includes following definitions.
- use_parser
- test1
- start
- main
- interface
- static_func
- implementation
- static_sub_func
- foo
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 template <typename DerivedT>
26 struct grammar {
27 public:
28 typedef grammar<DerivedT> self_t;
29 typedef DerivedT const& embed_t;
30 grammar() {}
31 ~grammar() { }
32 void use_parser() const { }
33 void test1() { }
34 };
35
36 struct PDFbool_parser : public grammar<PDFbool_parser> {
37 PDFbool_parser() {}
38 template <typename scannerT> struct definition {
39 typedef typename scannerT::iterator_t iterator_t;
40 int top;
41 definition(const PDFbool_parser& ) {
42 return ;
43 }
44 const int start() const {
45 return top;
46 }
47 };
48 };
49
50 int main(void) {
51 PDFbool_parser PDFbool_p = PDFbool_parser();
52 PDFbool_p.
53 ;
54
55 }
56
57
58
59 template <class Derived> struct Base {
60 public:
61 void interface()
62 {
63
64 static_cast<Derived*>(this)->implementation();
65
66 }
67
68 static void static_func()
69 {
70
71 Derived::static_sub_func();
72
73 }
74 };
75
76 struct Derived : Base<Derived> {
77 void implementation() { }
78 static void static_sub_func() { }
79 };
80
81 int foo () {
82 Derived d;
83 d.
84 ;
85
86 }