AutoAPMS
Resilient Robot Mission Management
Loading...
Searching...
No Matches
convert.hpp
1// Copyright 2024 Robin Müller
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <string>
18#include <vector>
19
20#include "behaviortree_cpp/basic_types.h"
21
23namespace BT
24{
25
26template <>
27[[nodiscard]] std::vector<uint8_t> convertFromString<std::vector<uint8_t>>(StringView str);
28
29template <>
30[[nodiscard]] std::vector<bool> convertFromString<std::vector<bool>>(StringView str);
31
32template <>
33[[nodiscard]] std::vector<int64_t> convertFromString<std::vector<int64_t>>(StringView str);
34
35template <>
36[[nodiscard]] std::string toStr<std::vector<uint8_t>>(const std::vector<uint8_t> & value);
37
38template <>
39[[nodiscard]] std::string toStr<std::vector<bool>>(const std::vector<bool> & value);
40
41template <>
42[[nodiscard]] std::string toStr<std::vector<int64_t>>(const std::vector<int64_t> & value);
43
44template <>
45[[nodiscard]] std::string toStr<std::vector<double>>(const std::vector<double> & value);
46
47template <>
48[[nodiscard]] std::string toStr<std::vector<std::string>>(const std::vector<std::string> & value);
49
50} // namespace BT