eformat::helper::Status Class Reference

#include <Status.h>

List of all members.

Public Member Functions

 Status (eformat::GenericStatus gen, uint16_t spec)
 Status (uint32_t v)
eformat::GenericStatus generic (void) const
uint16_t specific (void) const
uint32_t code (void) const

Private Attributes

eformat::GenericStatus m_gen
 The generic part.
uint16_t m_spec
 The specific part.


Detailed Description

Defines converters between version numbers and its components

Definition at line 51 of file Status.h.


Constructor & Destructor Documentation

eformat::helper::Status::Status ( eformat::GenericStatus  gen,
uint16_t  spec 
) [inline]

Constructor. Takes the components to form a status

Parameters:
gen The generic component
spec The specific component

Definition at line 60 of file Status.h.

00061         : m_gen(gen), m_spec(spec) {}

eformat::helper::Status::Status ( uint32_t  v  ) 

Constructor. Takes the status to understand the components from.

Parameters:
s The status number, fully built.
Warning:
This status value has to conform to the current version of the library or unpredictable results might occur.

Definition at line 15 of file Status.cxx.

00016   : m_gen(static_cast<eformat::GenericStatus>(v&0xffff)),
00017     m_spec((v>>16)&0xffff)
00018 {
00019 }


Member Function Documentation

uint32_t eformat::helper::Status::code ( void   )  const

Gets the full 32-bit number made by assembling the 2 numbers above.

Definition at line 21 of file Status.cxx.

References m_gen, and m_spec.

00022 {
00023   uint32_t retval = m_spec;
00024   retval <<= 16;
00025   retval |= m_gen;
00026   return retval;
00027 }

eformat::GenericStatus eformat::helper::Status::generic ( void   )  const [inline]

Extracts the generic part of this status word

Definition at line 75 of file Status.h.

References m_gen.

00075 { return m_gen; }

uint16_t eformat::helper::Status::specific ( void   )  const [inline]

Extracts the specific part of this status word

Definition at line 80 of file Status.h.

References m_spec.

00080 { return m_spec; }


Member Data Documentation

eformat::GenericStatus eformat::helper::Status::m_gen [private]

The generic part.

Definition at line 90 of file Status.h.

Referenced by code(), and generic().

uint16_t eformat::helper::Status::m_spec [private]

The specific part.

Definition at line 91 of file Status.h.

Referenced by code(), and specific().


Generated on Tue Nov 29 23:36:30 2016 for BOSS_7.0.2 by  doxygen 1.4.7