fastcgi++  3.1alpha
A C++ FastCGI/Web API
Fastcgipp::SQL::Parameter< int16_t > Struct Reference

#include <fastcgi++/sql/parameters.hpp>

Inheritance diagram for Fastcgipp::SQL::Parameter< int16_t >:
[legend]
Collaboration diagram for Fastcgipp::SQL::Parameter< int16_t >:
[legend]

Public Member Functions

constexpr operator int16_t () const noexcept
 
constexpr const char * data () const
 Pointer to start of big endian integer representation. More...
 
constexpr unsigned size () const
 Size in bytes of value. More...
 

Static Public Member Functions

static constexpr int16_t read (const unsigned char *source) noexcept
 Static function for reading the value out of a data array. More...
 
static constexpr int16_t read (const char *source) noexcept
 Simply casts char to unsigned char. More...
 

Static Public Attributes

static const unsigned oid = Traits<int16_t>::oid
 

Private Types

typedef Unsigned< s_size >::Type BaseType
 Underlying unsigned integral type. More...
 

Private Member Functions

constexpr void set (int16_t x) noexcept
 Set the internal data to the passed parameter. More...
 

Static Private Member Functions

static constexpr void from (const unsigned char *arr, std::uint16_t &v) noexcept
 
static constexpr void from (const unsigned char *arr, std::uint32_t &v) noexcept
 
static constexpr void from (const unsigned char *arr, std::uint64_t &v) noexcept
 
static constexpr void to (unsigned char *arr, const std::uint16_t v)
 
static constexpr void to (unsigned char *arr, const std::uint32_t v)
 
static constexpr void to (unsigned char *arr, const std::uint64_t v)
 

Private Attributes

unsigned char m_data [s_size]
 The raw data of the big endian integer. More...
 

Static Private Attributes

static constexpr unsigned s_size
 

Detailed Description

Definition at line 115 of file parameters.hpp.

Member Typedef Documentation

◆ BaseType

typedef Unsigned<s_size>::Type Fastcgipp::BigEndian< int16_t >::BaseType
privateinherited

Underlying unsigned integral type.

Definition at line 147 of file endian.hpp.

Member Function Documentation

◆ data()

constexpr const char* Fastcgipp::BigEndian< int16_t >::data
inlineconstexprinherited

Pointer to start of big endian integer representation.

Definition at line 212 of file endian.hpp.

◆ from() [1/3]

static constexpr void Fastcgipp::BigEndian_base::from ( const unsigned char *  arr,
std::uint16_t &  v 
)
inlinestaticconstexprprotectednoexceptinherited

Definition at line 78 of file endian.hpp.

◆ from() [2/3]

static constexpr void Fastcgipp::BigEndian_base::from ( const unsigned char *  arr,
std::uint32_t &  v 
)
inlinestaticconstexprprotectednoexceptinherited

Definition at line 86 of file endian.hpp.

◆ from() [3/3]

static constexpr void Fastcgipp::BigEndian_base::from ( const unsigned char *  arr,
std::uint64_t &  v 
)
inlinestaticconstexprprotectednoexceptinherited

Definition at line 96 of file endian.hpp.

◆ operator int16_t()

constexpr Fastcgipp::BigEndian< int16_t >::operator int16_t
inlineconstexprnoexceptinherited

Definition at line 182 of file endian.hpp.

◆ read() [1/2]

static constexpr int16_t Fastcgipp::BigEndian< int16_t >::read ( const char *  source)
inlinestaticconstexprnoexceptinherited

Simply casts char to unsigned char.

Definition at line 206 of file endian.hpp.

◆ read() [2/2]

static constexpr int16_t Fastcgipp::BigEndian< int16_t >::read ( const unsigned char *  source)
inlinestaticconstexprnoexceptinherited

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.

Parameters
[in]sourcePointer to start of data. This data should of course be at minimum size.

Definition at line 195 of file endian.hpp.

◆ set()

constexpr void Fastcgipp::BigEndian< int16_t >::set ( int16_t  x)
inlineconstexprprivatenoexceptinherited

Set the internal data to the passed parameter.

Definition at line 158 of file endian.hpp.

◆ size()

constexpr unsigned Fastcgipp::BigEndian< int16_t >::size
inlineconstexprinherited

Size in bytes of value.

Definition at line 218 of file endian.hpp.

◆ to() [1/3]

static constexpr void Fastcgipp::BigEndian_base::to ( unsigned char *  arr,
const std::uint16_t  v 
)
inlinestaticconstexprprotectedinherited

Definition at line 111 of file endian.hpp.

◆ to() [2/3]

static constexpr void Fastcgipp::BigEndian_base::to ( unsigned char *  arr,
const std::uint32_t  v 
)
inlinestaticconstexprprotectedinherited

Definition at line 116 of file endian.hpp.

◆ to() [3/3]

static constexpr void Fastcgipp::BigEndian_base::to ( unsigned char *  arr,
const std::uint64_t  v 
)
inlinestaticconstexprprotectedinherited

Definition at line 123 of file endian.hpp.

Member Data Documentation

◆ m_data

unsigned char Fastcgipp::BigEndian< int16_t >::m_data[s_size]
privateinherited

The raw data of the big endian integer.

Definition at line 155 of file endian.hpp.

◆ oid

const unsigned Fastcgipp::SQL::Parameter< int16_t >::oid = Traits<int16_t>::oid
static

Definition at line 119 of file parameters.hpp.

◆ s_size

constexpr unsigned Fastcgipp::BigEndian< int16_t >::s_size
staticconstexprprivateinherited

Definition at line 145 of file endian.hpp.


The documentation for this struct was generated from the following files: