OmniSciDB  a5dc49c757
 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 622 of file StringDictionaryProxy.cpp.

Constructor & Destructor Documentation

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

Definition at line 627 of file StringDictionaryProxy.cpp.

628  : 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 629 of file StringDictionaryProxy.cpp.

629  {
630  operator()(std::string_view(str), string_id);
631  }
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 632 of file StringDictionaryProxy.cpp.

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

632  {
633  int32_t const new_id = sdp_->string_dict_->getUnlocked(sv);
634  id_map_[old_id] = new_id == StringDictionary::INVALID_STR_ID
636  : new_id;
637  }
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 624 of file StringDictionaryProxy.cpp.

Referenced by operator()().

StringDictionaryProxy* StringLocalCallback::sdp_
private

Definition at line 623 of file StringDictionaryProxy.cpp.

Referenced by operator()().


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