OmniSciDB  085a039ca4
 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 239 of file StringDictionary.cpp.

Member Function Documentation

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

Definition at line 250 of file StringDictionary.cpp.

250 { 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 243 of file StringDictionary.cpp.

References CHECK.

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

Implements StringDictionary::StringCallback.

Definition at line 247 of file StringDictionary.cpp.

References UNREACHABLE.

247  {
248  UNREACHABLE() << "MapMaker must be called with a std::string.";
249  }
#define UNREACHABLE()
Definition: Logger.h:267

Member Data Documentation

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

Definition at line 240 of file StringDictionary.cpp.


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