seven bits

bit::Int< I > Class Template Reference

#include <bit/integer.h>

Inheritance diagram for bit::Int< I >:

bit::Integer

List of all members.

template<typename I>
class bit::Int< I >


Public Types

typedef BitPointer< Int< I > > pointer

Public Member Functions

 Int (I v=0, ByteOrder bo=BYTEORDER_HOST)
 Int (ByteOrder bo)
 Int (const Data d, ByteOrder databo=BYTEORDER_HOST, ByteOrder bo=BYTEORDER_HOST)
 Constructor that sets the value from a data object.
 ~Int ()
virtual Integer::pointer clone () const
 operator I () const
bool operator< (I i) const
bool operator<= (I i) const
bool operator== (I i) const
bool operator!= (I i) const
bool operator>= (I i) const
bool operator> (I i) const
Int< I > & operator= (I i)
Int< I > operator+ (I i) const
Int< I > operator- (I i) const
Int< I > operator* (I i) const
Int< I > operator/ (I i) const
Int< I > operator% (I i) const
Int< I > & operator+= (I i)
Int< I > & operator-= (I i)
Int< I > & operator*= (I i)
Int< I > & operator/= (I i)
Int< I > & operator%= (I i)
virtual void set_value (const Data d)
 Sets the value from a data object by directly copying; byte ordering of the data is not considered.
virtual void set_value (const void *mem, size_t size)
 Sets the value from a data object by directly copying; byte ordering of the data is not considered.
virtual void set_value (const Data d, ByteOrder databo)
 Sets the value from a data object.
virtual Data as_data () const
virtual size_t size () const
virtual const void * voidptr () const
virtual const std::type_info & int_type ()
host () const
network () const
big_endian () const
little_endian () const

Static Public Member Functions

static pointer create (I v=0, ByteOrder bo=BYTEORDER_HOST)
static pointer create (ByteOrder bo)
static pointer create (const Data d, ByteOrder databo=BYTEORDER_HOST, ByteOrder bo=BYTEORDER_HOST)

Public Attributes

value

Protected Member Functions

void convert_value_from_type_to_host ()
void convert_value_from_host_to_type ()

Member Typedef Documentation

template<typename I>
typedef BitPointer< Int<I> > bit::Int< I >::pointer

Reimplemented from bit::Integer.


Constructor & Destructor Documentation

template<typename I>
bit::Int< I >::Int ( v = 0,
ByteOrder  bo = BYTEORDER_HOST 
) [inline]

template<typename I>
bit::Int< I >::Int ( ByteOrder  bo  )  [inline]

template<typename I>
bit::Int< I >::Int ( const Data  d,
ByteOrder  databo = BYTEORDER_HOST,
ByteOrder  bo = BYTEORDER_HOST 
) [inline]

Constructor that sets the value from a data object.

Parameters:
d The data object. The first n bytes are used to set the value.
databo The byte order of the data object
bo The byte order of this integer.

References bit::Int< I >::set_value().

template<typename I>
bit::Int< I >::~Int (  )  [inline]


Member Function Documentation

template<typename I>
static pointer bit::Int< I >::create ( v = 0,
ByteOrder  bo = BYTEORDER_HOST 
) [inline, static]

Referenced by bit::Int< I >::clone().

template<typename I>
static pointer bit::Int< I >::create ( ByteOrder  bo  )  [inline, static]

template<typename I>
static pointer bit::Int< I >::create ( const Data  d,
ByteOrder  databo = BYTEORDER_HOST,
ByteOrder  bo = BYTEORDER_HOST 
) [inline, static]

template<typename I>
virtual Integer::pointer bit::Int< I >::clone (  )  const [inline, virtual]

template<typename I>
bit::Int< I >::operator I (  )  const [inline]

References bit::Int< I >::host().

template<typename I>
bool bit::Int< I >::operator< ( i  )  const [inline]

References bit::Int< I >::host().

template<typename I>
bool bit::Int< I >::operator<= ( i  )  const [inline]

References bit::Int< I >::host().

template<typename I>
bool bit::Int< I >::operator== ( i  )  const [inline]

References bit::Int< I >::host().

template<typename I>
bool bit::Int< I >::operator!= ( i  )  const [inline]

References bit::Int< I >::host().

template<typename I>
bool bit::Int< I >::operator>= ( i  )  const [inline]

References bit::Int< I >::host().

template<typename I>
bool bit::Int< I >::operator> ( i  )  const [inline]

References bit::Int< I >::host().

template<typename I>
Int<I>& bit::Int< I >::operator= ( i  )  [inline]

template<typename I>
Int<I> bit::Int< I >::operator+ ( i  )  const [inline]

template<typename I>
Int<I> bit::Int< I >::operator- ( i  )  const [inline]

template<typename I>
Int<I> bit::Int< I >::operator* ( i  )  const [inline]

template<typename I>
Int<I> bit::Int< I >::operator/ ( i  )  const [inline]

template<typename I>
Int<I> bit::Int< I >::operator% ( i  )  const [inline]

template<typename I>
Int<I>& bit::Int< I >::operator+= ( i  )  [inline]

template<typename I>
Int<I>& bit::Int< I >::operator-= ( i  )  [inline]

template<typename I>
Int<I>& bit::Int< I >::operator*= ( i  )  [inline]

template<typename I>
Int<I>& bit::Int< I >::operator/= ( i  )  [inline]

template<typename I>
Int<I>& bit::Int< I >::operator%= ( i  )  [inline]

template<typename I>
virtual void bit::Int< I >::set_value ( const Data  d  )  [inline, virtual]

Sets the value from a data object by directly copying; byte ordering of the data is not considered.

Parameters:
d The data object. The first n bytes are used to set the value.

Implements bit::Integer.

References bit::Data::data(), bit::Data::size(), and bit::Int< I >::value.

Referenced by bit::Int< I >::Int().

template<typename I>
virtual void bit::Int< I >::set_value ( const void *  mem,
size_t  size 
) [inline, virtual]

Sets the value from a data object by directly copying; byte ordering of the data is not considered.

Implements bit::Integer.

References bit::Int< I >::value.

template<typename I>
virtual void bit::Int< I >::set_value ( const Data  d,
ByteOrder  databo 
) [inline, virtual]

Sets the value from a data object.

Parameters:
d The data object. The first n bytes are used to set the value.
databo The byte order of the data object

Implements bit::Integer.

References bit::be_to_host(), bit::Integer::byte_order, bit::BYTEORDER_BIG_ENDIAN, bit::BYTEORDER_HOST, bit::BYTEORDER_LITTLE_ENDIAN, bit::BYTEORDER_NETWORK, bit::Data::data(), bit::host_to_le(), bit::host_to_net(), bit::le_to_host(), bit::le_to_net(), bit::net_to_le(), bit::Data::size(), and bit::Int< I >::value.

template<typename I>
virtual Data bit::Int< I >::as_data (  )  const [inline, virtual]

Implements bit::Integer.

References bit::Data::data(), and bit::Int< I >::value.

template<typename I>
virtual size_t bit::Int< I >::size (  )  const [inline, virtual]

Implements bit::Integer.

template<typename I>
virtual const void* bit::Int< I >::voidptr (  )  const [inline, virtual]

Implements bit::Integer.

References bit::Int< I >::value.

template<typename I>
virtual const std::type_info& bit::Int< I >::int_type (  )  [inline, virtual]

Implements bit::Integer.

template<typename I>
I bit::Int< I >::host (  )  const [inline]

template<typename I>
I bit::Int< I >::network (  )  const [inline]

template<typename I>
I bit::Int< I >::big_endian (  )  const [inline]

template<typename I>
I bit::Int< I >::little_endian (  )  const [inline]

template<typename I>
void bit::Int< I >::convert_value_from_type_to_host (  )  [inline, protected]

template<typename I>
void bit::Int< I >::convert_value_from_host_to_type (  )  [inline, protected]


Member Data Documentation

template<typename I>
I bit::Int< I >::value


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

Generated on Mon Nov 3 10:50:01 2008 for bit by doxygen 1.5.6