OnixS C++ CME Audit Trail Generator  3.4.0
API documentation
AuditTrailGenerator.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 #pragma once
20 
21 #include <OnixS/CME/Trading/Export.h>
22 
23 #include <OnixS/FIXEngine/FIX/Timestamp.h>
24 
25 #include <string>
26 #include <vector>
27 
28 namespace OnixS { namespace CME { namespace Trading {
29 
30 /// This class is designed to generate a complete and accurate record
31 /// of all activity recorded in the OnixS FIX Engine .summary file.
32 class ONIXS_CME_AUDIT_TRAIL_GENERATOR_EXPORT AuditTrailGenerator
33 {
34 public:
35  /// Constructor.
36  ///
37  /// \param cmeTradeDayStartTimeUtc CME trade day start time in UTC.
38  /// \param outputFilenameExtension Filename extension for output file(s). Default value is "csv".
39  /// \param outputFieldDelimiter Field delimiter for output file(s). Default value is ';'.
40  /// \param outputDirectory A path to a directory where to save output files.
42  const FIX::Timestamp& cmeTradeDayStartTimeUtc
43  , const std::string& outputFilenameExtension = "csv"
44  , char outputFieldDelimiter = ';'
45  , const std::string& outputDirectory = ""
46  );
47 
48  /// Destructor.
50 
51  /// Generates a report.
52  ///
53  /// The report will be saved to the same path (if output directory is not
54  /// specified) or to the output directory passed in constructor with the
55  /// same name as a .summary file, but with the extension specified in the
56  /// constructor.
57  ///
58  /// \param path Path to a `.summary` file.
59  void generate(const std::string& path);
60 
61  /// Generates reports for the list of files.
62  ///
63  /// \param paths List of paths to `.summary` files.
64  void generate(const std::vector<std::string>& paths);
65 
66  /// Generates reports for all the `.summary` files the directory.
67  ///
68  /// \param path Path to a directory.
69  void generateForDirectory(const std::string& path);
70 
71  /// Version of audit trail generator.
72  ///
73  /// \return version in format a.b.c.d.
74  static const std::string& version();
75 
76 private:
77  class Impl;
78  Impl* impl_;
79 };
80 
81 }}}