OnixS Eurex ETI Handler C++ library
9.19.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 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 "OnixS/Eurex/Trading/Export.h"
23
#include "
OnixS/Eurex/Trading/Message.h
"
24
#include "
OnixS/Eurex/Trading/MessageInfo.h
"
25
#include "
OnixS/Eurex/Trading/Time.h
"
26
#include "OnixS/Eurex/Trading/UniquePtr.h"
27
28
#include <string>
29
30
namespace
OnixS
{
31
namespace
Eurex {
32
namespace
Trading {
33
namespace
AuditTrail {
34
35
/// Indicates message flow direction.
36
struct
ONIXS_EUREX_ETI_EXPORT
Direction
37
{
38
/// \copydoc Direction
39
enum
Enum
40
{
41
NoValue
,
///< No value.
42
In
,
///< Received.
43
Out
,
///< Sent.
44
};
45
46
/// Returns string representation.
47
static
std::string toString (
Enum
);
48
};
49
50
/// Collects Audit Trail file record fields.
51
struct
ONIXS_EUREX_ETI_EXPORT
Entry
52
{
53
/// Creates empty record entry.
54
Entry
() : direction(
Direction
::NoValue) {}
55
56
/// Direction.
57
Direction::Enum
direction
;
58
59
/// Timestamp.
60
HighResolutionTimeFields
timestamp
;
61
62
/// Message.
63
PtrTraits<Message>::UniquePtr
message
;
64
65
/// Message info.
66
MessageInfo
messageInfo
;
67
};
68
69
/// A Reader reads Audit Trail files, created by Handler,
70
/// and decodes them into entries. Each entry contains direction
71
/// (In or Oout), timestamp, message info and pointer to Message object.
72
class
ONIXS_EUREX_ETI_EXPORT
Reader
73
{
74
public
:
75
/// Creates an Reader that reads files from given directory.
76
///
77
/// \param filePath full path to Audit Trail file.
78
Reader
(
const
std::string& filePath);
79
80
/// Creates an Reader that reads files from given directory.
81
///
82
/// \param directory the directory where audit trail files stored.
83
/// \param fileNamePrefix template of Audit Trail file name without extension.
84
///
85
/// \remarks Standard wildcard '*' can be used in fileNamePrefix argument.
86
Reader
(
const
std::string& directory,
const
std::string& fileNamePrefix);
87
88
/// Releases any system resources associated with instance.
89
~
Reader
();
90
91
/// Reads a single Audit Trail entry.
92
///
93
/// \param entry Audit Trail record entry fields.
94
bool
read (
Entry
& entry);
95
96
private
:
97
Reader
(
const
Reader
&);
//no implementation
98
Reader
& operator=(
const
Reader
&);
//no implementation
99
100
private
:
101
struct
Impl;
102
Impl* impl_;
103
};
104
105
}
106
}
107
}
108
}
OnixS::Eurex::Trading::AuditTrail::Direction::NoValue
No value.
Definition:
AuditTrail.h:41
OnixS::Eurex::Trading::AuditTrail::Entry::timestamp
HighResolutionTimeFields timestamp
Timestamp.
Definition:
AuditTrail.h:60
Message.h
MessageInfo.h
OnixS::Eurex::Trading::HighResolutionTimeFields
Fields of HighResolutionTime.
Definition:
Time.h:60
Time.h
OnixS::Eurex::Trading::AuditTrail::Entry
Collects Audit Trail file record fields.
Definition:
AuditTrail.h:51
OnixS::Eurex::Trading::AuditTrail::Entry::Entry
Entry()
Creates empty record entry.
Definition:
AuditTrail.h:54
OnixS::Eurex::Trading::AuditTrail::Reader
Definition:
AuditTrail.h:72
OnixS::Eurex::Trading::AuditTrail::Direction::Enum
Enum
Indicates message flow direction.
Definition:
AuditTrail.h:39
OnixS
Definition:
AdminListener.h:36
OnixS::Eurex::Trading::AuditTrail::Direction::Out
Sent.
Definition:
AuditTrail.h:43
OnixS::Eurex::Trading::AuditTrail::Entry::message
PtrTraits< Message >::UniquePtr message
Message.
Definition:
AuditTrail.h:63
OnixS::Eurex::Trading::MessageInfo
Message info.
Definition:
MessageInfo.h:33
OnixS::Eurex::Trading::AuditTrail::Direction
Indicates message flow direction.
Definition:
AuditTrail.h:36
OnixS::Eurex::Trading::AuditTrail::Entry::messageInfo
MessageInfo messageInfo
Message info.
Definition:
AuditTrail.h:66
OnixS::Eurex::Trading::AuditTrail::Direction::In
Received.
Definition:
AuditTrail.h:42
OnixS::Eurex::Trading::AuditTrail::Entry::direction
Direction::Enum direction
Direction.
Definition:
AuditTrail.h:57