quickfix_ruby 1.14.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +7 -0
  2. data/ext/quickfix/Acceptor.cpp +248 -0
  3. data/ext/quickfix/Acceptor.h +127 -0
  4. data/ext/quickfix/Allocator.h +9 -0
  5. data/ext/quickfix/Application.h +127 -0
  6. data/ext/quickfix/AtomicCount.h +109 -0
  7. data/ext/quickfix/DOMDocument.h +74 -0
  8. data/ext/quickfix/DataDictionary.cpp +618 -0
  9. data/ext/quickfix/DataDictionary.h +539 -0
  10. data/ext/quickfix/DataDictionaryProvider.cpp +71 -0
  11. data/ext/quickfix/DataDictionaryProvider.h +70 -0
  12. data/ext/quickfix/DatabaseConnectionID.h +105 -0
  13. data/ext/quickfix/DatabaseConnectionPool.h +91 -0
  14. data/ext/quickfix/Dictionary.cpp +162 -0
  15. data/ext/quickfix/Dictionary.h +94 -0
  16. data/ext/quickfix/Event.h +95 -0
  17. data/ext/quickfix/Exceptions.h +299 -0
  18. data/ext/quickfix/Field.h +672 -0
  19. data/ext/quickfix/FieldConvertors.h +863 -0
  20. data/ext/quickfix/FieldMap.cpp +238 -0
  21. data/ext/quickfix/FieldMap.h +244 -0
  22. data/ext/quickfix/FieldNumbers.h +46 -0
  23. data/ext/quickfix/FieldTypes.cpp +64 -0
  24. data/ext/quickfix/FieldTypes.h +698 -0
  25. data/ext/quickfix/Fields.h +31 -0
  26. data/ext/quickfix/FileLog.cpp +200 -0
  27. data/ext/quickfix/FileLog.h +112 -0
  28. data/ext/quickfix/FileStore.cpp +332 -0
  29. data/ext/quickfix/FileStore.h +129 -0
  30. data/ext/quickfix/FixFieldNumbers.h +1537 -0
  31. data/ext/quickfix/FixFields.h +1538 -0
  32. data/ext/quickfix/FixValues.h +3281 -0
  33. data/ext/quickfix/FlexLexer.h +188 -0
  34. data/ext/quickfix/Group.cpp +64 -0
  35. data/ext/quickfix/Group.h +73 -0
  36. data/ext/quickfix/HtmlBuilder.h +186 -0
  37. data/ext/quickfix/HttpConnection.cpp +739 -0
  38. data/ext/quickfix/HttpConnection.h +78 -0
  39. data/ext/quickfix/HttpMessage.cpp +149 -0
  40. data/ext/quickfix/HttpMessage.h +133 -0
  41. data/ext/quickfix/HttpParser.cpp +49 -0
  42. data/ext/quickfix/HttpParser.h +54 -0
  43. data/ext/quickfix/HttpServer.cpp +169 -0
  44. data/ext/quickfix/HttpServer.h +78 -0
  45. data/ext/quickfix/Initiator.cpp +289 -0
  46. data/ext/quickfix/Initiator.h +149 -0
  47. data/ext/quickfix/Log.cpp +77 -0
  48. data/ext/quickfix/Log.h +179 -0
  49. data/ext/quickfix/Message.cpp +580 -0
  50. data/ext/quickfix/Message.h +370 -0
  51. data/ext/quickfix/MessageCracker.h +188 -0
  52. data/ext/quickfix/MessageSorters.cpp +105 -0
  53. data/ext/quickfix/MessageSorters.h +156 -0
  54. data/ext/quickfix/MessageStore.cpp +146 -0
  55. data/ext/quickfix/MessageStore.h +174 -0
  56. data/ext/quickfix/Mutex.h +131 -0
  57. data/ext/quickfix/MySQLConnection.h +194 -0
  58. data/ext/quickfix/MySQLLog.cpp +275 -0
  59. data/ext/quickfix/MySQLLog.h +145 -0
  60. data/ext/quickfix/MySQLStore.cpp +331 -0
  61. data/ext/quickfix/MySQLStore.h +142 -0
  62. data/ext/quickfix/NullStore.cpp +54 -0
  63. data/ext/quickfix/NullStore.h +99 -0
  64. data/ext/quickfix/OdbcConnection.h +266 -0
  65. data/ext/quickfix/OdbcLog.cpp +252 -0
  66. data/ext/quickfix/OdbcLog.h +117 -0
  67. data/ext/quickfix/OdbcStore.cpp +338 -0
  68. data/ext/quickfix/OdbcStore.h +113 -0
  69. data/ext/quickfix/PUGIXML_DOMDocument.cpp +112 -0
  70. data/ext/quickfix/PUGIXML_DOMDocument.h +81 -0
  71. data/ext/quickfix/Parser.cpp +103 -0
  72. data/ext/quickfix/Parser.h +57 -0
  73. data/ext/quickfix/PostgreSQLConnection.h +176 -0
  74. data/ext/quickfix/PostgreSQLLog.cpp +276 -0
  75. data/ext/quickfix/PostgreSQLLog.h +144 -0
  76. data/ext/quickfix/PostgreSQLStore.cpp +334 -0
  77. data/ext/quickfix/PostgreSQLStore.h +141 -0
  78. data/ext/quickfix/Queue.h +75 -0
  79. data/ext/quickfix/QuickfixRuby.cpp +252066 -0
  80. data/ext/quickfix/QuickfixRuby.h +34 -0
  81. data/ext/quickfix/Responder.h +43 -0
  82. data/ext/quickfix/Session.cpp +1487 -0
  83. data/ext/quickfix/Session.h +335 -0
  84. data/ext/quickfix/SessionFactory.cpp +274 -0
  85. data/ext/quickfix/SessionFactory.h +86 -0
  86. data/ext/quickfix/SessionID.h +170 -0
  87. data/ext/quickfix/SessionSettings.cpp +189 -0
  88. data/ext/quickfix/SessionSettings.h +171 -0
  89. data/ext/quickfix/SessionState.h +231 -0
  90. data/ext/quickfix/Settings.cpp +100 -0
  91. data/ext/quickfix/Settings.h +53 -0
  92. data/ext/quickfix/SharedArray.h +150 -0
  93. data/ext/quickfix/SocketAcceptor.cpp +222 -0
  94. data/ext/quickfix/SocketAcceptor.h +75 -0
  95. data/ext/quickfix/SocketConnection.cpp +238 -0
  96. data/ext/quickfix/SocketConnection.h +103 -0
  97. data/ext/quickfix/SocketConnector.cpp +116 -0
  98. data/ext/quickfix/SocketConnector.h +67 -0
  99. data/ext/quickfix/SocketInitiator.cpp +260 -0
  100. data/ext/quickfix/SocketInitiator.h +81 -0
  101. data/ext/quickfix/SocketMonitor.cpp +335 -0
  102. data/ext/quickfix/SocketMonitor.h +111 -0
  103. data/ext/quickfix/SocketServer.cpp +177 -0
  104. data/ext/quickfix/SocketServer.h +100 -0
  105. data/ext/quickfix/ThreadedSocketAcceptor.cpp +258 -0
  106. data/ext/quickfix/ThreadedSocketAcceptor.h +98 -0
  107. data/ext/quickfix/ThreadedSocketConnection.cpp +209 -0
  108. data/ext/quickfix/ThreadedSocketConnection.h +82 -0
  109. data/ext/quickfix/ThreadedSocketInitiator.cpp +268 -0
  110. data/ext/quickfix/ThreadedSocketInitiator.h +84 -0
  111. data/ext/quickfix/TimeRange.cpp +173 -0
  112. data/ext/quickfix/TimeRange.h +258 -0
  113. data/ext/quickfix/Utility.cpp +537 -0
  114. data/ext/quickfix/Utility.h +219 -0
  115. data/ext/quickfix/Values.h +62 -0
  116. data/ext/quickfix/config.h +0 -0
  117. data/ext/quickfix/config_windows.h +0 -0
  118. data/ext/quickfix/extconf.rb +12 -0
  119. data/ext/quickfix/index.h +37 -0
  120. data/ext/quickfix/pugiconfig.hpp +72 -0
  121. data/ext/quickfix/pugixml.cpp +10765 -0
  122. data/ext/quickfix/pugixml.hpp +1341 -0
  123. data/ext/quickfix/strptime.h +7 -0
  124. data/lib/quickfix40.rb +274 -0
  125. data/lib/quickfix41.rb +351 -0
  126. data/lib/quickfix42.rb +1184 -0
  127. data/lib/quickfix43.rb +3504 -0
  128. data/lib/quickfix44.rb +10721 -0
  129. data/lib/quickfix50.rb +13426 -0
  130. data/lib/quickfix50sp1.rb +15629 -0
  131. data/lib/quickfix50sp2.rb +17068 -0
  132. data/lib/quickfix_fields.rb +19853 -0
  133. data/lib/quickfix_ruby.rb +82 -0
  134. data/lib/quickfixt11.rb +70 -0
  135. data/spec/FIX40.xml +862 -0
  136. data/spec/FIX41.xml +1285 -0
  137. data/spec/FIX42.xml +2746 -0
  138. data/spec/FIX43.xml +4229 -0
  139. data/spec/FIX44.xml +6596 -0
  140. data/spec/FIX50.xml +8137 -0
  141. data/spec/FIX50SP1.xml +9496 -0
  142. data/spec/FIX50SP2.xml +10011 -0
  143. data/spec/FIXT11.xml +313 -0
  144. data/test/test_DataDictionaryTestCase.rb +268 -0
  145. data/test/test_DictionaryTestCase.rb +112 -0
  146. data/test/test_FieldBaseTestCase.rb +24 -0
  147. data/test/test_MessageTestCase.rb +368 -0
  148. data/test/test_SessionSettingsTestCase.rb +41 -0
  149. metadata +193 -0
@@ -0,0 +1,188 @@
1
+ // FlexLexer.h -- define interfaces for lexical analyzer classes generated
2
+ // by flex
3
+
4
+ // Copyright (c) 1993 The Regents of the University of California.
5
+ // All rights reserved.
6
+ //
7
+ // This code is derived from software contributed to Berkeley by
8
+ // Kent Williams and Tom Epperly.
9
+ //
10
+ // Redistribution and use in source and binary forms with or without
11
+ // modification are permitted provided that: (1) source distributions retain
12
+ // this entire copyright notice and comment, and (2) distributions including
13
+ // binaries display the following acknowledgement: ``This product includes
14
+ // software developed by the University of California, Berkeley and its
15
+ // contributors'' in the documentation or other materials provided with the
16
+ // distribution and in all advertising materials mentioning features or use
17
+ // of this software. Neither the name of the University nor the names of
18
+ // its contributors may be used to endorse or promote products derived from
19
+ // this software without specific prior written permission.
20
+
21
+ // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
22
+ // WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
23
+ // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
24
+
25
+ // This file defines FlexLexer, an abstract class which specifies the
26
+ // external interface provided to flex C++ lexer objects, and yyFlexLexer,
27
+ // which defines a particular lexer class.
28
+ //
29
+ // If you want to create multiple lexer classes, you use the -P flag
30
+ // to rename each yyFlexLexer to some other xxFlexLexer. You then
31
+ // include <FlexLexer.h> in your other sources once per lexer class:
32
+ //
33
+ //#undef yyFlexLexer
34
+ //#define yyFlexLexer xxFlexLexer
35
+ //#include <FlexLexer.h>
36
+ //
37
+ //#undef yyFlexLexer
38
+ //#define yyFlexLexer zzFlexLexer
39
+ //#include <FlexLexer.h>
40
+ //...
41
+
42
+ #ifndef __FLEX_LEXER_H
43
+ // Never included before - need to define base class.
44
+ #define __FLEX_LEXER_H
45
+ #include <iostream>
46
+
47
+ extern "C++"
48
+ {
49
+
50
+ struct yy_buffer_state;
51
+ typedef int yy_state_type;
52
+
53
+ class FlexLexer
54
+ {
55
+ public:
56
+ virtual ~FlexLexer() { }
57
+
58
+ const char* YYText() { return yytext; }
59
+ int YYLeng() { return yyleng; }
60
+
61
+ virtual void
62
+ yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
63
+ virtual struct yy_buffer_state*
64
+ yy_create_buffer( std::istream* s, int size ) = 0;
65
+ virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
66
+ virtual void yyrestart( std::istream* s ) = 0;
67
+
68
+ virtual int yylex() = 0;
69
+
70
+ // Call yylex with new input/output sources.
71
+ int yylex( std::istream* new_in, std::ostream* new_out = 0 )
72
+ {
73
+ switch_streams( new_in, new_out );
74
+ return yylex();
75
+ }
76
+
77
+ // Switch to new input/output streams. A nil stream pointer
78
+ // indicates "keep the current one".
79
+ virtual void switch_streams( std::istream* new_in = 0,
80
+ std::ostream* new_out = 0 ) = 0;
81
+
82
+ int lineno() const{ return yylineno; }
83
+
84
+ int debug() const{ return yy_flex_debug; }
85
+ void set_debug( int flag ) { yy_flex_debug = flag; }
86
+
87
+ protected:
88
+ char* yytext;
89
+ int yyleng;
90
+ int yylineno; // only maintained if you use %option yylineno
91
+ int yy_flex_debug; // only has effect with -d or "%option debug"
92
+ }
93
+ ;
94
+
95
+ }
96
+ #endif
97
+
98
+ #if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
99
+ // Either this is the first time through (yyFlexLexerOnce not defined),
100
+ // or this is a repeated include to define a different flavor of
101
+ // yyFlexLexer, as discussed in the flex man page.
102
+ #define yyFlexLexerOnce
103
+
104
+ class yyFlexLexer : public FlexLexer
105
+ {
106
+ public:
107
+ // arg_yyin and arg_yyout default to the cin and cout, but we
108
+ // only make that assignment when initializing in yylex().
109
+ yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 );
110
+
111
+ virtual ~yyFlexLexer();
112
+
113
+ void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
114
+ struct yy_buffer_state* yy_create_buffer( std::istream* s, int size );
115
+ void yy_delete_buffer( struct yy_buffer_state* b );
116
+ void yyrestart( std::istream* s );
117
+
118
+ virtual int yylex();
119
+ virtual void switch_streams( std::istream* new_in, std::ostream* new_out );
120
+
121
+ protected:
122
+ virtual int LexerInput( char* buf, int max_size );
123
+ virtual void LexerOutput( const char* buf, int size );
124
+ virtual void LexerError( const char* msg );
125
+
126
+ void yyunput( int c, char* buf_ptr );
127
+ int yyinput();
128
+
129
+ void yy_load_buffer_state();
130
+ void yy_init_buffer( struct yy_buffer_state* b, std::istream* s );
131
+ void yy_flush_buffer( struct yy_buffer_state* b );
132
+
133
+ int yy_start_stack_ptr;
134
+ int yy_start_stack_depth;
135
+ int* yy_start_stack;
136
+
137
+ void yy_push_state( int new_state );
138
+ void yy_pop_state();
139
+ int yy_top_state();
140
+
141
+ yy_state_type yy_get_previous_state();
142
+ yy_state_type yy_try_NUL_trans( yy_state_type current_state );
143
+ int yy_get_next_buffer();
144
+
145
+ std::istream* yyin; // input source for default LexerInput
146
+ std::ostream* yyout; // output sink for default LexerOutput
147
+
148
+ struct yy_buffer_state* yy_current_buffer;
149
+
150
+ // yy_hold_char holds the character lost when yytext is formed.
151
+ char yy_hold_char;
152
+
153
+ // Number of characters read into yy_ch_buf.
154
+ int yy_n_chars;
155
+
156
+ // Points to current character in buffer.
157
+ char* yy_c_buf_p;
158
+
159
+ int yy_init; // whether we need to initialize
160
+ int yy_start; // start state number
161
+
162
+ // Flag which is used to allow yywrap()'s to do buffer switches
163
+ // instead of setting up a fresh yyin. A bit of a hack ...
164
+ int yy_did_buffer_switch_on_eof;
165
+
166
+ // The following are not always needed, but may be depending
167
+ // on use of certain flex features (like REJECT or yymore()).
168
+
169
+ yy_state_type yy_last_accepting_state;
170
+ char* yy_last_accepting_cpos;
171
+
172
+ yy_state_type* yy_state_buf;
173
+ yy_state_type* yy_state_ptr;
174
+
175
+ char* yy_full_match;
176
+ int* yy_full_state;
177
+ int yy_full_lp;
178
+
179
+ int yy_lp;
180
+ int yy_looking_for_trail_begin;
181
+
182
+ int yy_more_flag;
183
+ int yy_more_len;
184
+ int yy_more_offset;
185
+ int yy_prev_more_offset;
186
+ };
187
+
188
+ #endif
@@ -0,0 +1,64 @@
1
+ /****************************************************************************
2
+ ** Copyright (c) 2001-2014
3
+ **
4
+ ** This file is part of the QuickFIX FIX Engine
5
+ **
6
+ ** This file may be distributed under the terms of the quickfixengine.org
7
+ ** license as defined by quickfixengine.org and appearing in the file
8
+ ** LICENSE included in the packaging of this file.
9
+ **
10
+ ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
11
+ ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12
+ **
13
+ ** See http://www.quickfixengine.org/LICENSE for licensing information.
14
+ **
15
+ ** Contact ask@quickfixengine.org if any conditions of this licensing are
16
+ ** not clear to you.
17
+ **
18
+ ****************************************************************************/
19
+
20
+ #ifdef _MSC_VER
21
+ #include "stdafx.h"
22
+ #else
23
+ #include "config.h"
24
+ #endif
25
+
26
+ #include "Group.h"
27
+
28
+ namespace FIX
29
+ {
30
+ void Group::addGroup( const Group& group )
31
+ {
32
+ FieldMap::addGroup( group.field(), group );
33
+ }
34
+
35
+ void Group::replaceGroup( unsigned num, const FIX::Group& group )
36
+ {
37
+ FieldMap::replaceGroup( num, group.field(), group );
38
+ }
39
+
40
+ Group& Group::getGroup( unsigned num, Group& group ) const throw( FieldNotFound )
41
+ {
42
+ return static_cast < Group& > ( FieldMap::getGroup( num, group.field(), group ) );
43
+ }
44
+
45
+ void Group::removeGroup( unsigned num, const Group& group )
46
+ {
47
+ FieldMap::removeGroup( num, group.field() );
48
+ }
49
+
50
+ void Group::removeGroup( const Group& group )
51
+ {
52
+ FieldMap::removeGroup( group.field() );
53
+ }
54
+
55
+ bool Group::hasGroup( unsigned num, const Group& group )
56
+ {
57
+ return FieldMap::hasGroup( num, group.field() );
58
+ }
59
+
60
+ bool Group::hasGroup( const Group& group )
61
+ {
62
+ return FieldMap::hasGroup( group.field() );
63
+ }
64
+ }
@@ -0,0 +1,73 @@
1
+ /* -*- C++ -*- */
2
+
3
+ /****************************************************************************
4
+ ** Copyright (c) 2001-2014
5
+ **
6
+ ** This file is part of the QuickFIX FIX Engine
7
+ **
8
+ ** This file may be distributed under the terms of the quickfixengine.org
9
+ ** license as defined by quickfixengine.org and appearing in the file
10
+ ** LICENSE included in the packaging of this file.
11
+ **
12
+ ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13
+ ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14
+ **
15
+ ** See http://www.quickfixengine.org/LICENSE for licensing information.
16
+ **
17
+ ** Contact ask@quickfixengine.org if any conditions of this licensing are
18
+ ** not clear to you.
19
+ **
20
+ ****************************************************************************/
21
+
22
+ #ifndef FIX_GROUP
23
+ #define FIX_GROUP
24
+
25
+ #ifdef _MSC_VER
26
+ #pragma warning( disable: 4786 )
27
+ #endif
28
+
29
+ #include "FieldMap.h"
30
+ #include "Fields.h"
31
+ #include <vector>
32
+
33
+ namespace FIX
34
+ {
35
+ /**
36
+ * Base class for all %FIX repeating groups.
37
+ *
38
+ * A group consists of a count field, deliminator, and a sorting order.
39
+ */
40
+ class Group : public FieldMap
41
+ {
42
+ public:
43
+ Group( int field, int delim )
44
+ : FieldMap( message_order( delim, 0 ) ),
45
+ m_field( field ), m_delim( delim ) {}
46
+
47
+ Group( int field, int delim, const int order[] )
48
+ : FieldMap( order ), m_field( field ), m_delim( delim ) {}
49
+
50
+ Group( int field, int delim, const message_order& order )
51
+ : FieldMap( order ), m_field( field ), m_delim( delim ) {}
52
+
53
+ Group( const Group& copy )
54
+ : FieldMap( copy ), m_field( copy.m_field ), m_delim( copy.m_delim ) {}
55
+
56
+ int field() const { return m_field; }
57
+ int delim() const { return m_delim; }
58
+
59
+ void addGroup( const Group& group );
60
+ void replaceGroup( unsigned num, const Group& group );
61
+ Group& getGroup( unsigned num, Group& group ) const throw( FieldNotFound );
62
+ void removeGroup( unsigned num, const Group& group );
63
+ void removeGroup( const Group& group );
64
+ bool hasGroup( const Group& group );
65
+ bool hasGroup( unsigned num, const Group& group );
66
+
67
+ private:
68
+ int m_field;
69
+ int m_delim;
70
+ };
71
+ }
72
+
73
+ #endif //FIX_GROUP
@@ -0,0 +1,186 @@
1
+ /* -*- C++ -*- */
2
+
3
+ /****************************************************************************
4
+ ** Copyright (c) 2001-2014
5
+ **
6
+ ** This file is part of the QuickFIX FIX Engine
7
+ **
8
+ ** This file may be distributed under the terms of the quickfixengine.org
9
+ ** license as defined by quickfixengine.org and appearing in the file
10
+ ** LICENSE included in the packaging of this file.
11
+ **
12
+ ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13
+ ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14
+ **
15
+ ** See http://www.quickfixengine.org/LICENSE for licensing information.
16
+ **
17
+ ** Contact ask@quickfixengine.org if any conditions of this licensing are
18
+ ** not clear to you.
19
+ **
20
+ ****************************************************************************/
21
+
22
+ #ifndef HTML_BUILDER_H
23
+ #define HTML_BUILDER_H
24
+
25
+ #ifdef _MSC_VER
26
+ #pragma warning( disable : 4503 4355 4786 4290 )
27
+ #endif
28
+
29
+ #include <sstream>
30
+
31
+ namespace HTML
32
+ {
33
+ class TAG
34
+ {
35
+ public:
36
+ TAG( const std::string& tag, std::ostream& stream )
37
+ : m_tag( tag ), m_stream( stream )
38
+ {
39
+ m_stream << "<" << m_tag;
40
+ }
41
+
42
+ virtual ~TAG()
43
+ {
44
+ m_stream << m_value.str();
45
+ m_stream << "</" << m_tag << ">";
46
+ }
47
+
48
+ TAG& text()
49
+ { m_stream << ">"; return *this; }
50
+ TAG& text( const std::string& value )
51
+ { m_value << value; text(); return *this; }
52
+ TAG& text( int value )
53
+ { m_value << value; text(); return *this; }
54
+
55
+ private:
56
+ std::string m_tag;
57
+ std::stringstream m_value;
58
+
59
+ protected:
60
+ std::ostream& m_stream;
61
+ };
62
+
63
+ class SPECIAL
64
+ {
65
+ public:
66
+ SPECIAL( const std::string& value, std::ostream& stream )
67
+ {
68
+ stream << "&" << value << ";";
69
+ }
70
+ };
71
+
72
+ class A : public TAG
73
+ {
74
+ public:
75
+ A( std::ostream& stream )
76
+ : TAG( "A", stream ) {}
77
+
78
+ A& href( const std::string& value )
79
+ { m_stream << " href='" << value << "'"; return *this; }
80
+ };
81
+
82
+ class BODY : public TAG
83
+ {
84
+ public:
85
+ BODY( std::ostream& stream )
86
+ : TAG( "BODY", stream ) {}
87
+ };
88
+
89
+ class BR : public TAG
90
+ {
91
+ public:
92
+ BR( std::ostream& stream )
93
+ : TAG( "BR", stream ) {}
94
+ };
95
+
96
+ class CAPTION : public TAG
97
+ {
98
+ public:
99
+ CAPTION( std::ostream& stream )
100
+ : TAG( "CAPTION", stream ) {}
101
+ };
102
+
103
+ class CENTER : public TAG
104
+ {
105
+ public:
106
+ CENTER( std::ostream& stream )
107
+ : TAG( "CENTER", stream ) {}
108
+ };
109
+
110
+ class EM : public TAG
111
+ {
112
+ public:
113
+ EM( std::ostream& stream )
114
+ : TAG( "EM", stream ) {}
115
+ };
116
+
117
+ class H1 : public TAG
118
+ {
119
+ public:
120
+ H1( std::ostream& stream )
121
+ : TAG( "H1", stream ) {}
122
+ };
123
+
124
+ class H2 : public TAG
125
+ {
126
+ public:
127
+ H2( std::ostream& stream )
128
+ : TAG( "H2", stream ) {}
129
+ };
130
+
131
+ class HEAD : public TAG
132
+ {
133
+ public:
134
+ HEAD( std::ostream& stream )
135
+ : TAG( "HEAD", stream ) {}
136
+ };
137
+
138
+ class HR : public TAG
139
+ {
140
+ public:
141
+ HR( std::ostream& stream )
142
+ : TAG( "HR", stream ) {}
143
+ };
144
+
145
+ const char* NBSP = "&nbsp;";
146
+
147
+ class TABLE : public TAG
148
+ {
149
+ public:
150
+ TABLE( std::ostream& stream )
151
+ : TAG( "TABLE", stream ) {}
152
+
153
+ TABLE& border( int value )
154
+ { m_stream << " border='" << value << "'"; return *this; }
155
+ TABLE& cellspacing( int value )
156
+ { m_stream << " cellspacing='" << value << "'"; return *this; }
157
+ TABLE& width( int value )
158
+ { m_stream << " width='" << value << "%'"; return *this; }
159
+ };
160
+
161
+ class TD : public TAG
162
+ {
163
+ public:
164
+ TD( std::ostream& stream )
165
+ : TAG( "TD", stream ) {}
166
+
167
+ TD& align( const std::string& value )
168
+ { m_stream << " align='" << value << "'"; return *this; }
169
+ };
170
+
171
+ class TITLE : public TAG
172
+ {
173
+ public:
174
+ TITLE( std::ostream& stream )
175
+ : TAG( "TITLE", stream ) {}
176
+ };
177
+
178
+ class TR : public TAG
179
+ {
180
+ public:
181
+ TR( std::ostream& stream )
182
+ : TAG( "TR", stream ) {}
183
+ };
184
+ }
185
+
186
+ #endif