OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dict_ref_t Struct Reference

#include <DictRef.h>

Public Member Functions

 dict_ref_t ()
 
 dict_ref_t (int32_t db_id, int32_t dict_id)
 
bool operator== (const struct dict_ref_t &rhs) const
 
struct dict_ref_toperator= (const struct dict_ref_t &rhs)
 
bool operator< (const struct dict_ref_t &rhs) const
 
size_t operator() (const struct dict_ref_t &ref) const noexcept
 
std::string toString () const
 

Static Public Member Functions

static dict_ref_t InvalidDictRef ()
 

Public Attributes

int32_t dbId
 
int32_t dictId
 

Static Public Attributes

static constexpr int32_t invalidDbId {-1}
 
static constexpr int32_t invalidDictId {-1}
 
static constexpr int32_t literalsDictId {0}
 

Detailed Description

Definition at line 9 of file DictRef.h.

Constructor & Destructor Documentation

dict_ref_t::dict_ref_t ( )
inline

Definition at line 17 of file DictRef.h.

Referenced by InvalidDictRef().

static constexpr int32_t invalidDbId
Definition: DictRef.h:13
int32_t dictId
Definition: DictRef.h:11
static constexpr int32_t invalidDictId
Definition: DictRef.h:14
int32_t dbId
Definition: DictRef.h:10

+ Here is the caller graph for this function:

dict_ref_t::dict_ref_t ( int32_t  db_id,
int32_t  dict_id 
)
inline

Definition at line 18 of file DictRef.h.

18 : dbId(db_id), dictId(dict_id) {}
int32_t dictId
Definition: DictRef.h:11
int32_t dbId
Definition: DictRef.h:10

Member Function Documentation

static dict_ref_t dict_ref_t::InvalidDictRef ( )
inlinestatic

Definition at line 46 of file DictRef.h.

References dict_ref_t().

46 { return dict_ref_t(); }
dict_ref_t()
Definition: DictRef.h:17

+ Here is the call graph for this function:

size_t dict_ref_t::operator() ( const struct dict_ref_t ref) const
inlinenoexcept

Definition at line 36 of file DictRef.h.

36  {
37  std::hash<int32_t> int32_hash;
38  return int32_hash(ref.dictId) ^ (int32_hash(ref.dbId) << 2);
39  }
int32_t dictId
Definition: DictRef.h:11
int32_t dbId
Definition: DictRef.h:10
bool dict_ref_t::operator< ( const struct dict_ref_t rhs) const
inline

Definition at line 30 of file DictRef.h.

References dbId, and dictId.

30  {
31  return (this->dbId < rhs.dbId)
32  ? true
33  : (this->dbId == rhs.dbId) ? this->dictId < rhs.dictId : false;
34  }
int32_t dictId
Definition: DictRef.h:11
int32_t dbId
Definition: DictRef.h:10
struct dict_ref_t& dict_ref_t::operator= ( const struct dict_ref_t rhs)
inline

Definition at line 24 of file DictRef.h.

References dbId, and dictId.

24  {
25  this->dbId = rhs.dbId;
26  this->dictId = rhs.dictId;
27  return *this;
28  };
int32_t dictId
Definition: DictRef.h:11
int32_t dbId
Definition: DictRef.h:10
bool dict_ref_t::operator== ( const struct dict_ref_t rhs) const
inline

Definition at line 20 of file DictRef.h.

References dbId, and dictId.

20  {
21  return this->dictId == rhs.dictId && this->dbId == rhs.dbId;
22  }
int32_t dictId
Definition: DictRef.h:11
int32_t dbId
Definition: DictRef.h:10
std::string dict_ref_t::toString ( ) const
inline

Definition at line 41 of file DictRef.h.

References dbId, dictId, and to_string().

Referenced by anonymous_namespace{StringDictionary.cpp}::throw_encoding_error(), and anonymous_namespace{StringDictionary.cpp}::throw_string_too_long_error().

41  {
42  return "(db_id: " + std::to_string(dbId) + ", dict_id: " + std::to_string(dictId) +
43  ")";
44  }
std::string to_string(char const *&&v)
int32_t dictId
Definition: DictRef.h:11
int32_t dbId
Definition: DictRef.h:10

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

int32_t dict_ref_t::dbId
constexpr int32_t dict_ref_t::invalidDbId {-1}
static

Definition at line 13 of file DictRef.h.

constexpr int32_t dict_ref_t::invalidDictId {-1}
static

Definition at line 14 of file DictRef.h.

constexpr int32_t dict_ref_t::literalsDictId {0}
static

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