AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::avsCommon::utils::logger::LogEntryBuffer Class Reference

#include <LogEntryBuffer.h>

Inheritance diagram for alexaClientSDK::avsCommon::utils::logger::LogEntryBuffer:
Inheritance graph
Collaboration diagram for alexaClientSDK::avsCommon::utils::logger::LogEntryBuffer:
Collaboration graph

Public Member Functions

 LogEntryBuffer ()
 Construct an empty LogEntryBuffer. More...
int_type overflow (int_type ch) override
const char * c_str () const

Detailed Description

A simple override of std::streambuf to accumulate the content of a stream into a contiguous buffer so that the stream contents do not need to be copied to be accessed as a string. To avoid needless heap allocation the initial put buffer is a member variable that should be large enough to accommodate most log entries.

Constructor & Destructor Documentation

◆ LogEntryBuffer()

alexaClientSDK::avsCommon::utils::logger::LogEntryBuffer::LogEntryBuffer ( )

Construct an empty LogEntryBuffer.

Member Function Documentation

◆ c_str()

const char * alexaClientSDK::avsCommon::utils::logger::LogEntryBuffer::c_str ( ) const

Access the contents of the accumulated buffer as a string.

The contents of the accumulated buffer as a string. The pointer returned is only guaranteed to be valid for the lifetime of this LogEntryBuffer, and only as long as no further modifications are made to it.

◆ overflow()

LogEntryBuffer::int_type alexaClientSDK::avsCommon::utils::logger::LogEntryBuffer::overflow ( int_type  ch)

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

AlexaClientSDK 1.26.0 - Copyright 2016-2021, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0