Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
DiagnosticBufferProvider Class Reference

#include "steam/engine/diagnostic-buffer-provider.hpp"

Description

Helper for unit tests: Buffer provider reference implementation.

Todo:
write type comment

Definition at line 52 of file diagnostic-buffer-provider.hpp.

Static Public Member Functions

static BufferProviderbuild ()
 build a new Diagnostic Buffer Provider instance, discard the existing one.
 
static DiagnosticBufferProvideraccess (BufferProvider const &)
 access the diagnostic API of the buffer provider
 

Public Member Functions

bool buffer_was_used (uint bufferID) const
 
bool buffer_was_closed (uint bufferID) const
 
void * accessMemory (uint bufferID) const
 
bool all_buffers_released () const
 

Friends

class lib::DependencyFactory< DiagnosticBufferProvider >
 

Private Member Functions

TrackingHeapBlockProviderreset ()
 
bool isCurrent (BufferProvider const &)
 
 DiagnosticBufferProvider ()
 
 ~DiagnosticBufferProvider ()
 
- Private Member Functions inherited from NonCopyable
 ~NonCopyable ()=default
 
 NonCopyable ()=default
 
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Private Attributes

std::unique_ptr< TrackingHeapBlockProviderpImpl_
 

Static Private Attributes

static lib::Depend< DiagnosticBufferProviderdiagnostics
 Storage for the diagnostics frontend.
 

Constructor & Destructor Documentation

◆ DiagnosticBufferProvider()

Definition at line 40 of file diagnostic-buffer-provider.cpp.

◆ ~DiagnosticBufferProvider()

Definition at line 44 of file diagnostic-buffer-provider.cpp.

Member Function Documentation

◆ reset()

TrackingHeapBlockProvider & reset ( )
private

Definition at line 68 of file diagnostic-buffer-provider.cpp.

References TrackingHeapBlockProvider::markAllEmitted(), and DiagnosticBufferProvider::pImpl_.

+ Here is the call graph for this function:

◆ isCurrent()

bool isCurrent ( BufferProvider const &  implInstance)
private

Definition at line 77 of file diagnostic-buffer-provider.cpp.

References DiagnosticBufferProvider::pImpl_.

Referenced by DiagnosticBufferProvider::access().

+ Here is the caller graph for this function:

◆ build()

◆ access()

DiagnosticBufferProvider & access ( BufferProvider const &  provider)
static

access the diagnostic API of the buffer provider

Exceptions
error::Invalidif the given provider doesn't allow for diagnostic access or wasn't registered beforehand.

Definition at line 55 of file diagnostic-buffer-provider.cpp.

References DiagnosticBufferProvider::diagnostics, and DiagnosticBufferProvider::isCurrent().

Referenced by BufferProviderProtocol_test::verifySimpleUsage(), and BufferProviderProtocol_test::verifyStandardCase().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buffer_was_used()

bool buffer_was_used ( uint  bufferID) const

Definition at line 89 of file diagnostic-buffer-provider.cpp.

References DiagnosticBufferProvider::pImpl_.

Referenced by BufferProviderProtocol_test::verifySimpleUsage().

+ Here is the caller graph for this function:

◆ buffer_was_closed()

bool buffer_was_closed ( uint  bufferID) const

Definition at line 96 of file diagnostic-buffer-provider.cpp.

References DiagnosticBufferProvider::pImpl_.

Referenced by BufferProviderProtocol_test::verifySimpleUsage().

+ Here is the caller graph for this function:

◆ accessMemory()

void * accessMemory ( uint  bufferID) const

Definition at line 103 of file diagnostic-buffer-provider.cpp.

References DiagnosticBufferProvider::pImpl_.

Referenced by BufferProviderProtocol_test::verifySimpleUsage().

+ Here is the caller graph for this function:

◆ all_buffers_released()

bool all_buffers_released ( ) const

Referenced by BufferProviderProtocol_test::verifyStandardCase().

+ Here is the caller graph for this function:

Member Data Documentation

◆ pImpl_

◆ diagnostics

lib::Depend< DiagnosticBufferProvider > diagnostics
staticprivate

Storage for the diagnostics frontend.

Definition at line 57 of file diagnostic-buffer-provider.hpp.

Referenced by DiagnosticBufferProvider::access(), and DiagnosticBufferProvider::build().

Friends And Related Symbol Documentation

◆ lib::DependencyFactory< DiagnosticBufferProvider >

Definition at line 65 of file diagnostic-buffer-provider.hpp.

+ Inheritance diagram for DiagnosticBufferProvider:
+ Collaboration diagram for DiagnosticBufferProvider:

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