OmniSciDB  c0231cc57d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StringLocalCallback Class Reference
+ Inheritance diagram for StringLocalCallback:
+ Collaboration diagram for StringLocalCallback:

Public Member Functions

 StringLocalCallback (StringDictionaryProxy *sdp, StringDictionaryProxy::IdMap &id_map)
 
void operator() (std::string const &str, int32_t const string_id) override
 
void operator() (std::string_view const sv, int32_t const old_id) override
 
- Public Member Functions inherited from StringDictionary::StringCallback
virtual ~StringCallback ()=default
 

Private Attributes

StringDictionaryProxysdp_
 
StringDictionaryProxy::IdMapid_map_
 

Detailed Description

Definition at line 574 of file StringDictionaryProxy.cpp.

Constructor & Destructor Documentation

StringLocalCallback::StringLocalCallback ( StringDictionaryProxy sdp,
StringDictionaryProxy::IdMap id_map 
)
inline

Definition at line 579 of file StringDictionaryProxy.cpp.

580  : sdp_(sdp), id_map_(id_map) {}
StringDictionaryProxy * sdp_
StringDictionaryProxy::IdMap & id_map_

Member Function Documentation

void StringLocalCallback::operator() ( std::string const &  str,
int32_t const  string_id 
)
inlineoverridevirtual

Implements StringDictionary::StringCallback.

Definition at line 581 of file StringDictionaryProxy.cpp.

581  {
582  operator()(std::string_view(str), string_id);
583  }
void operator()(std::string const &str, int32_t const string_id) override
void StringLocalCallback::operator() ( std::string_view const  sv,
int32_t const  old_id 
)
inlineoverridevirtual

Implements StringDictionary::StringCallback.

Definition at line 584 of file StringDictionaryProxy.cpp.

References StringDictionaryProxy::getOrAddTransientUnlocked(), id_map_, StringDictionary::INVALID_STR_ID, sdp_, and StringDictionaryProxy::string_dict_.

584  {
585  int32_t const new_id = sdp_->string_dict_->getUnlocked(sv);
586  id_map_[old_id] = new_id == StringDictionary::INVALID_STR_ID
588  : new_id;
589  }
StringDictionaryProxy * sdp_
static constexpr int32_t INVALID_STR_ID
std::shared_ptr< StringDictionary > string_dict_
int32_t getOrAddTransientUnlocked(String const &)
StringDictionaryProxy::IdMap & id_map_

+ Here is the call graph for this function:

Member Data Documentation

StringDictionaryProxy::IdMap& StringLocalCallback::id_map_
private

Definition at line 576 of file StringDictionaryProxy.cpp.

Referenced by operator()().

StringDictionaryProxy* StringLocalCallback::sdp_
private

Definition at line 575 of file StringDictionaryProxy.cpp.

Referenced by operator()().


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