TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
tmk::route::LazyCodes Class Reference

#include <route/lazy_codes.hpp>

Public Member Functions

void init (std::size_t n)
 n entries, all unknown; drops any earlier contents.
bool empty () const
std::size_t size () const
std::int32_t & operator[] (std::size_t i)
 The entry, allocating its chunk (all unknown) if needed.
std::int32_t get (std::size_t i) const
 The entry without allocating: unknown where nothing was written.
std::size_t bytes () const
 Bytes held by allocated chunks (diagnostics, test).

Static Public Attributes

static constexpr std::int32_t kUnknown = INT32_MIN

Detailed Description

Definition at line 15 of file lazy_codes.hpp.

Member Function Documentation

◆ bytes()

std::size_t tmk::route::LazyCodes::bytes ( ) const
inline

Bytes held by allocated chunks (diagnostics, test).

Definition at line 43 of file lazy_codes.hpp.

◆ empty()

bool tmk::route::LazyCodes::empty ( ) const
inline

Definition at line 25 of file lazy_codes.hpp.

◆ get()

std::int32_t tmk::route::LazyCodes::get ( std::size_t i) const
inline

The entry without allocating: unknown where nothing was written.

Definition at line 38 of file lazy_codes.hpp.

◆ init()

void tmk::route::LazyCodes::init ( std::size_t n)
inline

n entries, all unknown; drops any earlier contents.

Definition at line 20 of file lazy_codes.hpp.

◆ operator[]()

std::int32_t & tmk::route::LazyCodes::operator[] ( std::size_t i)
inline

The entry, allocating its chunk (all unknown) if needed.

Definition at line 29 of file lazy_codes.hpp.

◆ size()

std::size_t tmk::route::LazyCodes::size ( ) const
inline

Definition at line 26 of file lazy_codes.hpp.

Member Data Documentation

◆ kUnknown

std::int32_t tmk::route::LazyCodes::kUnknown = INT32_MIN
staticconstexpr

Definition at line 17 of file lazy_codes.hpp.


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