Overte C++ Documentation
gpu::Batch::Cache< T >::Vector Class Reference

Templated container for objects inheriting from gpu::Object. More...

#include <Batch.h>

Public Member Functions

size_t size () const
 Get the current size of the container. More...
 
size_t cache (const Data &data)
 Adds a new object to the container. More...
 
const Data & get (uint32 offset) const
 Retrieve object with given index. More...
 
void clear ()
 Clear contents of this container.
 

Detailed Description

template<typename T>
class gpu::Batch::Cache< T >::Vector

Templated container for objects inheriting from gpu::Object.

Member Function Documentation

◆ cache()

template<typename T >
size_t gpu::Batch::Cache< T >::Vector::cache ( const Data &  data)
inline

Adds a new object to the container.

Parameters
dataObject to add.
Returns
Index of the added object in the container.

◆ get()

template<typename T >
const Data& gpu::Batch::Cache< T >::Vector::get ( uint32  offset) const
inline

Retrieve object with given index.

Parameters
offsetIndex of the object to be retrieved.
Returns
Reference to the object with a given index.

◆ size()

template<typename T >
size_t gpu::Batch::Cache< T >::Vector::size ( ) const
inline

Get the current size of the container.

Returns
Current size of the container.

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