25#ifndef __BITPIT_FLAT_VECTOR_2D_HPP__
26#define __BITPIT_FLAT_VECTOR_2D_HPP__
33#include "binary_stream.hpp"
41OBinaryStream&
operator<<(OBinaryStream &buffer,
const FlatVector2D<T> &vector);
44IBinaryStream& operator>>(IBinaryStream &buffer, FlatVector2D<T> &vector);
133 void erase(std::
size_t i);
137 void setItem(std::
size_t i, std::
size_t j,
T &&value);
141 T *
get(std::
size_t i);
164 std::
vector<std::
size_t> m_index;
168 bool isIndexValid(std::
size_t i)
const;
169 bool isIndexValid(std::
size_t i, std::
size_t j)
const;
180#include "flatVector2D.tpp"
Metafunction for generation of a flattened vector of vectors.
const std::size_t * indices() const noexcept
bool isInitialized() const
void clearItems(bool release=true)
T & getItem(std::size_t i, std::size_t j)
bool operator==(const FlatVector2D &rhs) const
FlatVector2D & operator=(FlatVector2D &&other)=default
void swap(FlatVector2D &other) noexcept
T & rawGetItem(std::size_t k)
const std::vector< T > & vector() const
std::size_t getItemCapacity() const
FlatVector2D(bool initialize=true)
void rawSetItem(std::size_t k, const T &value)
void clear(bool release=true)
void reserve(std::size_t nVectors, std::size_t nItems=0)
std::size_t getItemCount() const
void initialize(const std::vector< std::size_t > &sizes, const T &value=T())
void eraseItem(std::size_t i, std::size_t j)
void erase(std::size_t i)
const T * get(std::size_t i) const
std::size_t capacity() const
std::size_t getBinarySize() const
void setItem(std::size_t i, std::size_t j, const T &value)
void pushBackItem(const T &value)
FlatVector2D & operator=(const FlatVector2D &other)=default
std::ostream & operator<<(std::ostream &, const std::vector< T > &)