NAP
Public Member Functions | Public Attributes | List of all members
ConstantFillPolicy< T > Class Template Reference

#include <fillpolicy.h>

Public Member Functions

virtual void fill (uint numElements, T *data) const override
 
- Public Member Functions inherited from BaseFillPolicy
 BaseFillPolicy ()=default
 
virtual ~BaseFillPolicy ()=default
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

mConstant = T()
 Property 'Constant'. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

template<typename T>
class nap::ConstantFillPolicy< T >

Typed fill policy for constant values. Fills buffer with a specified constant.

Fill policies are initialization utilities that can help fill large blocks of preallocated memory. The fill function assigns a contiguous block of data based on the specified arguments.

Fill policies can be bound to another resource's property (i.e. ValueGPUBuffer) in configuration. Typically, an object will first check if a policy is available, and if so, use it to fill an internal buffer. Any object accepting a fill policy is free to implement the way fill() is used in their own way however.

Inheritance diagram for ConstantFillPolicy< T >:
[legend]
Collaboration diagram for ConstantFillPolicy< T >:
[legend]

Member Function Documentation

◆ fill()

void fill ( uint  numElements,
T *  data 
) const
overridevirtual

Fills the preallocated data

Parameters
numElementsthe number of elements to fill
datapointer to the preallocated data

Implements FillPolicy< T >.

Member Data Documentation

◆ mConstant

T mConstant = T()

Property 'Constant'.