scsi_UInt24 Class Reference
[SCSI Library]

#include <scsi_types.h>

List of all members.


Detailed Description

Class that behaves like a 24-bit integer.

Definition at line 133 of file scsi_types.h.


Public Member Functions

 scsi_UInt24 ()
 scsi_UInt24 (UInt32_t a_uint)
 scsi_UInt24 (const scsi_UInt24_t &a_buf)
scsi_UInt24operator= (UInt32_t a_uint)
scsi_UInt24operator= (const scsi_UInt24_t &a_buf)
 operator UInt32_t () const

Private Attributes

scsi_UInt24_t m_data

Constructor & Destructor Documentation

scsi_UInt24::scsi_UInt24 (  )  [inline]

Definition at line 136 of file scsi_types.h.

00136                          {
00137         //Empty
00138     };

scsi_UInt24::scsi_UInt24 ( UInt32_t  a_uint  )  [inline]

Definition at line 140 of file scsi_types.h.

00140                                         {
00141         scsi_UInt32_t* buf = reinterpret_cast<scsi_UInt32_t*>(&a_uint);
00142         m_data[0] = (*buf)[0],
00143         m_data[1] = (*buf)[1],
00144         m_data[2] = (*buf)[2];
00145     };

scsi_UInt24::scsi_UInt24 ( const scsi_UInt24_t a_buf  )  [inline, explicit]

Definition at line 147 of file scsi_types.h.

00147                                                             {
00148         memcpy(m_data, &(a_buf[0]), sizeof(m_data));
00149     };


Member Function Documentation

scsi_UInt24& scsi_UInt24::operator= ( UInt32_t  a_uint  )  [inline]

Definition at line 151 of file scsi_types.h.

00151                                                      {
00152         scsi_UInt32_t* buf = reinterpret_cast<scsi_UInt32_t*>(&a_uint);
00153         m_data[0] = (*buf)[0],
00154         m_data[1] = (*buf)[1],
00155         m_data[2] = (*buf)[2];
00156         return (*this);
00157     };

scsi_UInt24& scsi_UInt24::operator= ( const scsi_UInt24_t a_buf  )  [inline]

Definition at line 159 of file scsi_types.h.

00159                                                                 {
00160         memcpy(m_data, &(a_buf[0]), sizeof(m_data));
00161         return (*this);
00162     };

scsi_UInt24::operator UInt32_t (  )  const [inline]

Definition at line 174 of file scsi_types.h.

00174                                       {
00175         UInt32_t retval = *(reinterpret_cast<const UInt32_t*>(m_data));
00176         return (retval & 0x00FFFFFF);
00177     };


Member Data Documentation

Definition at line 177 of file scsi_types.h.


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

Generated on Mon Feb 27 19:50:21 2012 for OPENARCHIVE by  doxygen 1.5.6