OmniSciDB  a5dc49c757
 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 248 of file StringDictionary.cpp.

Member Function Documentation

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

Definition at line 259 of file StringDictionary.cpp.

259 { 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 252 of file StringDictionary.cpp.

References CHECK.

252  {
253  auto const emplaced = map_.emplace(str, string_id);
254  CHECK(emplaced.second) << "str(" << str << ") string_id(" << string_id << ')';
255  }
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 256 of file StringDictionary.cpp.

References UNREACHABLE.

256  {
257  UNREACHABLE() << "MapMaker must be called with a std::string.";
258  }
#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 249 of file StringDictionary.cpp.


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