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::Cell::Serial::Value::FieldUpdate_MATH Class Reference

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

+ Inheritance diagram for SWC::DB::Cell::Serial::Value::FieldUpdate_MATH:
+ Collaboration diagram for SWC::DB::Cell::Serial::Value::FieldUpdate_MATH:

Public Types

enum  OP : uint8_t {
  EQUAL = 0x00,
  PLUS = 0x01,
  MULTIPLY = 0x02,
  DIVIDE = 0x03
}
 

Public Member Functions

SWC_CAN_INLINE FieldUpdate_MATH (OP a_op=OP::EQUAL, uint8_t a_ctrl=CTRL_DEFAULT) noexcept
 
SWC_CAN_INLINE FieldUpdate_MATH (const uint8_t **ptrp, size_t *remainp)
 
 FieldUpdate_MATH (FieldUpdate_MATH &&) noexcept=default
 
FieldUpdate_MATHoperator= (FieldUpdate_MATH &&) noexcept=default
 
 FieldUpdate_MATH (const FieldUpdate_MATH &)=delete
 
FieldUpdate_MATHoperator= (const FieldUpdate_MATH &)=delete
 
SWC_CAN_INLINE void set_op (const char **ptr, uint32_t *remainp, bool w_value_ctrl=false) noexcept
 
template<typename T >
SWC_CAN_INLINE void apply (const T &in_value, T &value) const
 
template<typename T >
SWC_CAN_INLINE void apply (const Field *infieldp, T &field) const
 
template<typename T >
SWC_CAN_INLINE bool is_matching (Condition::Comp comp, const T &p1, const T &p2) const noexcept
 
SWC_CAN_INLINE uint24_t encoded_length () const noexcept override
 
SWC_CAN_INLINE void encode (uint8_t **bufp) const override
 
SWC_CAN_INLINE void decode (const uint8_t **ptrp, size_t *remainp) override
 
virtual std::ostream & print (std::ostream &out) const override
 
- Public Member Functions inherited from SWC::DB::Cell::Serial::Value::FieldUpdate
SWC_CAN_INLINE FieldUpdate (uint8_t a_ctrl) noexcept
 
SWC_CAN_INLINE FieldUpdate (const uint8_t **ptrp, size_t *remainp)
 
 FieldUpdate (FieldUpdate &&) noexcept=default
 
FieldUpdateoperator= (FieldUpdate &&) noexcept=default
 
 FieldUpdate (const FieldUpdate &)=delete
 
FieldUpdateoperator= (const FieldUpdate &)=delete
 
virtual ~FieldUpdate () noexcept
 
SWC_CAN_INLINE bool set_ctrl (const char **ptr, uint32_t *remainp, bool w_value_ctrl) noexcept
 
SWC_CAN_INLINE void set_no_add_field () noexcept
 
SWC_CAN_INLINE bool is_no_add_field () const noexcept
 
SWC_CAN_INLINE void set_delete_field () noexcept
 
SWC_CAN_INLINE bool is_delete_field () const noexcept
 
SWC_CAN_INLINE void set_value_set () noexcept
 
SWC_CAN_INLINE bool is_value_set () const noexcept
 
SWC_CAN_INLINE void set_value_del () noexcept
 
SWC_CAN_INLINE bool is_value_del () const noexcept
 
SWC_CAN_INLINE bool is_sub_op_required () const noexcept
 

Public Attributes

OP op
 
- Public Attributes inherited from SWC::DB::Cell::Serial::Value::FieldUpdate
uint8_t ctrl
 

Additional Inherited Members

- Static Public Attributes inherited from SWC::DB::Cell::Serial::Value::FieldUpdate
static constexpr const uint8_t CTRL_DEFAULT = 0x00
 
static constexpr const uint8_t CTRL_NO_ADD_FIELD = 0x01
 
static constexpr const uint8_t CTRL_DELETE_FIELD = 0x02
 
static constexpr const uint8_t CTRL_VALUE_SET = 0x04
 
static constexpr const uint8_t CTRL_VALUE_DEL = 0x08
 

Detailed Description

Definition at line 131 of file CellValueSerialFieldUpdate.h.

Member Enumeration Documentation

◆ OP

Enumerator
EQUAL 
PLUS 
MULTIPLY 
DIVIDE 

Definition at line 133 of file CellValueSerialFieldUpdate.h.

Constructor & Destructor Documentation

◆ FieldUpdate_MATH() [1/4]

SWC_CAN_INLINE SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::FieldUpdate_MATH ( OP  a_op = OP::EQUAL,
uint8_t  a_ctrl = CTRL_DEFAULT 
)
inlinenoexcept

Definition at line 140 of file CellValueSerialFieldUpdate.h.

◆ FieldUpdate_MATH() [2/4]

SWC_CAN_INLINE SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::FieldUpdate_MATH ( const uint8_t **  ptrp,
size_t *  remainp 
)
inline

Definition at line 144 of file CellValueSerialFieldUpdate.h.

◆ FieldUpdate_MATH() [3/4]

SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::FieldUpdate_MATH ( FieldUpdate_MATH &&  )
defaultnoexcept

◆ FieldUpdate_MATH() [4/4]

SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::FieldUpdate_MATH ( const FieldUpdate_MATH )
delete

Member Function Documentation

◆ apply() [1/2]

template<typename T >
SWC_CAN_INLINE void SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::apply ( const Field infieldp,
T &  field 
) const
inline

Definition at line 212 of file CellValueSerialFieldUpdate.h.

References apply(), and SWC::Config::T.

+ Here is the call graph for this function:

◆ apply() [2/2]

template<typename T >
SWC_CAN_INLINE void SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::apply ( const T &  in_value,
T &  value 
) const
inline

Definition at line 186 of file CellValueSerialFieldUpdate.h.

References op.

Referenced by apply().

+ Here is the caller graph for this function:

◆ decode()

SWC_CAN_INLINE void SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::decode ( const uint8_t **  ptrp,
size_t *  remainp 
)
inlineoverridevirtual

Reimplemented from SWC::DB::Cell::Serial::Value::FieldUpdate.

Definition at line 232 of file CellValueSerialFieldUpdate.h.

References SWC::DB::Cell::Serial::Value::FieldUpdate::decode(), SWC::Serialization::decode_i8(), SWC::DB::Cell::Serial::Value::FieldUpdate::is_sub_op_required(), and op.

+ Here is the call graph for this function:

◆ encode()

SWC_CAN_INLINE void SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::encode ( uint8_t **  bufp) const
inlineoverridevirtual

Reimplemented from SWC::DB::Cell::Serial::Value::FieldUpdate.

Definition at line 226 of file CellValueSerialFieldUpdate.h.

References SWC::DB::Cell::Serial::Value::FieldUpdate::encode(), SWC::Serialization::encode_i8(), SWC::DB::Cell::Serial::Value::FieldUpdate::is_sub_op_required(), and op.

+ Here is the call graph for this function:

◆ encoded_length()

SWC_CAN_INLINE uint24_t SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::encoded_length ( ) const
inlineoverridevirtualnoexcept

Reimplemented from SWC::DB::Cell::Serial::Value::FieldUpdate.

Definition at line 222 of file CellValueSerialFieldUpdate.h.

References SWC::DB::Cell::Serial::Value::FieldUpdate::encoded_length(), and SWC::DB::Cell::Serial::Value::FieldUpdate::is_sub_op_required().

+ Here is the call graph for this function:

◆ is_matching()

template<typename T >
SWC_CAN_INLINE bool SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::is_matching ( Condition::Comp  comp,
const T &  p1,
const T &  p2 
) const
inlinenoexcept

Definition at line 217 of file CellValueSerialFieldUpdate.h.

References SWC::Condition::is_matching().

+ Here is the call graph for this function:

◆ operator=() [1/2]

FieldUpdate_MATH& SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::operator= ( const FieldUpdate_MATH )
delete

◆ operator=() [2/2]

FieldUpdate_MATH& SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::operator= ( FieldUpdate_MATH &&  )
defaultnoexcept

◆ print()

std::ostream & SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::print ( std::ostream &  out) const
overridevirtual

Reimplemented from SWC::DB::Cell::Serial::Value::FieldUpdate.

Definition at line 27 of file CellValueSerialFieldUpdate.cc.

References op, and SWC::DB::Cell::Serial::Value::FieldUpdate::print().

+ Here is the call graph for this function:

◆ set_op()

SWC_CAN_INLINE void SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::set_op ( const char **  ptr,
uint32_t *  remainp,
bool  w_value_ctrl = false 
)
inlinenoexcept

Definition at line 156 of file CellValueSerialFieldUpdate.h.

References op, SWC::DB::Cell::Serial::Value::FieldUpdate::set_ctrl(), and SWC::Condition::str_eq().

Referenced by SWC::client::SQL::Reader::read_ts_and_value().

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

Member Data Documentation

◆ op

OP SWC::DB::Cell::Serial::Value::FieldUpdate_MATH::op

Definition at line 239 of file CellValueSerialFieldUpdate.h.

Referenced by apply(), decode(), encode(), print(), and set_op().


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