Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CBufferObjectFactory Class Reference

Factory that provides CBufferObject registration and creation. More...

#include <BufferObjectFactory.h>

Static Public Member Functions

static std::unique_ptr< CBufferObjectCreateBufferObject (bool needsCreateBySize)
 Create a CBufferObject from the registered BufferObject types. In the future this may include some criteria for selecting a specific CBufferObject derived type. Currently it returns the CBufferObject implementation that was registered last.
 
static void RegisterBufferObject (const std::function< std::unique_ptr< CBufferObject >()> &)
 Registers a CBufferObject class to class to the factory.
 
static void ClearBufferObjects ()
 Clears the list of registered CBufferObject types.
 

Static Protected Attributes

static std::list< std::function< std::unique_ptr< CBufferObject >()> > m_bufferObjects
 

Detailed Description

Factory that provides CBufferObject registration and creation.

Member Function Documentation

◆ ClearBufferObjects()

void CBufferObjectFactory::ClearBufferObjects ( )
static

Clears the list of registered CBufferObject types.

◆ CreateBufferObject()

std::unique_ptr< CBufferObject > CBufferObjectFactory::CreateBufferObject ( bool needsCreateBySize)
static

Create a CBufferObject from the registered BufferObject types. In the future this may include some criteria for selecting a specific CBufferObject derived type. Currently it returns the CBufferObject implementation that was registered last.

Returns
std::unique_ptr<CBufferObject>

◆ RegisterBufferObject()

void CBufferObjectFactory::RegisterBufferObject ( const std::function< std::unique_ptr< CBufferObject >()> & createFunc)
static

Registers a CBufferObject class to class to the factory.

Member Data Documentation

◆ m_bufferObjects

std::list< std::function< std::unique_ptr< CBufferObject >()> > CBufferObjectFactory::m_bufferObjects
staticprotected

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