seven bits

bit::Float< F > Class Template Reference

#include <bit/float.h>

Inheritance diagram for bit::Float< F >:

bit::FloatingPoint

List of all members.

template<typename F>
class bit::Float< F >


Public Types

typedef BitPointer< Float< F > > pointer

Public Member Functions

 Float (F v=0, ByteOrder bo=BYTEORDER_HOST)
 Float (ByteOrder bo)
 Float (const Data d, ByteOrder databo=BYTEORDER_HOST, ByteOrder bo=BYTEORDER_HOST)
 Constructor that sets the value from a data object.
 ~Float ()
virtual FloatingPoint::pointer clone () const
 operator F () const
bool operator< (F f) const
bool operator<= (F f) const
bool operator== (F f) const
bool operator!= (F f) const
bool operator>= (F f) const
bool operator> (F f) const
Float< F > & operator= (F f)
Float< F > operator+ (F f) const
Float< F > operator- (F f) const
Float< F > operator* (F f) const
Float< F > operator/ (F f) const
Float< F > & operator+= (F f)
Float< F > & operator-= (F f)
Float< F > & operator*= (F f)
Float< F > & operator/= (F f)
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 (F 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 F>
typedef BitPointer< Float<F> > bit::Float< F >::pointer

Reimplemented from bit::FloatingPoint.


Constructor & Destructor Documentation

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

template<typename F>
bit::Float< F >::Float ( ByteOrder  bo  )  [inline]

template<typename F>
bit::Float< F >::Float ( 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::Float< F >::set_value().

template<typename F>
bit::Float< F >::~Float (  )  [inline]


Member Function Documentation

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

Referenced by bit::Float< F >::clone().

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

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

template<typename F>
virtual FloatingPoint::pointer bit::Float< F >::clone (  )  const [inline, virtual]

template<typename F>
bit::Float< F >::operator F (  )  const [inline]

template<typename F>
bool bit::Float< F >::operator< ( f  )  const [inline]

template<typename F>
bool bit::Float< F >::operator<= ( f  )  const [inline]

template<typename F>
bool bit::Float< F >::operator== ( f  )  const [inline]

template<typename F>
bool bit::Float< F >::operator!= ( f  )  const [inline]

template<typename F>
bool bit::Float< F >::operator>= ( f  )  const [inline]

template<typename F>
bool bit::Float< F >::operator> ( f  )  const [inline]

template<typename F>
Float<F>& bit::Float< F >::operator= ( f  )  [inline]

template<typename F>
Float<F> bit::Float< F >::operator+ ( f  )  const [inline]

template<typename F>
Float<F> bit::Float< F >::operator- ( f  )  const [inline]

template<typename F>
Float<F> bit::Float< F >::operator* ( f  )  const [inline]

template<typename F>
Float<F> bit::Float< F >::operator/ ( f  )  const [inline]

template<typename F>
Float<F>& bit::Float< F >::operator+= ( f  )  [inline]

template<typename F>
Float<F>& bit::Float< F >::operator-= ( f  )  [inline]

template<typename F>
Float<F>& bit::Float< F >::operator*= ( f  )  [inline]

template<typename F>
Float<F>& bit::Float< F >::operator/= ( f  )  [inline]

template<typename F>
virtual void bit::Float< F >::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::FloatingPoint.

References bit::Data::data(), bit::Data::size(), and bit::Float< F >::value.

Referenced by bit::Float< F >::Float().

template<typename F>
virtual void bit::Float< F >::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::FloatingPoint.

References bit::Float< F >::value.

template<typename F>
virtual void bit::Float< F >::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::FloatingPoint.

References bit::be_to_host(), bit::FloatingPoint::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::Float< F >::value.

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

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

Implements bit::FloatingPoint.

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

Implements bit::FloatingPoint.

References bit::Float< F >::value.

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

Implements bit::FloatingPoint.

template<typename F>
F bit::Float< F >::host (  )  const [inline]

template<typename F>
F bit::Float< F >::network (  )  const [inline]

template<typename F>
F bit::Float< F >::big_endian (  )  const [inline]

template<typename F>
F bit::Float< F >::little_endian (  )  const [inline]

template<typename F>
void bit::Float< F >::convert_value_from_type_to_host (  )  [inline, protected]

template<typename F>
void bit::Float< F >::convert_value_from_host_to_type (  )  [inline, protected]


Member Data Documentation

template<typename F>
F bit::Float< F >::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