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

#include <OmniSciTypes.h>

Public Member Functions

std::string getString () const
 
DEVICE ALWAYS_INLINE char & operator[] (const unsigned int index)
 
DEVICE ALWAYS_INLINE bool operator== (const char *rhs) const
 
DEVICE ALWAYS_INLINE bool operator!= (const char *rhs) const
 
DEVICE ALWAYS_INLINE operator char * () const
 
DEVICE ALWAYS_INLINE int64_t size () const
 
DEVICE ALWAYS_INLINE bool isNull () const
 

Public Attributes

char * ptr_
 
int64_t size_
 

Detailed Description

Definition at line 106 of file OmniSciTypes.h.

Member Function Documentation

std::string TextEncodingNone::getString ( ) const
inline

Definition at line 111 of file OmniSciTypes.h.

References ptr_, and size_.

Referenced by ct_pushdown_stats__cpu_template(), ct_string_to_chars__cpu_(), and ct_union_pushdown_stats__cpu_template().

111 { return std::string(ptr_, size_); }

+ Here is the caller graph for this function:

DEVICE ALWAYS_INLINE bool TextEncodingNone::isNull ( ) const
inline

Definition at line 134 of file OmniSciTypes.h.

References size_.

134 { return size_ == 0; }
DEVICE ALWAYS_INLINE TextEncodingNone::operator char * ( ) const
inline

Definition at line 132 of file OmniSciTypes.h.

References ptr_.

132 { return ptr_; }
DEVICE ALWAYS_INLINE bool TextEncodingNone::operator!= ( const char *  rhs) const
inline

Definition at line 129 of file OmniSciTypes.h.

References operator==().

129  {
130  return !(this->operator==(rhs));
131  }
DEVICE ALWAYS_INLINE bool operator==(const char *rhs) const
Definition: OmniSciTypes.h:117

+ Here is the call graph for this function:

DEVICE ALWAYS_INLINE bool TextEncodingNone::operator== ( const char *  rhs) const
inline

Definition at line 117 of file OmniSciTypes.h.

References i, ptr_, and size_.

Referenced by operator!=().

117  {
118 #ifdef __CUDACC__
119  for (int i = 0; i < size_; i++) {
120  if (rhs[i] == '\0' || ptr_[i] != rhs[i]) {
121  return false;
122  }
123  }
124  return rhs[size_] == '\0';
125 #else
126  return strcmp(ptr_, rhs) == 0;
127 #endif
128  }

+ Here is the caller graph for this function:

DEVICE ALWAYS_INLINE char& TextEncodingNone::operator[] ( const unsigned int  index)
inline

Definition at line 114 of file OmniSciTypes.h.

References ptr_, and size_.

114  {
115  return index < size_ ? ptr_[index] : ptr_[size_ - 1];
116  }
DEVICE ALWAYS_INLINE int64_t TextEncodingNone::size ( ) const
inline

Definition at line 133 of file OmniSciTypes.h.

References size_.

Referenced by ct_get_string_chars__template(), and ct_hamming_distance().

133 { return size_; }

+ Here is the caller graph for this function:

Member Data Documentation

char* TextEncodingNone::ptr_

Definition at line 107 of file OmniSciTypes.h.

Referenced by getString(), operator char *(), operator==(), and operator[]().

int64_t TextEncodingNone::size_

Definition at line 108 of file OmniSciTypes.h.

Referenced by getString(), isNull(), operator==(), operator[](), and size().


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