Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
fc::signed_int Struct Reference

serializes a 32 bit signed interger in as few bytes as possible More...

#include <varint.hpp>

Public Member Functions

 signed_int (int32_t v=0)
 
 operator int32_t () const
 
template<typename T >
signed_intoperator= (const T &v)
 
signed_int operator++ (int)
 
signed_intoperator++ ()
 

Public Attributes

int32_t value
 

Friends

bool operator== (const signed_int &i, const int32_t &v)
 
bool operator== (const int32_t &i, const signed_int &v)
 
bool operator== (const signed_int &i, const signed_int &v)
 
bool operator!= (const signed_int &i, const int32_t &v)
 
bool operator!= (const int32_t &i, const signed_int &v)
 
bool operator!= (const signed_int &i, const signed_int &v)
 
bool operator< (const signed_int &i, const int32_t &v)
 
bool operator< (const int32_t &i, const signed_int &v)
 
bool operator< (const signed_int &i, const signed_int &v)
 
bool operator>= (const signed_int &i, const int32_t &v)
 
bool operator>= (const int32_t &i, const signed_int &v)
 
bool operator>= (const signed_int &i, const signed_int &v)
 

Detailed Description

Uses the google protobuf algorithm for seralizing signed numbers

Definition at line 41 of file varint.hpp.

Constructor & Destructor Documentation

◆ signed_int()

fc::signed_int::signed_int ( int32_t v = 0)
inline

Definition at line 42 of file varint.hpp.

42:value(v){}
int32_t value
Definition varint.hpp:49

Member Function Documentation

◆ operator int32_t()

fc::signed_int::operator int32_t ( ) const
inline

Definition at line 43 of file varint.hpp.

43{ return value; }

◆ operator++() [1/2]

signed_int & fc::signed_int::operator++ ( )
inline

Definition at line 47 of file varint.hpp.

47{ ++value; return *this; }

◆ operator++() [2/2]

signed_int fc::signed_int::operator++ ( int )
inline

Definition at line 46 of file varint.hpp.

46{ return value++; }

◆ operator=()

template<typename T >
signed_int & fc::signed_int::operator= ( const T & v)
inline

Definition at line 45 of file varint.hpp.

45{ value = v; return *this; }

Friends And Related Symbol Documentation

◆ operator!= [1/3]

bool operator!= ( const int32_t & i,
const signed_int & v )
friend

Definition at line 56 of file varint.hpp.

56{ return i != v.value; }

◆ operator!= [2/3]

bool operator!= ( const signed_int & i,
const int32_t & v )
friend

Definition at line 55 of file varint.hpp.

55{ return i.value != v; }

◆ operator!= [3/3]

bool operator!= ( const signed_int & i,
const signed_int & v )
friend

Definition at line 57 of file varint.hpp.

57{ return i.value != v.value; }

◆ operator< [1/3]

bool operator< ( const int32_t & i,
const signed_int & v )
friend

Definition at line 60 of file varint.hpp.

60{ return i < v.value; }

◆ operator< [2/3]

bool operator< ( const signed_int & i,
const int32_t & v )
friend

Definition at line 59 of file varint.hpp.

59{ return i.value < v; }

◆ operator< [3/3]

bool operator< ( const signed_int & i,
const signed_int & v )
friend

Definition at line 61 of file varint.hpp.

61{ return i.value < v.value; }

◆ operator== [1/3]

bool operator== ( const int32_t & i,
const signed_int & v )
friend

Definition at line 52 of file varint.hpp.

52{ return i == v.value; }

◆ operator== [2/3]

bool operator== ( const signed_int & i,
const int32_t & v )
friend

Definition at line 51 of file varint.hpp.

51{ return i.value == v; }

◆ operator== [3/3]

bool operator== ( const signed_int & i,
const signed_int & v )
friend

Definition at line 53 of file varint.hpp.

53{ return i.value == v.value; }

◆ operator>= [1/3]

bool operator>= ( const int32_t & i,
const signed_int & v )
friend

Definition at line 64 of file varint.hpp.

64{ return i >= v.value; }

◆ operator>= [2/3]

bool operator>= ( const signed_int & i,
const int32_t & v )
friend

Definition at line 63 of file varint.hpp.

63{ return i.value >= v; }

◆ operator>= [3/3]

bool operator>= ( const signed_int & i,
const signed_int & v )
friend

Definition at line 65 of file varint.hpp.

65{ return i.value >= v.value; }

Member Data Documentation

◆ value

int32_t fc::signed_int::value

Definition at line 49 of file varint.hpp.


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