struct InferenceEngine::DescriptionBuffer

Overview

A description buffer wrapping StatusCode and ResponseDesc. More…

#include <description_buffer.hpp>

struct DescriptionBuffer: public std::basic_streambuf< char, std::char_traits< char > >
{
    // construction

    DescriptionBuffer(StatusCode err, ResponseDesc \* desc);
    DescriptionBuffer(StatusCode err);
    DescriptionBuffer(ResponseDesc \* desc);
    DescriptionBuffer(char \* pBuffer, size_t len);
    DescriptionBuffer(StatusCode err, char \* pBuffer, size_t len);

    // methods

    template <class T>
    DescriptionBuffer& operator << (const T& obj);

    operator StatusCode () const;
};

Detailed Documentation

A description buffer wrapping StatusCode and ResponseDesc.

Construction

DescriptionBuffer(StatusCode err, ResponseDesc \* desc)

Creeates a description buffer with parameters.

Parameters:

err

The error code

desc

The response desc to write an error message to

DescriptionBuffer(StatusCode err)

Constructs with StatusCode.

Parameters:

err

The StatusCode value

DescriptionBuffer(ResponseDesc \* desc)

Constructs with ResponseDesc.

Parameters:

desc

The ResponseDesc pointer

DescriptionBuffer(char \* pBuffer, size_t len)

Constructs with parameters.

Parameters:

pBuffer

The buffer to wrtie to.

len

The length of pBuffer

DescriptionBuffer(StatusCode err, char \* pBuffer, size_t len)

Constructs with parameters.

Parameters:

err

The StatusCode value

pBuffer

The buffer to wrtie to.

len

The length of pBuffer

Methods

template <class T>
DescriptionBuffer& operator << (const T& obj)

Writes to ResponseDesc stream.

Parameters:

obj

The object to write to stream

T

An object type

Returns:

A reference to itself

operator StatusCode () const

Converts to StatusCode.

Returns:

A StatusCode value