OnixS Eurex ETI Handler C++ library
9.21.0
API documentation
Home
Contents
Namespaces
Classes
Files
File List
include
OnixS
Eurex
Trading
AuditTrail.h
Go to the documentation of this file.
1
/*
2
* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3
*
4
* This software owned by Onix Solutions Limited [OnixS] 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
13
* part of this source code or associated reference material to any other location for further
14
* reproduction or redistribution, and any amendments to this copyright notice, are expressly
15
* prohibited.
16
*
17
* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
18
* the terms of the Agreement is a violation of copyright law.
19
*/
20
21
#pragma once
22
23
#include "OnixS/Eurex/Trading/Export.h"
24
#include "
OnixS/Eurex/Trading/Message.h
"
25
#include "
OnixS/Eurex/Trading/MessageInfo.h
"
26
#include "
OnixS/Eurex/Trading/Time.h
"
27
#include "OnixS/Eurex/Trading/UniquePtr.h"
28
29
#include <string>
30
31
namespace
OnixS
{
namespace
Eurex {
namespace
Trading {
namespace
AuditTrail {
32
33
/// Indicates message flow direction.
34
struct
ONIXS_EUREX_ETI_EXPORT
Direction
35
{
36
/// \copydoc Direction
37
enum
Enum
38
{
39
NoValue
,
///< No value.
40
In
,
///< Received.
41
Out
,
///< Sent.
42
};
43
44
/// Returns string representation.
45
static
std::string toString(
Enum
);
46
};
47
48
/// Collects Audit Trail file record fields.
49
struct
ONIXS_EUREX_ETI_EXPORT
Entry
50
{
51
/// Creates empty record entry.
52
Entry
()
53
: direction(
Direction
::NoValue)
54
{
55
}
56
57
/// Direction.
58
Direction::Enum
direction
;
59
60
/// Timestamp.
61
HighResolutionTimeFields
timestamp
;
62
63
/// Message.
64
PtrTraits<Message>::UniquePtr
message
;
65
66
/// Message info.
67
MessageInfo
messageInfo
;
68
};
69
70
/// A Reader reads Audit Trail files, created by Handler,
71
/// and decodes them into entries. Each entry contains direction
72
/// (In or Out), timestamp, message info and pointer to Message object.
73
class
ONIXS_EUREX_ETI_EXPORT
Reader
74
{
75
public
:
76
/// Creates an Reader that reads files from given directory.
77
///
78
/// \param filePath full path to Audit Trail file.
79
Reader
(
const
std::string& filePath);
80
81
/// Creates an Reader that reads files from given directory.
82
///
83
/// \param directory the directory where audit trail files stored.
84
/// \param fileNamePrefix template of Audit Trail file name without extension.
85
///
86
/// \remarks Standard wildcard '*' can be used in fileNamePrefix argument.
87
Reader
(
const
std::string& directory,
const
std::string& fileNamePrefix);
88
89
/// Releases any system resources associated with instance.
90
~
Reader
();
91
92
/// Reads a single Audit Trail entry.
93
///
94
/// \param entry Audit Trail record entry fields.
95
bool
read(
Entry
& entry);
96
97
private
:
98
Reader
(
const
Reader
&);
// no implementation
99
Reader
& operator=(
const
Reader
&);
// no implementation
100
101
private
:
102
struct
Impl;
103
Impl* impl_;
104
};
105
106
}}}}
// namespace OnixS::Eurex::Trading::AuditTrail
OnixS::Eurex::Trading::AuditTrail::Direction::NoValue
No value.
Definition:
AuditTrail.h:39
OnixS::Eurex::Trading::AuditTrail::Entry::timestamp
HighResolutionTimeFields timestamp
Timestamp.
Definition:
AuditTrail.h:61
Message.h
MessageInfo.h
OnixS::Eurex::Trading::HighResolutionTimeFields
Fields of HighResolutionTime.
Definition:
Time.h:58
Time.h
OnixS::Eurex::Trading::AuditTrail::Entry
Collects Audit Trail file record fields.
Definition:
AuditTrail.h:49
OnixS::Eurex::Trading::AuditTrail::Entry::Entry
Entry()
Creates empty record entry.
Definition:
AuditTrail.h:52
OnixS::Eurex::Trading::AuditTrail::Reader
Definition:
AuditTrail.h:73
OnixS::Eurex::Trading::AuditTrail::Direction::Enum
Enum
Indicates message flow direction.
Definition:
AuditTrail.h:37
OnixS
Definition:
AdminListener.h:39
OnixS::Eurex::Trading::AuditTrail::Direction::Out
Sent.
Definition:
AuditTrail.h:41
OnixS::Eurex::Trading::AuditTrail::Entry::message
PtrTraits< Message >::UniquePtr message
Message.
Definition:
AuditTrail.h:64
OnixS::Eurex::Trading::MessageInfo
Message info.
Definition:
MessageInfo.h:32
OnixS::Eurex::Trading::AuditTrail::Direction
Indicates message flow direction.
Definition:
AuditTrail.h:34
OnixS::Eurex::Trading::AuditTrail::Entry::messageInfo
MessageInfo messageInfo
Message info.
Definition:
AuditTrail.h:67
OnixS::Eurex::Trading::AuditTrail::Direction::In
Received.
Definition:
AuditTrail.h:40
OnixS::Eurex::Trading::AuditTrail::Entry::direction
Direction::Enum direction
Direction.
Definition:
AuditTrail.h:58