DataDictionary.cpp
Go to the documentation of this file.
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 "DataDictionary.h"
27 #include "Message.h"
28 #include <fstream>
29 #include <memory>
30 
31 #include "PUGIXML_DOMDocument.h"
32 
33 #ifdef _MSC_VER
34 #define RESET_AUTO_PTR(OLD, NEW) OLD = NEW;
35 #else
36 #define RESET_AUTO_PTR(OLD, NEW) OLD.reset( NEW.release() );
37 #endif
38 
39 namespace FIX
40 {
42 : m_hasVersion( false ), m_checkFieldsOutOfOrder( true ),
43  m_checkFieldsHaveValues( true ), m_checkUserDefinedFields( true )
44 {}
45 
46 DataDictionary::DataDictionary( std::istream& stream )
47 throw( ConfigError )
48 : m_hasVersion( false ), m_checkFieldsOutOfOrder( true ),
50 {
51  readFromStream( stream );
52 }
53 
54 DataDictionary::DataDictionary( const std::string& url )
55 throw( ConfigError )
56 : m_hasVersion( false ), m_checkFieldsOutOfOrder( true ),
59 {
60  readFromURL( url );
61 }
62 
64 {
65  *this = copy;
66 }
67 
69 {
70  FieldToGroup::iterator i;
71  for ( i = m_groups.begin(); i != m_groups.end(); ++i )
72  {
73  const FieldPresenceMap& presenceMap = i->second;
74 
75  FieldPresenceMap::const_iterator iter = presenceMap.begin();
76  for ( ; iter != presenceMap.end(); ++iter )
77  delete iter->second.second;
78  }
79 }
80 
82 {
90  m_messages = rhs.m_messages;
91  m_fields = rhs.m_fields;
99  m_names = rhs.m_names;
102 
103  FieldToGroup::const_iterator i = rhs.m_groups.begin();
104  for ( ; i != rhs.m_groups.end(); ++i )
105  {
106  const FieldPresenceMap& presenceMap = i->second;
107 
108  FieldPresenceMap::const_iterator iter = presenceMap.begin();
109  for ( ; iter != presenceMap.end(); ++iter )
110  {
111  addGroup( iter->first, i->first, iter->second.first, *iter->second.second );
112  }
113  }
114  return *this;
115 }
116 
117 void DataDictionary::validate( const Message& message,
118  const DataDictionary* const pSessionDD,
119  const DataDictionary* const pAppDD )
120 throw( FIX::Exception )
121 {
122  const Header& header = message.getHeader();
123  const BeginString& beginString = FIELD_GET_REF( header, BeginString );
124  const MsgType& msgType = FIELD_GET_REF( header, MsgType );
125  if ( pSessionDD != 0 && pSessionDD->m_hasVersion )
126  {
127  if( pSessionDD->getVersion() != beginString )
128  {
129  throw UnsupportedVersion();
130  }
131  }
132 
133  int field = 0;
134  if( (pSessionDD !=0 && pSessionDD->m_checkFieldsOutOfOrder) ||
135  (pAppDD != 0 && pAppDD->m_checkFieldsOutOfOrder) )
136  {
137  if ( !message.hasValidStructure(field) )
138  throw TagOutOfOrder(field);
139  }
140 
141  if ( pAppDD != 0 && pAppDD->m_hasVersion )
142  {
143  pAppDD->checkMsgType( msgType );
144  pAppDD->checkHasRequired( message.getHeader(), message, message.getTrailer(), msgType );
145  }
146 
147  if( pSessionDD != 0 )
148  {
149  pSessionDD->iterate( message.getHeader(), msgType );
150  pSessionDD->iterate( message.getTrailer(), msgType );
151  }
152 
153  if( pAppDD != 0 )
154  {
155  pAppDD->iterate( message, msgType );
156  }
157 }
158 
159 void DataDictionary::iterate( const FieldMap& map, const MsgType& msgType ) const
160 {
161  int lastField = 0;
162 
164  for ( i = map.begin(); i != map.end(); ++i )
165  {
166  const FieldBase& field = i->second;
167  if( i != map.begin() && (field.getField() == lastField) )
168  throw RepeatedTag( lastField );
169  checkHasValue( field );
170 
171  if ( m_hasVersion )
172  {
173  checkValidFormat( field );
174  checkValue( field );
175  }
176 
177  if ( m_beginString.getValue().length() && shouldCheckTag(field) )
178  {
179  checkValidTagNumber( field );
180  if ( !Message::isHeaderField( field, this )
181  && !Message::isTrailerField( field, this ) )
182  {
183  checkIsInMessage( field, msgType );
184  checkGroupCount( field, map, msgType );
185  }
186  }
187  lastField = field.getField();
188  }
189 }
190 
191 void DataDictionary::readFromURL( const std::string& url )
192 throw( ConfigError )
193 {
195 
196  if(!pDoc->load(url))
197  throw ConfigError(url + ": Could not parse data dictionary file");
198 
199  try
200  {
201  readFromDocument( pDoc );
202  }
203  catch( ConfigError& e )
204  {
205  throw ConfigError( url + ": " + e.what() );
206  }
207 }
208 
209 void DataDictionary::readFromStream( std::istream& stream )
210 throw( ConfigError )
211 {
213 
214  if(!pDoc->load(stream))
215  throw ConfigError("Could not parse data dictionary stream");
216 
217  readFromDocument( pDoc );
218 }
219 
221 throw( ConfigError )
222 {
223  // VERSION
224  DOMNodePtr pFixNode = pDoc->getNode("/fix");
225  if(!pFixNode.get())
226  throw ConfigError("Could not parse data dictionary file"
227  ", or no <fix> node found at root");
228  DOMAttributesPtr attrs = pFixNode->getAttributes();
229  std::string type = "FIX";
230  if(attrs->get("type", type))
231  {
232  if(type != "FIX" && type != "FIXT")
233  throw ConfigError("type attribute must be FIX or FIXT");
234  }
235  std::string major;
236  if(!attrs->get("major", major))
237  throw ConfigError("major attribute not found on <fix>");
238  std::string minor;
239  if(!attrs->get("minor", minor))
240  throw ConfigError("minor attribute not found on <fix>");
241  setVersion(type + "." + major + "." + minor);
242 
243  // FIELDS
244  DOMNodePtr pFieldsNode = pDoc->getNode("/fix/fields");
245  if(!pFieldsNode.get())
246  throw ConfigError("<fields> section not found in data dictionary");
247 
248  DOMNodePtr pFieldNode = pFieldsNode->getFirstChildNode();
249  if(!pFieldNode.get()) throw ConfigError("No fields defined");
250 
251  while(pFieldNode.get())
252  {
253  if(pFieldNode->getName() == "field")
254  {
255  DOMAttributesPtr attrs = pFieldNode->getAttributes();
256  std::string name;
257  if(!attrs->get("name", name))
258  throw ConfigError("<field> does not have a name attribute");
259  std::string number;
260  if(!attrs->get("number", number))
261  throw ConfigError("<field> " + name + " does not have a number attribute");
262  int num = atoi(number.c_str());
263  std::string type;
264  if(!attrs->get("type", type))
265  throw ConfigError("<field> " + name + " does not have a type attribute");
266  addField(num);
267  addFieldType(num, XMLTypeToType(type));
268  addFieldName(num, name);
269 
270  DOMNodePtr pFieldValueNode = pFieldNode->getFirstChildNode();
271  while(pFieldValueNode.get())
272  {
273  if(pFieldValueNode->getName() == "value")
274  {
275  DOMAttributesPtr attrs = pFieldValueNode->getAttributes();
276  std::string enumeration;
277  if(!attrs->get("enum", enumeration))
278  throw ConfigError("<value> does not have enum attribute in field " + name);
279  addFieldValue(num, enumeration);
280  std::string description;
281  if(attrs->get("description", description))
282  addValueName(num, enumeration, description);
283  }
284  RESET_AUTO_PTR(pFieldValueNode, pFieldValueNode->getNextSiblingNode());
285  }
286  }
287  RESET_AUTO_PTR(pFieldNode, pFieldNode->getNextSiblingNode());
288  }
289 
290  // HEADER
291  if( type == "FIXT" || (type == "FIX" && major < "5") )
292  {
293  DOMNodePtr pHeaderNode = pDoc->getNode("/fix/header");
294  if(!pHeaderNode.get())
295  throw ConfigError("<header> section not found in data dictionary");
296 
297  DOMNodePtr pHeaderFieldNode = pHeaderNode->getFirstChildNode();
298  if(!pHeaderFieldNode.get()) throw ConfigError("No header fields defined");
299 
300  while(pHeaderFieldNode.get())
301  {
302  if(pHeaderFieldNode->getName() == "field" || pHeaderFieldNode->getName() == "group" )
303  {
304  DOMAttributesPtr attrs = pHeaderFieldNode->getAttributes();
305  std::string name;
306  if(!attrs->get("name", name))
307  throw ConfigError("<field> does not have a name attribute");
308  std::string required = "false";
309  attrs->get("required", required);
310  addHeaderField(lookupXMLFieldNumber(pDoc.get(), name), required == "true");
311  }
312  if(pHeaderFieldNode->getName() == "group")
313  {
314  DOMAttributesPtr attrs = pHeaderFieldNode->getAttributes();
315  std::string required;
316  attrs->get("required", required);
317  bool isRequired = (required == "Y" || required == "y");
318  addXMLGroup(pDoc.get(), pHeaderFieldNode.get(), "_header_", *this, isRequired);
319  }
320 
321  RESET_AUTO_PTR(pHeaderFieldNode, pHeaderFieldNode->getNextSiblingNode());
322  }
323  }
324 
325  // TRAILER
326  if( type == "FIXT" || (type == "FIX" && major < "5") )
327  {
328  DOMNodePtr pTrailerNode = pDoc->getNode("/fix/trailer");
329  if(!pTrailerNode.get())
330  throw ConfigError("<trailer> section not found in data dictionary");
331 
332  DOMNodePtr pTrailerFieldNode = pTrailerNode->getFirstChildNode();
333  if(!pTrailerFieldNode.get()) throw ConfigError("No trailer fields defined");
334 
335  while(pTrailerFieldNode.get())
336  {
337  if(pTrailerFieldNode->getName() == "field" || pTrailerFieldNode->getName() == "group" )
338  {
339  DOMAttributesPtr attrs = pTrailerFieldNode->getAttributes();
340  std::string name;
341  if(!attrs->get("name", name))
342  throw ConfigError("<field> does not have a name attribute");
343  std::string required = "false";
344  attrs->get("required", required);
345  addTrailerField(lookupXMLFieldNumber(pDoc.get(), name), required == "true");
346  }
347  if(pTrailerFieldNode->getName() == "group")
348  {
349  DOMAttributesPtr attrs = pTrailerFieldNode->getAttributes();
350  std::string required;
351  attrs->get("required", required);
352  bool isRequired = (required == "Y" || required == "y");
353  addXMLGroup(pDoc.get(), pTrailerFieldNode.get(), "_trailer_", *this, isRequired);
354  }
355 
356  RESET_AUTO_PTR(pTrailerFieldNode, pTrailerFieldNode->getNextSiblingNode());
357  }
358  }
359 
360  // MSGTYPE
361  DOMNodePtr pMessagesNode = pDoc->getNode("/fix/messages");
362  if(!pMessagesNode.get())
363  throw ConfigError("<messages> section not found in data dictionary");
364 
365  DOMNodePtr pMessageNode = pMessagesNode->getFirstChildNode();
366  if(!pMessageNode.get()) throw ConfigError("No messages defined");
367 
368  while(pMessageNode.get())
369  {
370  if(pMessageNode->getName() == "message")
371  {
372  DOMAttributesPtr attrs = pMessageNode->getAttributes();
373  std::string msgtype;
374  if(!attrs->get("msgtype", msgtype))
375  throw ConfigError("<field> does not have a name attribute");
376  addMsgType(msgtype);
377 
378  std::string name;
379  if(attrs->get("name", name))
380  addValueName( 35, msgtype, name );
381 
382  DOMNodePtr pMessageFieldNode = pMessageNode->getFirstChildNode();
383  while( pMessageFieldNode.get() )
384  {
385  if(pMessageFieldNode->getName() == "field"
386  || pMessageFieldNode->getName() == "group")
387  {
388  DOMAttributesPtr attrs = pMessageFieldNode->getAttributes();
389  std::string name;
390  if(!attrs->get("name", name))
391  throw ConfigError("<field> does not have a name attribute");
392  int num = lookupXMLFieldNumber(pDoc.get(), name);
393  addMsgField(msgtype, num);
394 
395  std::string required;
396  if(attrs->get("required", required)
397  && (required == "Y" || required == "y"))
398  {
399  addRequiredField(msgtype, num);
400  }
401  }
402  else if(pMessageFieldNode->getName() == "component")
403  {
404  DOMAttributesPtr attrs = pMessageFieldNode->getAttributes();
405  std::string required;
406  attrs->get("required", required);
407  bool isRequired = (required == "Y" || required == "y");
408  addXMLComponentFields(pDoc.get(), pMessageFieldNode.get(),
409  msgtype, *this, isRequired);
410  }
411  if(pMessageFieldNode->getName() == "group")
412  {
413  DOMAttributesPtr attrs = pMessageFieldNode->getAttributes();
414  std::string required;
415  attrs->get("required", required);
416  bool isRequired = (required == "Y" || required == "y");
417  addXMLGroup(pDoc.get(), pMessageFieldNode.get(), msgtype, *this, isRequired);
418  }
419  RESET_AUTO_PTR(pMessageFieldNode,
420  pMessageFieldNode->getNextSiblingNode());
421  }
422  }
423  RESET_AUTO_PTR(pMessageNode, pMessageNode->getNextSiblingNode());
424  }
425 }
426 
428 {
430 
431  int * tmp = new int[m_orderedFields.size() + 1];
432  int * i = tmp;
433 
434  OrderedFields::const_iterator iter;
435  for( iter = m_orderedFields.begin(); iter != m_orderedFields.end(); *(i++) = *(iter++) ) {}
436  *i = 0;
437 
439  delete [] tmp;
440 
441  return m_orderedFieldsArray;
442 }
443 
445 {
446  DOMAttributesPtr attrs = pNode->getAttributes();
447  std::string name;
448  if(!attrs->get("name", name))
449  throw ConfigError("No name given to field");
450  return lookupXMLFieldNumber( pDoc, name );
451 }
452 
454 ( DOMDocument* pDoc, const std::string& name ) const
455 {
456  NameToField::const_iterator i = m_names.find(name);
457  if( i == m_names.end() )
458  throw ConfigError("Field " + name + " not defined in fields section");
459  return i->second;
460 }
461 
463  const std::string& msgtype,
464  DataDictionary& DD,
465  bool componentRequired )
466 {
467  int firstField = 0;
468 
469  DOMAttributesPtr attrs = pNode->getAttributes();
470  std::string name;
471  if(!attrs->get("name", name))
472  throw ConfigError("No name given to component");
473 
474  DOMNodePtr pComponentNode =
475  pDoc->getNode("/fix/components/component[@name='" + name + "']");
476  if(pComponentNode.get() == 0)
477  throw ConfigError("Component not found");
478 
479  DOMNodePtr pComponentFieldNode = pComponentNode->getFirstChildNode();
480  while(pComponentFieldNode.get())
481  {
482  if(pComponentFieldNode->getName() == "field"
483  || pComponentFieldNode->getName() == "group")
484  {
485  DOMAttributesPtr attrs = pComponentFieldNode->getAttributes();
486  std::string name;
487  if(!attrs->get("name", name))
488  throw ConfigError("No name given to field");
489  int field = lookupXMLFieldNumber(pDoc, name);
490  if( firstField == 0 ) firstField = field;
491 
492  std::string required;
493  if(attrs->get("required", required)
494  && (required == "Y" || required =="y")
495  && componentRequired)
496  {
497  addRequiredField(msgtype, field);
498  }
499 
500  DD.addField(field);
501  DD.addMsgField(msgtype, field);
502  }
503  if(pComponentFieldNode->getName() == "component")
504  {
505  DOMAttributesPtr attrs = pComponentFieldNode->getAttributes();
506  std::string required;
507  attrs->get("required", required);
508  bool isRequired = (required == "Y" || required == "y");
509  addXMLComponentFields(pDoc, pComponentFieldNode.get(),
510  msgtype, DD, isRequired);
511  }
512  if(pComponentFieldNode->getName() == "group")
513  {
514  DOMAttributesPtr attrs = pComponentFieldNode->getAttributes();
515  std::string required;
516  attrs->get("required", required);
517  bool isRequired = (required == "Y" || required == "y");
518  addXMLGroup(pDoc, pComponentFieldNode.get(), msgtype, DD, isRequired);
519  }
520  RESET_AUTO_PTR(pComponentFieldNode,
521  pComponentFieldNode->getNextSiblingNode());
522  }
523  return firstField;
524 }
525 
527  const std::string& msgtype,
528  DataDictionary& DD, bool groupRequired )
529 {
530  DOMAttributesPtr attrs = pNode->getAttributes();
531  std::string name;
532  if(!attrs->get("name", name))
533  throw ConfigError("No name given to group");
534  int group = lookupXMLFieldNumber( pDoc, name );
535  int delim = 0;
536  int field = 0;
537  DataDictionary groupDD;
538  DOMNodePtr node = pNode->getFirstChildNode();
539  while(node.get())
540  {
541  if( node->getName() == "field" )
542  {
543  field = lookupXMLFieldNumber( pDoc, node.get() );
544  groupDD.addField( field );
545 
546  DOMAttributesPtr attrs = node->getAttributes();
547  std::string required;
548  if( attrs->get("required", required)
549  && ( required == "Y" || required =="y" )
550  && groupRequired )
551  {
552  groupDD.addRequiredField(msgtype, field);
553  }
554  }
555  else if( node->getName() == "component" )
556  {
557  field = addXMLComponentFields( pDoc, node.get(), msgtype, groupDD, false );
558  }
559  else if( node->getName() == "group" )
560  {
561  field = lookupXMLFieldNumber( pDoc, node.get() );
562  groupDD.addField( field );
563  DOMAttributesPtr attrs = node->getAttributes();
564  std::string required;
565  if( attrs->get("required", required )
566  && ( required == "Y" || required =="y" )
567  && groupRequired)
568  {
569  groupDD.addRequiredField(msgtype, field);
570  }
571  bool isRequired = false;
572  if( attrs->get("required", required) )
573  isRequired = (required == "Y" || required == "y");
574  addXMLGroup( pDoc, node.get(), msgtype, groupDD, isRequired );
575  }
576  if( delim == 0 ) delim = field;
577  RESET_AUTO_PTR(node, node->getNextSiblingNode());
578  }
579 
580  if( delim ) DD.addGroup( msgtype, group, delim, groupDD );
581 }
582 
583 TYPE::Type DataDictionary::XMLTypeToType( const std::string& type ) const
584 {
585  if ( m_beginString < "FIX.4.2" && type == "CHAR" )
586  return TYPE::String;
587 
588  if ( type == "STRING" ) return TYPE::String;
589  if ( type == "CHAR" ) return TYPE::Char;
590  if ( type == "PRICE" ) return TYPE::Price;
591  if ( type == "INT" ) return TYPE::Int;
592  if ( type == "AMT" ) return TYPE::Amt;
593  if ( type == "QTY" ) return TYPE::Qty;
594  if ( type == "CURRENCY" ) return TYPE::Currency;
595  if ( type == "MULTIPLEVALUESTRING" ) return TYPE::MultipleValueString;
596  if ( type == "MULTIPLESTRINGVALUE" ) return TYPE::MultipleStringValue;
597  if ( type == "MULTIPLECHARVALUE" ) return TYPE::MultipleCharValue;
598  if ( type == "EXCHANGE" ) return TYPE::Exchange;
599  if ( type == "UTCTIMESTAMP" ) return TYPE::UtcTimeStamp;
600  if ( type == "BOOLEAN" ) return TYPE::Boolean;
601  if ( type == "LOCALMKTDATE" ) return TYPE::LocalMktDate;
602  if ( type == "DATA" ) return TYPE::Data;
603  if ( type == "FLOAT" ) return TYPE::Float;
604  if ( type == "PRICEOFFSET" ) return TYPE::PriceOffset;
605  if ( type == "MONTHYEAR" ) return TYPE::MonthYear;
606  if ( type == "DAYOFMONTH" ) return TYPE::DayOfMonth;
607  if ( type == "UTCDATE" ) return TYPE::UtcDate;
608  if ( type == "UTCDATEONLY" ) return TYPE::UtcDateOnly;
609  if ( type == "UTCTIMEONLY" ) return TYPE::UtcTimeOnly;
610  if ( type == "NUMINGROUP" ) return TYPE::NumInGroup;
611  if ( type == "PERCENTAGE" ) return TYPE::Percentage;
612  if ( type == "SEQNUM" ) return TYPE::SeqNum;
613  if ( type == "LENGTH" ) return TYPE::Length;
614  if ( type == "COUNTRY" ) return TYPE::Country;
615  if ( type == "TIME" ) return TYPE::UtcTimeStamp;
616  return TYPE::Unknown;
617 }
618 }
virtual std::auto_ptr< DOMNode > getNode(const std::string &)=0
MsgTypeToField m_requiredFields
virtual std::auto_ptr< DOMNode > getFirstChildNode()=0
iterator begin() const
Definition: FieldMap.h:214
Fields::const_iterator iterator
Definition: FieldMap.h:59
void checkGroupCount(const FieldBase &field, const FieldMap &fieldMap, const MsgType &msgType) const
Check if group count matches number of groups in.
Represents a data dictionary for a version of FIX.
void iterate(const FieldMap &map, const MsgType &msgType) const
Iterate through fields while applying checks.
OrderedFields m_orderedFields
Repeated tag not part of repeating group.
Definition: Exceptions.h:199
void addGroup(const std::string &msg, int field, int delim, const DataDictionary &dataDictionary)
virtual std::auto_ptr< DOMAttributes > getAttributes()=0
NonBodyFields m_headerFields
std::auto_ptr< DOMAttributes > DOMAttributesPtr
Definition: DOMDocument.h:43
void readFromDocument(DOMDocumentPtr pDoc)
void checkValidFormat(const FieldBase &field) const
iterator end() const
Definition: FieldMap.h:215
void addMsgField(const std::string &msgType, int field)
FieldToName m_fieldNames
void addTrailerField(int field, bool required)
BeginString m_beginString
void addXMLGroup(DOMDocument *, DOMNode *, const std::string &msgtype, DataDictionary &, bool)
void readFromURL(const std::string &url)
MsgTypeToField m_messageFields
#define RESET_AUTO_PTR(OLD, NEW)
void checkIsInMessage(const FieldBase &field, const MsgType &msgType) const
Check if a field is in this message type.
FieldToValue m_fieldValues
void readFromStream(std::istream &stream)
int addXMLComponentFields(DOMDocument *, DOMNode *, const std::string &msgtype, DataDictionary &, bool)
Definition: Acceptor.cpp:34
std::auto_ptr< DOMDocument > DOMDocumentPtr
Definition: DOMDocument.h:71
static void validate(const Message &message, const DataDictionary *const pSessionDD, const DataDictionary *const pAppID)
Validate a message.
void checkValue(const FieldBase &field) const
Stores and organizes a collection of Fields.
Definition: FieldMap.h:46
bool shouldCheckTag(const FieldBase &field) const
If we need to check for the tag in the dictionary.
void addHeaderField(int field, bool required)
XML document as represented by pugixml.
DataDictionary & operator=(const DataDictionary &rhs)
Application is not configured correctly
Definition: Exceptions.h:87
Version of FIX is not supported.
Definition: Exceptions.h:183
void addValueName(int field, const std::string &value, const std::string &name)
std::auto_ptr< DOMNode > DOMNodePtr
Definition: DOMDocument.h:57
message_order const & getOrderedFields() const
Tag is not in the correct order.
Definition: Exceptions.h:190
Base class for all FIX messages.
Definition: Message.h:67
int lookupXMLFieldNumber(DOMDocument *, DOMNode *) const
ValueToName m_valueNames
int getField() const
Get the fields integer tag.
Definition: Field.h:108
void addField(int field)
FieldToGroup m_groups
void addFieldName(int field, const std::string &name)
Base representation of all Field classes.
Definition: Field.h:45
void checkValidTagNumber(const FieldBase &field) const
Check if field tag number is defined in spec.
void setVersion(const std::string &beginString)
Sorts fields in header, normal, or trailer order.
void addFieldValue(int field, const std::string &value)
const int BeginString
Interface that represents node from underlying XML parser.
Definition: DOMDocument.h:46
void checkHasValue(const FieldBase &field) const
Check if a field has a value.
std::map< std::string, std::pair< int, DataDictionary *> > FieldPresenceMap
NonBodyFields m_trailerFields
#define FIELD_GET_REF(MAP, FLD)
Definition: FieldMap.h:238
void addMsgType(const std::string &msgType)
const int MsgType
static bool isHeaderField(int field)
Definition: Message.cpp:400
static bool isTrailerField(int field)
Definition: Message.cpp:447
OrderedFieldsArray m_orderedFieldsArray
void addFieldType(int field, FIX::TYPE::Type type)
TYPE::Type XMLTypeToType(const std::string &xmlType) const
Base QuickFIX exception type.
Definition: Exceptions.h:33
void addRequiredField(const std::string &msgType, int field)
Interface that represents document of underlying XML parser.
Definition: DOMDocument.h:60

Generated on Thu Sep 5 2019 11:07:58 for QuickFIX by doxygen 1.8.13 written by Dimitri van Heesch, © 1997-2001