OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.7.0
API documentation
LogReplayInputStream.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Onix Solutions Limited. All rights reserved.
3  *
4  * This software owned by Onix Solutions Limited and is protected by copyright law
5  * and international copyright treaties.
6  *
7  * Access to and use of the software is governed by the terms of the applicable ONIXS Software
8  * Services Agreement (the Agreement) and Customer end user license agreements granting
9  * a non-assignable, non-transferable and non-exclusive license to use the software
10  * for it's own data processing purposes under the terms defined in the Agreement.
11  *
12  * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13  * of this source code or associated reference material to any other location for further reproduction
14  * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15  *
16  * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17  * the terms of the Agreement is a violation of copyright law.
18  */
19 
20 #pragma once
21 
22 #include <cstddef>
23 
24 namespace OnixS { namespace ICE { namespace iMpact { namespace MarketData {
25 
26 /// Log replay input stream.
28 {
29 public:
30  /**
31  * Called when log player wants to read data from stream.
32  *
33  * \param data buffer to read data into
34  * \param size max size to read
35  *
36  * \returns \c 0 in case of EOF, actually read bytes count otherwise
37  *
38  * \note Implementation is free to throw any exceptions.
39  * Player would react differently depending on exception type.
40  *
41  * Particularly:
42  * - \c std::ios_base::failure -- serious problem on getting data means
43  * do not try any further reading from stream and terminate playing;
44  *
45  * Absolutely all exceptions are reported via error handler.
46  * Description string will be available for children of \c std::exception.
47  */
48  virtual size_t read(char* const data, std::size_t size) = 0;
49 
50 protected:
51  /// Deletion is not supposed through interface of this class.
52  virtual ~LogReplayInputStream() {}
53 };
54 
55 }}}} // namespace MarketData, iMpact, ICE, OnixS
virtual ~LogReplayInputStream()
Deletion is not supposed through interface of this class.
virtual size_t read(char *const data, std::size_t size)=0