supereight2
Loading...
Searching...
No Matches
data_id.hpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2022 Smart Robotics Lab, Imperial College London, Technical University of Munich
3 * SPDX-FileCopyrightText: 2021-2022 Nils Funk
4 * SPDX-FileCopyrightText: 2021-2022 Sotiris Papatheodorou
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8#ifndef SE_DATA_ID_HPP
9#define SE_DATA_ID_HPP
10
13
14namespace se {
15
16template<Id IdB>
17struct IdData {
18 struct Config {
19 void readYaml(const std::string& /* yaml_file */)
20 {
21 }
22 };
23};
24
25template<>
26struct IdData<Id::On> {
28
30 bool update(const id_t id);
31
32 struct Config {
36 void readYaml(const std::string& yaml_file);
37 };
38};
39
40std::ostream& operator<<(std::ostream& os, const IdData<Id::Off>::Config& c);
41std::ostream& operator<<(std::ostream& os, const IdData<Id::On>::Config& c);
42
43} // namespace se
44
45#include "impl/data_id_impl.hpp"
46
47#endif // SE_DATA_ID_HPP
Definition image.hpp:19
Helper wrapper to allocate and de-allocate octants in the octree.
Definition bounded_vector.hpp:14
constexpr id_t g_no_id
Indicates the absence of an identifier.
Definition type_util.hpp:62
Id
Definition setup_util.hpp:20
std::ostream & operator<<(std::ostream &os, const ColourData< Colour::Off >::Config &c)
Definition config.hpp:105
Definition data_id.hpp:18
void readYaml(const std::string &)
Definition data_id.hpp:19
void readYaml(const std::string &yaml_file)
Reads the struct members from the "data" node of a YAML file.
bool update(const id_t id)
Set the ID to id if id is non-zero and return whether the data was updated.
Definition data_id.hpp:17