SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::DB::Specs::Timestamp Class Reference

#include <swcdb/db/Cells/SpecsTimestamp.h>

Public Member Functions

constexpr SWC_CAN_INLINE Timestamp () noexcept
 
constexpr SWC_CAN_INLINE Timestamp (int64_t timestamp, Condition::Comp a_comp) noexcept
 
SWC_CAN_INLINE Timestamp (const uint8_t **bufp, size_t *remainp)
 
 Timestamp (Timestamp &&) noexcept=default
 
 Timestamp (const Timestamp &) noexcept=default
 
Timestampoperator= (Timestamp &&) noexcept=default
 
Timestampoperator= (const Timestamp &) noexcept=default
 
 ~Timestamp () noexcept
 
constexpr SWC_CAN_INLINE void copy (const Timestamp &other) noexcept
 
constexpr SWC_CAN_INLINE void set (int64_t timestamp, Condition::Comp comperator) noexcept
 
constexpr SWC_CAN_INLINE void free () noexcept
 
constexpr SWC_CAN_INLINE bool empty () const noexcept
 
constexpr SWC_CAN_INLINE bool equal (const Timestamp &other) const noexcept
 
constexpr SWC_CAN_INLINE size_t encoded_length () const noexcept
 
SWC_CAN_INLINE void encode (uint8_t **bufp) const
 
SWC_CAN_INLINE void decode (const uint8_t **bufp, size_t *remainp)
 
SWC_CAN_INLINE bool is_matching (int64_t other) const noexcept
 
SWC_CAN_INLINE std::string to_string () const
 
void display (std::ostream &out) const
 
void print (std::ostream &out) const
 

Public Attributes

int64_t value
 
Condition::Comp comp
 
bool was_set
 

Friends

std::ostream & operator<< (std::ostream &out, const Timestamp &key)
 

Detailed Description

Definition at line 18 of file SpecsTimestamp.h.

Constructor & Destructor Documentation

◆ Timestamp() [1/5]

constexpr SWC_CAN_INLINE SWC::DB::Specs::Timestamp::Timestamp ( )
inlineexplicitconstexprnoexcept

Definition at line 22 of file SpecsTimestamp.h.

◆ Timestamp() [2/5]

constexpr SWC_CAN_INLINE SWC::DB::Specs::Timestamp::Timestamp ( int64_t  timestamp,
Condition::Comp  a_comp 
)
inlineexplicitconstexprnoexcept

Definition at line 27 of file SpecsTimestamp.h.

◆ Timestamp() [3/5]

SWC_CAN_INLINE SWC::DB::Specs::Timestamp::Timestamp ( const uint8_t **  bufp,
size_t *  remainp 
)
inlineexplicit

Definition at line 32 of file SpecsTimestamp.h.

References comp, SWC::Serialization::decode_i64(), SWC::Condition::NONE, and value.

+ Here is the call graph for this function:

◆ Timestamp() [4/5]

SWC::DB::Specs::Timestamp::Timestamp ( Timestamp &&  )
defaultnoexcept

◆ Timestamp() [5/5]

SWC::DB::Specs::Timestamp::Timestamp ( const Timestamp )
defaultnoexcept

◆ ~Timestamp()

SWC::DB::Specs::Timestamp::~Timestamp ( )
inlinenoexcept

Definition at line 46 of file SpecsTimestamp.h.

Member Function Documentation

◆ copy()

constexpr SWC_CAN_INLINE void SWC::DB::Specs::Timestamp::copy ( const Timestamp other)
inlineconstexprnoexcept

Definition at line 49 of file SpecsTimestamp.h.

References set().

Referenced by SWC::Ranger::Range::check_meta(), SWC::DB::Specs::Interval::copy(), SWC::DB::Cells::Interval::set_ts_earliest(), and SWC::DB::Cells::Interval::set_ts_latest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ decode()

SWC_CAN_INLINE void SWC::DB::Specs::Timestamp::decode ( const uint8_t **  bufp,
size_t *  remainp 
)
inline

Definition at line 93 of file SpecsTimestamp.h.

References comp, SWC::Serialization::decode_i64(), SWC::Serialization::decode_i8(), SWC::Condition::NONE, and value.

Referenced by SWC::DB::Specs::Interval::decode(), and SWC::DB::Cells::Interval::decode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ display()

void SWC::DB::Specs::Timestamp::display ( std::ostream &  out) const

Definition at line 15 of file SpecsTimestamp.cc.

References comp, SWC::Condition::to_string(), and value.

Referenced by SWC::DB::Specs::Interval::display().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ empty()

constexpr SWC_CAN_INLINE bool SWC::DB::Specs::Timestamp::empty ( ) const
inlineconstexprnoexcept

Definition at line 68 of file SpecsTimestamp.h.

References was_set.

Referenced by SWC::DB::Cells::Interval::expand().

+ Here is the caller graph for this function:

◆ encode()

SWC_CAN_INLINE void SWC::DB::Specs::Timestamp::encode ( uint8_t **  bufp) const
inline

Definition at line 86 of file SpecsTimestamp.h.

References comp, SWC::Serialization::encode_i64(), SWC::Serialization::encode_i8(), SWC::Condition::NONE, and value.

Referenced by SWC::DB::Specs::Interval::encode(), and SWC::DB::Cells::Interval::encode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ encoded_length()

constexpr SWC_CAN_INLINE size_t SWC::DB::Specs::Timestamp::encoded_length ( ) const
inlineconstexprnoexcept

Definition at line 78 of file SpecsTimestamp.h.

References comp, and SWC::Condition::NONE.

Referenced by SWC::DB::Cells::Interval::encoded_length(), and SWC::DB::Specs::Interval::encoded_length().

+ Here is the caller graph for this function:

◆ equal()

constexpr SWC_CAN_INLINE bool SWC::DB::Specs::Timestamp::equal ( const Timestamp other) const
inlineconstexprnoexcept

Definition at line 73 of file SpecsTimestamp.h.

References comp, and value.

Referenced by SWC::DB::Cells::Interval::equal().

+ Here is the caller graph for this function:

◆ free()

constexpr SWC_CAN_INLINE void SWC::DB::Specs::Timestamp::free ( )
inlineconstexprnoexcept

Definition at line 61 of file SpecsTimestamp.h.

References comp, SWC::Condition::NONE, value, and was_set.

Referenced by SWC::DB::Cells::Interval::free().

+ Here is the caller graph for this function:

◆ is_matching()

SWC_CAN_INLINE bool SWC::DB::Specs::Timestamp::is_matching ( int64_t  other) const
inlinenoexcept

Definition at line 100 of file SpecsTimestamp.h.

References comp, SWC::Condition::is_matching(), and value.

Referenced by SWC::DB::Cells::Interval::expand(), and SWC::DB::Specs::Interval::is_matching().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [1/2]

Timestamp& SWC::DB::Specs::Timestamp::operator= ( const Timestamp )
defaultnoexcept

◆ operator=() [2/2]

Timestamp& SWC::DB::Specs::Timestamp::operator= ( Timestamp &&  )
defaultnoexcept

◆ print()

void SWC::DB::Specs::Timestamp::print ( std::ostream &  out) const

Definition at line 19 of file SpecsTimestamp.cc.

References comp, SWC::Condition::NONE, SWC::Condition::to_string(), and value.

Referenced by SWC::DB::Specs::Interval::print(), and to_string().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set()

constexpr SWC_CAN_INLINE void SWC::DB::Specs::Timestamp::set ( int64_t  timestamp,
Condition::Comp  comperator 
)
inlineconstexprnoexcept

Definition at line 54 of file SpecsTimestamp.h.

References comp, value, and was_set.

Referenced by copy(), SWC::DB::Cells::Interval::expand(), SWC::client::SQL::QuerySelect::read_timestamp(), and SWC::Thrift::Converter::set().

+ Here is the caller graph for this function:

◆ to_string()

SWC_CAN_INLINE std::string SWC::DB::Specs::Timestamp::to_string ( ) const
inline

Definition at line 105 of file SpecsTimestamp.h.

References print().

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Timestamp key 
)
friend

Definition at line 119 of file SpecsTimestamp.h.

Member Data Documentation

◆ comp

◆ value

int64_t SWC::DB::Specs::Timestamp::value

◆ was_set

bool SWC::DB::Specs::Timestamp::was_set

Definition at line 126 of file SpecsTimestamp.h.

Referenced by empty(), free(), SWC::client::SQL::QuerySelect::read_timestamp(), and set().


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