Elements 6.2.1
A C++ base framework for the Euclid Software.
Loading...
Searching...
No Matches
DependencyConfiguration.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2012-2020 Euclid Science Ground Segment
3 *
4 * This library is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License as published by the Free
6 * Software Foundation; either version 3.0 of the License, or (at your option)
7 * any later version.
8 *
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 * details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#include <fstream>
20#include <map>
21#include <string>
22#include <vector>
23
25
26namespace Elements {
27inline namespace Services {
28namespace DataSync {
29
30using std::string;
31using std::vector;
32
34 : m_aliasSeparator('\t'), m_distantRoot(distantRoot), m_localRoot(localRoot), m_fileMap() {
36}
37
41
43 return m_fileMap.at(localFile); // @TODO error handling
44}
45
49
57
65
74
82
86
88 string::size_type offset = line.find(m_aliasSeparator);
89 return offset != string::npos;
90}
91
93 string::size_type offset = line.find(m_aliasSeparator);
94 const string distantFilename = line.substr(0, offset);
95 const string localFilename = line.substr(offset + 1);
99}
100
106
107} // namespace DataSync
108} // namespace Services
109} // namespace Elements
T at(T... args)
DependencyConfiguration(path distantRoot, path localRoot, path configFile)
T emplace_back(T... args)
T getline(T... args)
ELEMENTS_API path confFilePath(path filename)
Path::Item path
importing the path item from ElementsKernel
T size(T... args)