-
Notifications
You must be signed in to change notification settings - Fork 4
/
label_reader.h
39 lines (32 loc) · 905 Bytes
/
label_reader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) 2016 Baidu.com, Inc. All Rights Reserved
// @author erlangz([email protected])
// @date 2016/12/22 16:29:52
// @file label_reader.h
// @brief
#ifndef ADU_PERCEPTION_LABEL_READER_H
#define ADU_PERCEPTION_LABEL_READER_H
#include "types.h"
namespace adu {
namespace perception {
class LabelsReader {
public:
typedef boost::unordered_map<std::string, Label::Ptr>::iterator Iter;
public:
bool init(const std::string& file_name);
const Label::Ptr& get(const std::string& pcd_file_name) const {
return _labels[pcd_file_name];
}
const Iter begin() {
return _labels.begin();
}
const Iter end() {
return _labels.end();
}
private:
std::string _labels_file_name;
mutable boost::unordered_map<std::string, Label::Ptr> _labels;
};
} // namespace perception
} // namespace adu
#endif // ADU_PERCEPTION_LABEL_READER_H
//