UFO 1.0.0
An Efficient Probabilistic 3D Mapping Framework That Embraces the Unknown
Loading...
Searching...
No Matches
ufo::MapHeader Struct Reference

Public Types

using depth_t = std::uint32_t
 
using dim_t = std::uint32_t
 
using length_t = double
 
using version_t = std::uint32_t
 

Public Member Functions

template<class Map >
 MapHeader (Map const &map)
 
 MapHeader (MapHeader const &)=default
 
 MapHeader (ReadBuffer &in)
 
 MapHeader (std::filesystem::path const &filename)
 
 MapHeader (std::istream &in)
 
template<std::size_t Dim>
 MapHeader (Vec< Dim, length_t > const &leaf_node_length, depth_t num_depth_levels, MapType map_types)
 
ReadBufferread (ReadBuffer &in)
 
void read (std::filesystem::path const &filename)
 
std::istream & read (std::istream &in)
 
void write (std::filesystem::path const &filename) const
 
std::ostream & write (std::ostream &out) const
 
WriteBufferwrite (WriteBuffer &out) const
 

Static Public Member Functions

static bool isMap (ReadBuffer &in)
 
static bool isMap (std::filesystem::path const &filename)
 
static bool isMap (std::istream &in)
 
static std::ifstream openRead (std::filesystem::path const &filename)
 
static std::ofstream openWrite (std::filesystem::path const &filename)
 

Public Attributes

std::vector< length_t > leaf_node_length
 
version_t major {}
 
std::vector< MapTypeInfomap_info
 
version_t minor = std::numeric_limits<version_t>::max()
 
std::uint64_t num_blocks {}
 
depth_t num_depth_levels {}
 
std::uint64_t num_nodes {}
 
version_t patch = std::numeric_limits<version_t>::max()
 

Static Public Attributes

static constexpr version_t const CURRENT_MAJOR = 1
 
static constexpr version_t const CURRENT_MINOR = 0
 
static constexpr version_t const CURRENT_PATCH = 0
 
static constexpr std::string_view const MAP_HEADER = "# UFO Map"
 

Detailed Description

Definition at line 84 of file header.hpp.

Member Typedef Documentation

◆ depth_t

using ufo::MapHeader::depth_t = std::uint32_t

Definition at line 86 of file header.hpp.

◆ dim_t

using ufo::MapHeader::dim_t = std::uint32_t

Definition at line 87 of file header.hpp.

◆ length_t

using ufo::MapHeader::length_t = double

Definition at line 85 of file header.hpp.

◆ version_t

using ufo::MapHeader::version_t = std::uint32_t

Definition at line 88 of file header.hpp.

Constructor & Destructor Documentation

◆ MapHeader() [1/5]

template<std::size_t Dim>
ufo::MapHeader::MapHeader ( Vec< Dim, length_t > const &  leaf_node_length,
depth_t  num_depth_levels,
MapType  map_types 
)
inline

Definition at line 112 of file header.hpp.

◆ MapHeader() [2/5]

template<class Map >
ufo::MapHeader::MapHeader ( Map const &  map)
inline

Definition at line 139 of file header.hpp.

◆ MapHeader() [3/5]

ufo::MapHeader::MapHeader ( std::filesystem::path const &  filename)
inline

Definition at line 144 of file header.hpp.

◆ MapHeader() [4/5]

ufo::MapHeader::MapHeader ( std::istream &  in)
inline

Definition at line 146 of file header.hpp.

◆ MapHeader() [5/5]

ufo::MapHeader::MapHeader ( ReadBuffer in)
inline

Definition at line 148 of file header.hpp.

Member Function Documentation

◆ isMap() [1/3]

static bool ufo::MapHeader::isMap ( ReadBuffer in)
inlinestatic

Definition at line 180 of file header.hpp.

◆ isMap() [2/3]

static bool ufo::MapHeader::isMap ( std::filesystem::path const &  filename)
inlinestatic

Definition at line 168 of file header.hpp.

◆ isMap() [3/3]

static bool ufo::MapHeader::isMap ( std::istream &  in)
inlinestatic

Definition at line 174 of file header.hpp.

◆ openRead()

static std::ifstream ufo::MapHeader::openRead ( std::filesystem::path const &  filename)
inlinestatic

Definition at line 150 of file header.hpp.

◆ openWrite()

static std::ofstream ufo::MapHeader::openWrite ( std::filesystem::path const &  filename)
inlinestatic

Definition at line 159 of file header.hpp.

◆ read() [1/3]

ReadBuffer & ufo::MapHeader::read ( ReadBuffer in)
inline

Definition at line 228 of file header.hpp.

◆ read() [2/3]

void ufo::MapHeader::read ( std::filesystem::path const &  filename)
inline

Definition at line 186 of file header.hpp.

◆ read() [3/3]

std::istream & ufo::MapHeader::read ( std::istream &  in)
inline

Definition at line 192 of file header.hpp.

◆ write() [1/3]

void ufo::MapHeader::write ( std::filesystem::path const &  filename) const
inline

Definition at line 263 of file header.hpp.

◆ write() [2/3]

std::ostream & ufo::MapHeader::write ( std::ostream &  out) const
inline

Definition at line 269 of file header.hpp.

◆ write() [3/3]

WriteBuffer & ufo::MapHeader::write ( WriteBuffer out) const
inline

Definition at line 327 of file header.hpp.

Member Data Documentation

◆ CURRENT_MAJOR

constexpr version_t const ufo::MapHeader::CURRENT_MAJOR = 1
staticconstexpr

Definition at line 91 of file header.hpp.

◆ CURRENT_MINOR

constexpr version_t const ufo::MapHeader::CURRENT_MINOR = 0
staticconstexpr

Definition at line 92 of file header.hpp.

◆ CURRENT_PATCH

constexpr version_t const ufo::MapHeader::CURRENT_PATCH = 0
staticconstexpr

Definition at line 93 of file header.hpp.

◆ leaf_node_length

std::vector<length_t> ufo::MapHeader::leaf_node_length

Definition at line 102 of file header.hpp.

◆ major

version_t ufo::MapHeader::major {}

Definition at line 97 of file header.hpp.

◆ MAP_HEADER

constexpr std::string_view const ufo::MapHeader::MAP_HEADER = "# UFO Map"
staticconstexpr

Definition at line 90 of file header.hpp.

◆ map_info

std::vector<MapTypeInfo> ufo::MapHeader::map_info

Definition at line 106 of file header.hpp.

◆ minor

version_t ufo::MapHeader::minor = std::numeric_limits<version_t>::max()

Definition at line 98 of file header.hpp.

◆ num_blocks

std::uint64_t ufo::MapHeader::num_blocks {}

Definition at line 104 of file header.hpp.

◆ num_depth_levels

depth_t ufo::MapHeader::num_depth_levels {}

Definition at line 103 of file header.hpp.

◆ num_nodes

std::uint64_t ufo::MapHeader::num_nodes {}

Definition at line 105 of file header.hpp.

◆ patch

version_t ufo::MapHeader::patch = std::numeric_limits<version_t>::max()

Definition at line 99 of file header.hpp.


The documentation for this struct was generated from the following file: