IBR-DTNSuite  0.10
dtn::data::SDNV< E > Class Template Reference

#include <SDNV.h>

Collaboration diagram for dtn::data::SDNV< E >:
Collaboration graph

Public Member Functions

 SDNV (const E value)
 
 SDNV ()
 
 ~SDNV ()
 
size_t getLength () const
 
template<typename T >
get () const
 
const E & get () const
 
const SDNVoperator= (const E value)
 
bool operator== (const E value) const
 
bool operator== (const SDNV< E > &value) const
 
bool operator!= (const E value) const
 
bool operator!= (const SDNV< E > &value) const
 
SDNV< E > operator+ (const E value)
 
SDNV< E > operator+ (const SDNV< E > &value)
 
SDNV< E > & operator+= (const E value)
 
SDNV< E > & operator+= (const SDNV< E > &value)
 
SDNV< E > & operator++ ()
 
SDNV< E > operator++ (int)
 
SDNV< E > operator- (const E value)
 
SDNV< E > operator- (const SDNV< E > &value)
 
SDNV< E > & operator-= (const E value)
 
SDNV< E > & operator-= (const SDNV< E > &value)
 
SDNV< E > & operator-- ()
 
SDNV< E > operator-- (int)
 
SDNV< E > operator/ (const E value)
 
SDNV< E > operator/ (const SDNV< E > &value)
 
SDNV< E > & operator/= (const E value)
 
SDNV< E > & operator/= (const SDNV< E > &value)
 
SDNV< E > operator* (const E value)
 
SDNV< E > operator* (const SDNV< E > &value)
 
SDNV< E > & operator*= (const E value)
 
SDNV< E > & operator*= (const SDNV< E > &value)
 
bool operator& (const SDNV< E > &value) const
 
bool operator| (const SDNV< E > &value) const
 
SDNV< E > & operator&= (const SDNV< E > &value)
 
SDNV< E > & operator|= (const SDNV< E > &value)
 
bool operator< (const E value) const
 
bool operator<= (const E value) const
 
bool operator> (const E value) const
 
bool operator>= (const E value) const
 
bool operator< (const SDNV< E > &value) const
 
bool operator<= (const SDNV< E > &value) const
 
bool operator> (const SDNV< E > &value) const
 
bool operator>= (const SDNV< E > &value) const
 
SDNV< E > & random ()
 
std::string toString () const
 
void fromString (const std::string &data)
 
void read (std::istream &stream)
 
void encode (std::ostream &stream) const
 
void decode (std::istream &stream)
 

Static Public Member Functions

static SDNV< E > max ()
 

Static Public Attributes

static const size_t MAX_LENGTH = 10
 

Friends

SDNV< E > operator+ (const SDNV< E > &left, const SDNV< E > &right)
 
SDNV< E > operator+ (const SDNV< E > &left, const E right)
 
SDNV< E > operator- (const SDNV< E > &left, const SDNV< E > &right)
 
SDNV< E > operator- (const SDNV< E > &left, const E right)
 
SDNV< E > operator/ (const SDNV< E > &left, const SDNV< E > &right)
 
SDNV< E > operator/ (const SDNV< E > &left, const E right)
 
SDNV< E > operator* (const SDNV< E > &left, const SDNV< E > &right)
 
SDNV< E > operator* (const SDNV< E > &left, const E right)
 
std::ostream & operator<< (std::ostream &stream, const dtn::data::SDNV< E > &obj)
 
std::istream & operator>> (std::istream &stream, dtn::data::SDNV< E > &obj)
 

Detailed Description

template<class E>
class dtn::data::SDNV< E >

Definition at line 68 of file SDNV.h.

Constructor & Destructor Documentation

template<class E>
dtn::data::SDNV< E >::SDNV ( const E  value)
inline

Constructor for a SDNV object

Parameters
valueThe new value of the SDNV

Definition at line 81 of file SDNV.h.

template<class E>
dtn::data::SDNV< E >::SDNV ( )
inline

Definition at line 84 of file SDNV.h.

template<class E>
dtn::data::SDNV< E >::~SDNV ( )
inline

Destructor

Returns

Definition at line 91 of file SDNV.h.

Member Function Documentation

template<class E>
void dtn::data::SDNV< E >::decode ( std::istream &  stream)
inline

Definition at line 448 of file SDNV.h.

Referenced by dtn::routing::operator>>().

template<class E>
void dtn::data::SDNV< E >::encode ( std::ostream &  stream) const
inline

Definition at line 421 of file SDNV.h.

Referenced by dtn::routing::operator<<().

template<class E>
void dtn::data::SDNV< E >::fromString ( const std::string &  data)
inline

Definition at line 412 of file SDNV.h.

Referenced by dtn::api::PlainDeserializer::operator>>().

template<class E>
const E& dtn::data::SDNV< E >::get ( ) const
inline

Definition at line 116 of file SDNV.h.

template<class E>
static SDNV<E> dtn::data::SDNV< E >::max ( )
inlinestatic

Definition at line 393 of file SDNV.h.

template<class E>
bool dtn::data::SDNV< E >::operator!= ( const E  value) const
inline

Definition at line 135 of file SDNV.h.

template<class E>
bool dtn::data::SDNV< E >::operator!= ( const SDNV< E > &  value) const
inline

Definition at line 140 of file SDNV.h.

template<class E>
bool dtn::data::SDNV< E >::operator& ( const SDNV< E > &  value) const
inline

Definition at line 331 of file SDNV.h.

template<class E>
SDNV<E>& dtn::data::SDNV< E >::operator&= ( const SDNV< E > &  value)
inline

Definition at line 341 of file SDNV.h.

template<class E>
SDNV<E> dtn::data::SDNV< E >::operator* ( const E  value)
inline

Definition at line 291 of file SDNV.h.

template<class E>
SDNV<E> dtn::data::SDNV< E >::operator* ( const SDNV< E > &  value)
inline

Definition at line 297 of file SDNV.h.

template<class E>
SDNV<E>& dtn::data::SDNV< E >::operator*= ( const E  value)
inline

Definition at line 319 of file SDNV.h.

template<class E>
SDNV<E>& dtn::data::SDNV< E >::operator*= ( const SDNV< E > &  value)
inline

Definition at line 325 of file SDNV.h.

template<class E>
SDNV<E> dtn::data::SDNV< E >::operator+ ( const E  value)
inline

Definition at line 145 of file SDNV.h.

template<class E>
SDNV<E> dtn::data::SDNV< E >::operator+ ( const SDNV< E > &  value)
inline

Definition at line 151 of file SDNV.h.

template<class E>
SDNV<E>& dtn::data::SDNV< E >::operator++ ( )
inline

Definition at line 185 of file SDNV.h.

template<class E>
SDNV<E> dtn::data::SDNV< E >::operator++ ( int  )
inline

Definition at line 191 of file SDNV.h.

template<class E>
SDNV<E>& dtn::data::SDNV< E >::operator+= ( const E  value)
inline

Definition at line 173 of file SDNV.h.

template<class E>
SDNV<E>& dtn::data::SDNV< E >::operator+= ( const SDNV< E > &  value)
inline

Definition at line 179 of file SDNV.h.

template<class E>
SDNV<E> dtn::data::SDNV< E >::operator- ( const E  value)
inline

Definition at line 198 of file SDNV.h.

template<class E>
SDNV<E> dtn::data::SDNV< E >::operator- ( const SDNV< E > &  value)
inline

Definition at line 204 of file SDNV.h.

template<class E>
SDNV<E>& dtn::data::SDNV< E >::operator-- ( )
inline

Definition at line 238 of file SDNV.h.

template<class E>
SDNV<E> dtn::data::SDNV< E >::operator-- ( int  )
inline

Definition at line 244 of file SDNV.h.

template<class E>
SDNV<E>& dtn::data::SDNV< E >::operator-= ( const E  value)
inline

Definition at line 226 of file SDNV.h.

template<class E>
SDNV<E>& dtn::data::SDNV< E >::operator-= ( const SDNV< E > &  value)
inline

Definition at line 232 of file SDNV.h.

template<class E>
SDNV<E> dtn::data::SDNV< E >::operator/ ( const E  value)
inline

Definition at line 251 of file SDNV.h.

template<class E>
SDNV<E> dtn::data::SDNV< E >::operator/ ( const SDNV< E > &  value)
inline

Definition at line 257 of file SDNV.h.

template<class E>
SDNV<E>& dtn::data::SDNV< E >::operator/= ( const E  value)
inline

Definition at line 279 of file SDNV.h.

template<class E>
SDNV<E>& dtn::data::SDNV< E >::operator/= ( const SDNV< E > &  value)
inline

Definition at line 285 of file SDNV.h.

template<class E>
bool dtn::data::SDNV< E >::operator< ( const E  value) const
inline

Definition at line 353 of file SDNV.h.

template<class E>
bool dtn::data::SDNV< E >::operator< ( const SDNV< E > &  value) const
inline

Definition at line 373 of file SDNV.h.

template<class E>
bool dtn::data::SDNV< E >::operator<= ( const E  value) const
inline

Definition at line 358 of file SDNV.h.

template<class E>
bool dtn::data::SDNV< E >::operator<= ( const SDNV< E > &  value) const
inline

Definition at line 378 of file SDNV.h.

template<class E>
const SDNV& dtn::data::SDNV< E >::operator= ( const E  value)
inline

Definition at line 120 of file SDNV.h.

template<class E>
bool dtn::data::SDNV< E >::operator== ( const E  value) const
inline

Definition at line 125 of file SDNV.h.

template<class E>
bool dtn::data::SDNV< E >::operator== ( const SDNV< E > &  value) const
inline

Definition at line 130 of file SDNV.h.

template<class E>
bool dtn::data::SDNV< E >::operator> ( const E  value) const
inline

Definition at line 363 of file SDNV.h.

template<class E>
bool dtn::data::SDNV< E >::operator> ( const SDNV< E > &  value) const
inline

Definition at line 383 of file SDNV.h.

template<class E>
bool dtn::data::SDNV< E >::operator>= ( const E  value) const
inline

Definition at line 368 of file SDNV.h.

template<class E>
bool dtn::data::SDNV< E >::operator>= ( const SDNV< E > &  value) const
inline

Definition at line 388 of file SDNV.h.

template<class E>
bool dtn::data::SDNV< E >::operator| ( const SDNV< E > &  value) const
inline

Definition at line 336 of file SDNV.h.

template<class E>
SDNV<E>& dtn::data::SDNV< E >::operator|= ( const SDNV< E > &  value)
inline

Definition at line 347 of file SDNV.h.

template<class E>
SDNV<E>& dtn::data::SDNV< E >::random ( )
inline
template<class E>
void dtn::data::SDNV< E >::read ( std::istream &  stream)
inline

Friends And Related Function Documentation

template<class E>
SDNV<E> operator* ( const SDNV< E > &  left,
const SDNV< E > &  right 
)
friend

Definition at line 304 of file SDNV.h.

template<class E>
SDNV<E> operator* ( const SDNV< E > &  left,
const E  right 
)
friend

Definition at line 312 of file SDNV.h.

template<class E>
SDNV<E> operator+ ( const SDNV< E > &  left,
const SDNV< E > &  right 
)
friend

Definition at line 158 of file SDNV.h.

template<class E>
SDNV<E> operator+ ( const SDNV< E > &  left,
const E  right 
)
friend

Definition at line 166 of file SDNV.h.

template<class E>
SDNV<E> operator- ( const SDNV< E > &  left,
const SDNV< E > &  right 
)
friend

Definition at line 211 of file SDNV.h.

template<class E>
SDNV<E> operator- ( const SDNV< E > &  left,
const E  right 
)
friend

Definition at line 219 of file SDNV.h.

template<class E>
SDNV<E> operator/ ( const SDNV< E > &  left,
const SDNV< E > &  right 
)
friend

Definition at line 264 of file SDNV.h.

template<class E>
SDNV<E> operator/ ( const SDNV< E > &  left,
const E  right 
)
friend

Definition at line 272 of file SDNV.h.

template<class E>
std::ostream& operator<< ( std::ostream &  stream,
const dtn::data::SDNV< E > &  obj 
)
friend

Definition at line 481 of file SDNV.h.

template<class E>
std::istream& operator>> ( std::istream &  stream,
dtn::data::SDNV< E > &  obj 
)
friend

Definition at line 488 of file SDNV.h.

Member Data Documentation

template<class E>
const size_t dtn::data::SDNV< E >::MAX_LENGTH = 10
static

The maximum length for this SDNV implementation is 10 bytes, since the maximum value is 64 bits wide.

Definition at line 75 of file SDNV.h.

Referenced by dtn::data::SDNV< int >::decode(), and dtn::data::SDNV< int >::encode().


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