OmniSciDB  c1a53651b2
 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)
 
 operator shared::StringDictKey () const
 
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 12 of file DictRef.h.

Constructor & Destructor Documentation

dict_ref_t::dict_ref_t ( )
inline

Definition at line 20 of file DictRef.h.

Referenced by InvalidDictRef().

static constexpr int32_t invalidDbId
Definition: DictRef.h:16
int32_t dictId
Definition: DictRef.h:14
static constexpr int32_t invalidDictId
Definition: DictRef.h:17
int32_t dbId
Definition: DictRef.h:13

+ 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 21 of file DictRef.h.

21 : dbId(db_id), dictId(dict_id) {}
int32_t dictId
Definition: DictRef.h:14
int32_t dbId
Definition: DictRef.h:13

Member Function Documentation

static dict_ref_t dict_ref_t::InvalidDictRef ( )
inlinestatic

Definition at line 51 of file DictRef.h.

References dict_ref_t().

51 { return dict_ref_t(); }
dict_ref_t()
Definition: DictRef.h:20

+ Here is the call graph for this function:

dict_ref_t::operator shared::StringDictKey ( ) const
inline

Definition at line 23 of file DictRef.h.

References dbId, and dictId.

23 { return {dbId, dictId}; }
int32_t dictId
Definition: DictRef.h:14
int32_t dbId
Definition: DictRef.h:13
size_t dict_ref_t::operator() ( const struct dict_ref_t ref) const
inlinenoexcept

Definition at line 41 of file DictRef.h.

41  {
42  std::hash<int32_t> int32_hash;
43  return int32_hash(ref.dictId) ^ (int32_hash(ref.dbId) << 2);
44  }
int32_t dictId
Definition: DictRef.h:14
int32_t dbId
Definition: DictRef.h:13
bool dict_ref_t::operator< ( const struct dict_ref_t rhs) const
inline

Definition at line 35 of file DictRef.h.

References dbId, and dictId.

35  {
36  return (this->dbId < rhs.dbId)
37  ? true
38  : (this->dbId == rhs.dbId) ? this->dictId < rhs.dictId : false;
39  }
int32_t dictId
Definition: DictRef.h:14
int32_t dbId
Definition: DictRef.h:13
struct dict_ref_t& dict_ref_t::operator= ( const struct dict_ref_t rhs)
inline

Definition at line 29 of file DictRef.h.

References dbId, and dictId.

29  {
30  this->dbId = rhs.dbId;
31  this->dictId = rhs.dictId;
32  return *this;
33  };
int32_t dictId
Definition: DictRef.h:14
int32_t dbId
Definition: DictRef.h:13
bool dict_ref_t::operator== ( const struct dict_ref_t rhs) const
inline

Definition at line 25 of file DictRef.h.

References dbId, and dictId.

25  {
26  return this->dictId == rhs.dictId && this->dbId == rhs.dbId;
27  }
int32_t dictId
Definition: DictRef.h:14
int32_t dbId
Definition: DictRef.h:13
std::string dict_ref_t::toString ( ) const
inline

Definition at line 46 of file DictRef.h.

References dbId, dictId, and to_string().

46  {
47  return "(db_id: " + std::to_string(dbId) + ", dict_id: " + std::to_string(dictId) +
48  ")";
49  }
std::string to_string(char const *&&v)
int32_t dictId
Definition: DictRef.h:14
int32_t dbId
Definition: DictRef.h:13

+ Here is the call 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 16 of file DictRef.h.

constexpr int32_t dict_ref_t::invalidDictId {-1}
static

Definition at line 17 of file DictRef.h.

constexpr int32_t dict_ref_t::literalsDictId {0}
static

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