|
fastcgi++
A C++ FastCGI/Web API
|
Allows raw storage of types in big endian format. More...
#include <fastcgi++/protocol.hpp>
Public Member Functions | |
| BigEndian & | operator= (T x) |
| BigEndian (T x) | |
| constexpr | BigEndian () |
| operator T () const | |
Static Public Member Functions | |
| static T | read (const unsigned char *source) |
| Static function for reading the value out of a data array. More... | |
| static T | read (const char *source) |
| Simply casts char to unsigned char. More... | |
Private Types | |
| typedef Unsigned< size >::Type | BaseType |
| Underlying unsigned integral type. More... | |
Private Member Functions | |
| void | set (T x) |
| Set the internal data to the passed parameter. More... | |
Private Attributes | |
| unsigned char | m_data [size] |
| The raw data of the big endian integer. More... | |
Static Private Attributes | |
| static const size_t | size = sizeof(T) |
Allows raw storage of types in big endian format.
This templated class allows any integral based (enumerations included) type to be stored in big endian format but maintain type compatibility.
| T | Type to emulate. Must be either an integral type or an enumeration who's underlying type is integral. |
Definition at line 205 of file protocol.hpp.
|
private |
Underlying unsigned integral type.
Definition at line 210 of file protocol.hpp.
|
inline |
Definition at line 239 of file protocol.hpp.
|
inline |
Definition at line 244 of file protocol.hpp.
|
inline |
Definition at line 247 of file protocol.hpp.
|
inline |
Definition at line 233 of file protocol.hpp.
|
inlinestatic |
Static function for reading the value out of a data array.
This will read the value out of an unsigned char array in big endian format and cast it into type T.
| [in] | source | Pointer to start of data. This data should of course be at minimum size. |
Definition at line 260 of file protocol.hpp.
Referenced by Fastcgipp::Protocol::BigEndian< uint16_t >::operator uint16_t(), and Fastcgipp::Protocol::BigEndian< uint16_t >::read().
|
inlinestatic |
Simply casts char to unsigned char.
Definition at line 277 of file protocol.hpp.
|
inlineprivate |
Set the internal data to the passed parameter.
Definition at line 219 of file protocol.hpp.
|
private |
The raw data of the big endian integer.
Definition at line 216 of file protocol.hpp.
Referenced by Fastcgipp::Protocol::BigEndian< uint16_t >::operator uint16_t(), and Fastcgipp::Protocol::BigEndian< uint16_t >::set().
|
staticprivate |
Definition at line 208 of file protocol.hpp.
Referenced by Fastcgipp::Protocol::BigEndian< uint16_t >::read(), and Fastcgipp::Protocol::BigEndian< uint16_t >::set().
1.8.14