FastUIDraw
Public Member Functions | Public Attributes | List of all members
fastuidraw::PainterDataValue< T > Class Template Reference

Element of PainterData to hold shader data either reference directly to unpacked data or to reuseable packed data. More...

#include <painter_data_value.hpp>

Public Member Functions

 PainterDataValue (const T *p=nullptr)
 
 PainterDataValue (const PainterPackedValue< T > &p)
 
c_array< const reference_counted_ptr< const Image > > bind_images (void) const
 
void make_packed (PainterPackedValuePool &pool)
 
bool packed (void) const
 

Public Attributes

PainterPackedValue< T > m_packed_value
 
const T * m_value
 

Detailed Description

template<typename T>
class fastuidraw::PainterDataValue< T >

Element of PainterData to hold shader data either reference directly to unpacked data or to reuseable packed data.

Holds both a PainterPackedValue and a pointer to a value. If m_packed_value is valid, then its value is used. If it is nullptr then the value pointed to by m_value is used.

Definition at line 43 of file painter_data_value.hpp.

Constructor & Destructor Documentation

◆ PainterDataValue() [1/2]

template<typename T>
fastuidraw::PainterDataValue< T >::PainterDataValue ( const T *  p = nullptr)
inline

Ctor from a value.

Parameters
pvalue with which to initialize, the object pointed to by p must stay in scope until either make_packed() is called or the dtor of this PainterDataValue object is called.

Definition at line 53 of file painter_data_value.hpp.

◆ PainterDataValue() [2/2]

template<typename T>
fastuidraw::PainterDataValue< T >::PainterDataValue ( const PainterPackedValue< T > &  p)
inline

Ctor from a packed value.

Parameters
pvalue with which to initialize m_packed_value

Definition at line 61 of file painter_data_value.hpp.

Member Function Documentation

◆ bind_images()

template<typename T>
c_array<const reference_counted_ptr<const Image> > fastuidraw::PainterDataValue< T >::bind_images ( void  ) const
inline

Only makes sense for PainterBrushShaderData, see PainterBrushShaderData::bind_images().

Definition at line 71 of file painter_data_value.hpp.

◆ make_packed()

template<typename T >
void fastuidraw::PainterDataValue< T >::make_packed ( PainterPackedValuePool pool)

If m_packed_value is null, then sets it to a packed value created by the passed PainterPackedValuePool. In addition, sets m_value to nullptr.

Parameters
poolPainterPackedValuePool from which to create the packed value

Definition at line 111 of file painter_packed_value_pool.hpp.

◆ packed()

template<typename T>
bool fastuidraw::PainterDataValue< T >::packed ( void  ) const
inline

Provided as a conveniance, equivalent to

Definition at line 96 of file painter_data_value.hpp.

Member Data Documentation

◆ m_packed_value

template<typename T>
PainterPackedValue<T> fastuidraw::PainterDataValue< T >::m_packed_value

Value pre-packed and ready for reuse.

Definition at line 109 of file painter_data_value.hpp.

◆ m_value

template<typename T>
const T* fastuidraw::PainterDataValue< T >::m_value

Pointer to value.

Definition at line 104 of file painter_data_value.hpp.


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