1
+ /* -*- mode: c++; c-basic-offset: 4 -*- */
2
+
1
3
/*
2
4
* Modified for use within matplotlib
3
5
* 5 July 2007
27
29
* function. This both removes the hardcoding of output to go to stdout
28
30
* and makes output thread-safe. Michael Droettboom [06-07-07]
29
31
*/
30
- class TTStreamWriter {
32
+ class TTStreamWriter
33
+ {
31
34
private:
32
- // Private copy and assignment
33
- TTStreamWriter& operator =(const TTStreamWriter& other);
34
- TTStreamWriter (const TTStreamWriter& other);
35
+ // Private copy and assignment
36
+ TTStreamWriter& operator =(const TTStreamWriter& other);
37
+ TTStreamWriter (const TTStreamWriter& other);
35
38
36
39
public:
37
- TTStreamWriter () { }
38
- virtual ~TTStreamWriter () { }
40
+ TTStreamWriter () { }
41
+ virtual ~TTStreamWriter () { }
39
42
40
- virtual void write (const char *) = 0;
43
+ virtual void write (const char *) = 0;
41
44
42
- virtual void printf (const char * format, ...);
43
- virtual void put_char (int val);
44
- virtual void puts (const char * a);
45
- virtual void putline (const char * a);
45
+ virtual void printf (const char * format, ...);
46
+ virtual void put_char (int val);
47
+ virtual void puts (const char * a);
48
+ virtual void putline (const char * a);
46
49
};
47
50
48
- class TTDictionaryCallback {
49
- private:
50
- // Private copy and assignment
51
- TTDictionaryCallback& operator =(const TTStreamWriter& other);
52
- TTDictionaryCallback (const TTStreamWriter& other);
51
+ class TTDictionaryCallback
52
+ {
53
+ private:
54
+ // Private copy and assignment
55
+ TTDictionaryCallback& operator =(const TTStreamWriter& other);
56
+ TTDictionaryCallback (const TTStreamWriter& other);
53
57
54
- public:
55
- TTDictionaryCallback () { }
56
- virtual ~TTDictionaryCallback () { }
58
+ public:
59
+ TTDictionaryCallback () { }
60
+ virtual ~TTDictionaryCallback () { }
57
61
58
- virtual void add_pair (const char * key, const char * value) = 0;
62
+ virtual void add_pair (const char * key, const char * value) = 0;
59
63
};
60
64
61
65
void replace_newlines_with_spaces (char * a);
62
66
63
67
/*
64
68
* A simple class for all ttconv exceptions.
65
69
*/
66
- class TTException {
67
- const char * message;
68
- TTException& operator =(const TTStreamWriter& other);
69
- TTException (const TTStreamWriter& other);
70
-
71
- public:
72
- TTException (const char * message_) : message(message_) { }
73
- const char * getMessage () { return message; }
70
+ class TTException
71
+ {
72
+ const char * message;
73
+ TTException& operator =(const TTStreamWriter& other);
74
+ TTException (const TTStreamWriter& other);
75
+
76
+ public:
77
+ TTException (const char * message_) : message(message_) { }
78
+ const char * getMessage ()
79
+ {
80
+ return message;
81
+ }
74
82
};
75
83
76
84
/*
@@ -89,11 +97,12 @@ class TTException {
89
97
90
98
/* Do not change anything below this line. */
91
99
92
- enum font_type_enum {
93
- PS_TYPE_3 = 3 ,
94
- PS_TYPE_42 = 42 ,
95
- PS_TYPE_42_3_HYBRID = 43 ,
96
- PDF_TYPE_3 = -3
100
+ enum font_type_enum
101
+ {
102
+ PS_TYPE_3 = 3 ,
103
+ PS_TYPE_42 = 42 ,
104
+ PS_TYPE_42_3_HYBRID = 43 ,
105
+ PDF_TYPE_3 = -3
97
106
};
98
107
99
108
/* routines in pprdrv_tt.c */
0 commit comments