Public Member Functions | Private Attributes

scsi_UInt24 Class Reference
[SCSI Library]

Class that behaves like a 24-bit integer. More...

#include <scsi_types.h>

List of all members.

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

Detailed Description

Class that behaves like a 24-bit integer.

Definition at line 147 of file scsi_types.h.


Constructor & Destructor Documentation

scsi_UInt24::scsi_UInt24 (  )  [inline]

Definition at line 150 of file scsi_types.h.

                         {
        //Empty
    };

scsi_UInt24::scsi_UInt24 ( UInt32_t  a_uint  )  [inline]

Definition at line 154 of file scsi_types.h.

                                        {
        scsi_UInt32_t* buf = reinterpret_cast<scsi_UInt32_t*>(&a_uint);
        m_data[0] = (*buf)[0],
        m_data[1] = (*buf)[1],
        m_data[2] = (*buf)[2];
    };

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

Definition at line 161 of file scsi_types.h.

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


Member Function Documentation

scsi_UInt24::operator UInt32_t (  )  const [inline]

Definition at line 188 of file scsi_types.h.

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

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

Definition at line 165 of file scsi_types.h.

                                                     {
        scsi_UInt32_t* buf = reinterpret_cast<scsi_UInt32_t*>(&a_uint);
        m_data[0] = (*buf)[0],
        m_data[1] = (*buf)[1],
        m_data[2] = (*buf)[2];
        return (*this);
    };

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

Definition at line 173 of file scsi_types.h.

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


Member Data Documentation

Definition at line 191 of file scsi_types.h.


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