/** * @file shm_header.h * @brief 共享内存 map vector 容器的头文件 * @author your name (you@domain.com) * @version 0.1 * @date 2023-10-18 * * Copyright: Baosight Co. Ltd. * DO NOT COPY/USE WITHOUT PERMISSION * */ #pragma once #include #include #include #include #include #include #include #include #include #include namespace ShmHeader { namespace bipc = ::boost::interprocess; typedef bipc::managed_mapped_file managed_mapped_file_t; ///<映射文件 typedef bipc::managed_mapped_file::segment_manager mapped_segment_manager_t; ///< vector typedef bipc::node_allocator vec_allocator_i; typedef boost::container::vector vector_i; ///< vector typedef bipc::node_allocator vec_allocator_f; typedef boost::container::vector vector_f; ///< vector typedef bipc::node_allocator vec_allocator_d; typedef boost::container::vector vector_d; ///< vector typedef bipc::node_allocator vec_allocator_s; typedef boost::container::vector vector_s; ///<万能 allocator typedef bipc::node_allocator void_allocator; ///<万能 allocator ///< string typedef bipc::node_allocator char_allocator; typedef bipc::basic_string, char_allocator> char_string; ///< map 数据 template using MapPair = std::pair; ///< map 分配器 template using AllocatorMap = bipc::node_allocator, mapped_segment_manager_t>; ///< map的key排序 template using Mapless = std::less; ///< map template using MapValue = bipc::map, AllocatorMap>; ///< map 迭代器 template using MapValueIter = MapValue::iterator; } // namespace ShmHeader