OmniSciDB  c07336695a
TableGenerations Class Reference

#include <TableGenerations.h>

Public Member Functions

void setGeneration (const uint32_t id, const TableGeneration &generation)
 
const TableGenerationgetGeneration (const uint32_t id) const
 
const std::unordered_map< uint32_t, TableGeneration > & asMap () const
 
void clear ()
 

Private Attributes

std::unordered_map< uint32_t, TableGenerationid_to_generation_
 

Detailed Description

Definition at line 27 of file TableGenerations.h.

Member Function Documentation

◆ asMap()

const std::unordered_map< uint32_t, TableGeneration > & TableGenerations::asMap ( ) const

Definition at line 32 of file TableGenerations.cpp.

References id_to_generation_.

32  {
33  return id_to_generation_;
34 }
std::unordered_map< uint32_t, TableGeneration > id_to_generation_

◆ clear()

void TableGenerations::clear ( )

Definition at line 36 of file TableGenerations.cpp.

References id_to_generation_.

Referenced by Executor::clearMetaInfoCache().

36  {
37  decltype(id_to_generation_)().swap(id_to_generation_);
38 }
std::unordered_map< uint32_t, TableGeneration > id_to_generation_
+ Here is the caller graph for this function:

◆ getGeneration()

const TableGeneration & TableGenerations::getGeneration ( const uint32_t  id) const

Definition at line 26 of file TableGenerations.cpp.

References CHECK, and id_to_generation_.

Referenced by Executor::getTableGeneration().

26  {
27  const auto it = id_to_generation_.find(id);
28  CHECK(it != id_to_generation_.end());
29  return it->second;
30 }
std::unordered_map< uint32_t, TableGeneration > id_to_generation_
#define CHECK(condition)
Definition: Logger.h:187
+ Here is the caller graph for this function:

◆ setGeneration()

void TableGenerations::setGeneration ( const uint32_t  id,
const TableGeneration generation 
)

Definition at line 20 of file TableGenerations.cpp.

References CHECK, and id_to_generation_.

Referenced by RelAlgExecutor::computeTableGenerations(), and table_generations_from_thrift().

21  {
22  const auto it_ok = id_to_generation_.emplace(id, generation);
23  CHECK(it_ok.second);
24 }
std::unordered_map< uint32_t, TableGeneration > id_to_generation_
#define CHECK(condition)
Definition: Logger.h:187
+ Here is the caller graph for this function:

Member Data Documentation

◆ id_to_generation_

std::unordered_map<uint32_t, TableGeneration> TableGenerations::id_to_generation_
private

Definition at line 38 of file TableGenerations.h.

Referenced by asMap(), clear(), getGeneration(), and setGeneration().


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