11#include " mapping_handler.hpp"
22
3- #include < boost/ algorithm/string.hpp >
4- #include < boost/algorithm/string/case_conv.hpp >
3+ #include < algorithm>
4+ #include < cctype >
55#include < cstddef>
66#include < cstdint>
77#include < cxxabi.h>
1515#include < nlohmann/json.hpp>
1616#include < optional>
1717#include < ostream>
18+ #include < ranges>
1819#include < sstream>
1920#include < stdexcept>
2021#include < string>
22+ #include < string_view>
2123#include < type_traits>
2224#include < typeindex>
2325#include < unordered_map>
3234#include " map_types/expr_mapping.hpp"
3335#include " map_types/map_arguments.hpp"
3436#include " map_types/value_mapping.hpp"
37+ #include " utils/algorithm.hpp"
3538#include " utils/indices.hpp"
3639#include " utils/ram_cache.hpp"
3740#include " utils/syntax_parser.hpp"
@@ -176,8 +179,8 @@ libtokamap::TypedDataArray libtokamap::MappingHandler::map(const std::string& ma
176179 std::type_index data_type, int rank,
177180 const nlohmann::json& extra_attributes)
178181{
179- std::deque<std::string > path_tokens;
180- boost ::split (path_tokens, path, boost::is_any_of ( " /" ) );
182+ std::deque<std::string_view > path_tokens;
183+ libtokamap ::split (path_tokens, path, " /" );
181184 if (path_tokens.empty ()) {
182185 throw std::runtime_error{" IDS path could not be split" };
183186 }
@@ -189,7 +192,7 @@ libtokamap::TypedDataArray libtokamap::MappingHandler::map(const std::string& ma
189192
190193 // Use lowercase machine name for find mapping files
191194 std::string machine_string = mapping;
192- boost:: to_lower (machine_string);
195+ to_lower (machine_string);
193196
194197 // Load mappings based off IDS name
195198 // Returns a reference to IDS map objects and corresponding globals
@@ -456,7 +459,7 @@ std::string find_mapping(libtokamap::IDSMapRegister& mappings, const std::string
456459 }
457460
458461 // Check for last # replaced with index
459- std::string new_path = boost ::replace_last_copy (path, " #" , std::to_string (indices.back ()));
462+ std::string new_path = libtokamap ::replace_last_copy (path, " #" , std::to_string (indices.back ()));
460463 if (mappings.contains (new_path)) {
461464 return new_path;
462465 }
@@ -477,8 +480,8 @@ void init_data_source_mapping(libtokamap::IDSMapRegister& map_reg, const std::st
477480 if (!value.contains (" DATA_SOURCE" )) {
478481 throw std::runtime_error{" required DATA_SOURCE argument not provided in DATA_SOURCE mapping '" + key + " '" };
479482 }
480- auto data_source_name = value[" DATA_SOURCE" ].get <std::string>();
481- boost ::to_upper (data_source_name);
483+ std::string data_source_name = value[" DATA_SOURCE" ].get <std::string>();
484+ libtokamap ::to_upper (data_source_name);
482485
483486 if (!value.contains (" ARGS" )) {
484487 throw std::runtime_error{" required ARGS argument not provided in DATA_SOURCE mapping '" + key + " '" };
@@ -565,13 +568,13 @@ std::string libtokamap::generate_map_path(std::deque<std::string>& path_tokens,
565568 return {}; // Don't throw, go gentle into that good night
566569 }
567570
568- std::string map_path = boost::algorithm ::join (path_tokens, " /" );
571+ std::string map_path = libtokamap ::join (path_tokens, " /" );
569572 std::string found_path;
570573
571574 if (!mappings.contains (map_path)) {
572575 if (sig_type == SignalType::TIME or sig_type == SignalType::DATA) {
573576 path_tokens.pop_back ();
574- map_path = boost::algorithm ::join (path_tokens, " /" );
577+ map_path = libtokamap ::join (path_tokens, " /" );
575578 }
576579 found_path = find_mapping (mappings, map_path, indices, full_path);
577580 } else {
0 commit comments