Main Page
Namespaces
Classes
Files
File List
File Members
cartographer
common
configuration_file_resolver.h
Go to the documentation of this file.
1
/*
2
* Copyright 2016 The Cartographer Authors
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#ifndef CARTOGRAPHER_COMMON_CONFIGURATION_FILE_RESOLVER_H_
18
#define CARTOGRAPHER_COMMON_CONFIGURATION_FILE_RESOLVER_H_
19
20
#include <vector>
21
22
#include "
cartographer/common/lua_parameter_dictionary.h
"
23
#include "
cartographer/common/port.h
"
24
25
namespace
cartographer
{
26
namespace
common {
27
28
// A 'FileResolver' for the 'LuaParameterDictionary' that reads files from disk.
29
// It searches the 'configuration_files_directories' in order to find the
30
// requested filename. The last place searched is always the
31
// 'configuration_files/' directory installed with Cartographer. It contains
32
// reasonable configuration for the various Cartographer components which
33
// provide a good starting ground for new platforms.
34
class
ConfigurationFileResolver
:
public
FileResolver
{
35
public
:
36
explicit
ConfigurationFileResolver
(
37
const
std::vector<string>& configuration_files_directories);
38
39
string
GetFullPathOrDie
(
const
string
& basename)
override
;
40
string
GetFileContentOrDie
(
const
string
& basename)
override
;
41
42
private
:
43
std::vector<string>
configuration_files_directories_
;
44
};
45
46
}
// namespace common
47
}
// namespace cartographer
48
49
#endif // CARTOGRAPHER_COMMON_CONFIGURATION_FILE_RESOLVER_H_
cartographer::common::ConfigurationFileResolver::ConfigurationFileResolver
ConfigurationFileResolver(const std::vector< string > &configuration_files_directories)
Definition:
configuration_file_resolver.cc:29
cartographer::common::ConfigurationFileResolver
Definition:
configuration_file_resolver.h:34
cartographer::common::FileResolver
Definition:
lua_parameter_dictionary.h:34
lua_parameter_dictionary.h
cartographer::common::ConfigurationFileResolver::GetFullPathOrDie
string GetFullPathOrDie(const string &basename) override
Definition:
configuration_file_resolver.cc:35
cartographer::common::ConfigurationFileResolver::configuration_files_directories_
std::vector< string > configuration_files_directories_
Definition:
configuration_file_resolver.h:43
cartographer
Definition:
blocking_queue.h:29
port.h
cartographer::common::ConfigurationFileResolver::GetFileContentOrDie
string GetFileContentOrDie(const string &basename) override
Definition:
configuration_file_resolver.cc:47
cartographer
Author(s):
autogenerated on Mon Jun 10 2019 12:51:38