OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  8.1.0
API documentation
Replay.cpp
Go to the documentation of this file.
1 /*
2 * Copyright 2002-2010 ONIX SOLUTIONS LIMITED. 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 #include <algorithm>
21 
22 #include <system/FileSystem.h>
23 #include <system/Path.h>
24 
25 #include <OnixS/HandlerCore/Compiler.h>
26 
28 
29 using namespace OnixS::System;
30 
31 namespace OnixS {
32 namespace Eurex {
33 namespace MarketData {
34 
35 void
36 ONIXS_EUREX_EMDI_API
37 gatherLogs(HandlerLogs* gatheredLogs, const std::string& root)
38 {
39  // Step 1. Retrieve file system entries of given pattern.
40  FileSystem::EntriesNames logs;
41 
42  FileSystem::getEntries(root, "*.log", &logs);
43 
44  std::sort(logs.begin(), logs.end());
45 
46  // Step 2. Make each found entry as full path.
47  Path rootPath(root);
48  for (
49  FileSystem::EntriesNames::const_iterator logEntry = logs.begin();
50  logEntry != logs.end(); ++logEntry)
51  {
52  Path fullPath(rootPath);
53 
54  fullPath.append(*logEntry);
55 
56  gatheredLogs->push_back(fullPath.toString());
57  }
58 }
59 
60 ReplayListener::~ReplayListener()
61 {
62 }
63 
64 }}}
Definition: Defines.h:30
void ONIXS_EUREX_EMDI_API gatherLogs(HandlerLogs *gatheredLogs, const std::string &root)
Gathers log files logs which are stored in a given folder.
Definition: Replay.cpp:37
std::vector< std::string > HandlerLogs
Definition: Replay.h:35