22 #ifndef Hypertable_Lib_Cells_h
23 #define Hypertable_Lib_Cells_h
37 typedef std::vector<Cell, CellAlloc>
Cells;
69 void add(
const Cell &cell,
bool own =
true) {
97 void get(Cells &cells) { cells =
m_cells; }
99 const Cells &
get()
const {
return m_cells; }
112 for (
const auto &v : src) {
114 dst.push_back(std::make_pair(
m_cells[ii], v.second));
120 typedef std::set<const char*, LtCstr, CstrSetAlloc>
CstrSet;
128 CstrSet::iterator it = m_str_set.find(s);
129 if (it == m_str_set.end()) {
130 it = m_str_set.insert(m_arena.
dup(s)).first;
141 #endif // Hypertable_Lib_Cells_h
std::vector< Cell, CellAlloc > Cells
std::pair< Cell, int > FailedMutation
const char * column_qualifier
void free()
Free the whole arena.
PageArena memory allocator for STL classes.
The PageArenaAllocator is a STL allocator based on PageArena.
void get_cell(Cell &cc, size_t ii)
CellsBuilder(size_t size_hint=128)
size_t memory_used() const
CharT * dup(const CharT *s)
Duplicate a null terminated string; memory is allocated from the pool.
void copy_failed_mutations(const FailedMutations &src, FailedMutations &dst)
The PageArena allocator is simple and fast, avoiding individual mallocs/frees.
std::shared_ptr< CellsBuilder > CellsBuilderPtr
Smart pointer to CellsBuilder.
size_t used() const
Statistic accessors - returns used bytes.
void copy(TableDumper &, CellsBuilder &)
PageArenaAllocator< Cell > CellAlloc
const char * column_family
std::set< const char *, LtCstr, CstrSetAlloc > CstrSet
PageArenaAllocator< const char * > CstrSetAlloc
void add(const Cell &cell, bool own=true)
Encapsulates decomposed key and value.
String extensions and helpers: sets, maps, append operators etc.
std::vector< FailedMutation > FailedMutations
const char * get_or_add(const char *s)