OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{StringDictionary.cpp}::MapMaker Class Reference
+ Inheritance diagram for anonymous_namespace{StringDictionary.cpp}::MapMaker:
+ Collaboration diagram for anonymous_namespace{StringDictionary.cpp}::MapMaker:

Public Member Functions

void operator() (std::string const &str, int32_t const string_id) override
 
void operator() (std::string_view const, int32_t const string_id) override
 
std::unordered_map
< std::string, int32_t > 
moveMap ()
 
- Public Member Functions inherited from StringDictionary::StringCallback
virtual ~StringCallback ()=default
 

Private Attributes

std::unordered_map
< std::string, int32_t > 
map_
 

Detailed Description

Definition at line 246 of file StringDictionary.cpp.

Member Function Documentation

std::unordered_map<std::string, int32_t> anonymous_namespace{StringDictionary.cpp}::MapMaker::moveMap ( )
inline

Definition at line 257 of file StringDictionary.cpp.

257 { return std::move(map_); }
std::unordered_map< std::string, int32_t > map_
void anonymous_namespace{StringDictionary.cpp}::MapMaker::operator() ( std::string const &  str,
int32_t const  string_id 
)
inlineoverridevirtual

Implements StringDictionary::StringCallback.

Definition at line 250 of file StringDictionary.cpp.

References CHECK.

250  {
251  auto const emplaced = map_.emplace(str, string_id);
252  CHECK(emplaced.second) << "str(" << str << ") string_id(" << string_id << ')';
253  }
std::unordered_map< std::string, int32_t > map_
#define CHECK(condition)
Definition: Logger.h:291
void anonymous_namespace{StringDictionary.cpp}::MapMaker::operator() ( std::string_view  const,
int32_t const  string_id 
)
inlineoverridevirtual

Implements StringDictionary::StringCallback.

Definition at line 254 of file StringDictionary.cpp.

References UNREACHABLE.

254  {
255  UNREACHABLE() << "MapMaker must be called with a std::string.";
256  }
#define UNREACHABLE()
Definition: Logger.h:338

Member Data Documentation

std::unordered_map<std::string, int32_t> anonymous_namespace{StringDictionary.cpp}::MapMaker::map_
private

Definition at line 247 of file StringDictionary.cpp.


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