Parser.h
Go to the documentation of this file.
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_PARSER_H
23 #define FIX_PARSER_H
24 
25 #ifdef _MSC_VER
26 #pragma warning( disable : 4503 4355 4786 4290 )
27 #endif
28 
29 #include "Exceptions.h"
30 #include <iostream>
31 #include <string>
32 
33 namespace FIX
34 {
36 class Parser
37 {
38 public:
39  Parser() {}
40  ~Parser() {}
41 
42  bool extractLength( int& length, std::string::size_type& pos,
43  const std::string& buffer )
44  throw ( MessageParseError );
45  bool readFixMessage( std::string& str )
46  throw ( MessageParseError );
47 
48  void addToStream( const char* str, size_t len )
49  { m_buffer.append( str, len ); }
50  void addToStream( const std::string& str )
51  { m_buffer.append( str ); }
52 
53 private:
54  std::string m_buffer;
55 };
56 }
57 #endif //FIX_PARSER_H
FIX::Parser::~Parser
~Parser()
Definition: Parser.h:74
FIX::Parser::Parser
Parser()
Definition: Parser.h:73
FIX::Parser::extractLength
bool extractLength(int &length, std::string::size_type &pos, const std::string &buffer)
Definition: Parser.cpp:50
FIX
Definition: Acceptor.cpp:34
FIX::Parser::m_buffer
std::string m_buffer
Definition: Parser.h:88
FIX::Parser::addToStream
void addToStream(const char *str, size_t len)
Definition: Parser.h:82
FIX::Parser::readFixMessage
bool readFixMessage(std::string &str)
Definition: Parser.cpp:76
Exceptions.h

Generated on Wed Apr 29 2020 19:41:30 for QuickFIX by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2001