Katana Plug-in APIs 0.1
Public Types | Public Member Functions

Foundry::Katana::ConstVector< T > Class Template Reference

Helper class used to wrap raw attribute data contained on the host side, with a stl::vector style interface. More...

#include <FnConstVector.h>

Inheritance diagram for Foundry::Katana::ConstVector< T >:
Foundry::Katana::ConstVectorBase< T >

List of all members.

Public Types

typedef T value_type
typedef const value_typeconst_iterator
typedef const value_typeconst_reference
typedef std::size_t size_type

Public Member Functions

 ConstVector (const Attribute &attr, float t)
 ConstVector (Attribute &&attr, float t)
size_type size () const
bool empty () const
const_iterator begin () const &
const_iterator end () const &
const_reference operator[] (size_type i) const &
const_reference at (size_type i) const &
const_reference front () const &
const_reference back () const &
const value_typedata () const &

Detailed Description

template<class T>
class Foundry::Katana::ConstVector< T >

Helper class used to wrap raw attribute data contained on the host side, with a stl::vector style interface.

The data is immutable so only const references are available.

There are several convenience typedefs of this class for the different Attribute types, which remove the template from ConstVector: IntConstVector, FloatConstVector, DoubleConstVector, StringConstVector


Member Typedef Documentation

template<class T >
typedef const value_type* Foundry::Katana::ConstVector< T >::const_iterator

Const iterator for the data type

template<class T >
typedef const value_type& Foundry::Katana::ConstVector< T >::const_reference

Const reference for the data type

template<class T >
typedef std::size_t Foundry::Katana::ConstVector< T >::size_type

Typedef of the sizetype

Reimplemented from Foundry::Katana::ConstVectorBase< T >.

template<class T >
typedef T Foundry::Katana::ConstVector< T >::value_type

Basic type of the data in ConstVectorBase

Reimplemented from Foundry::Katana::ConstVectorBase< T >.


Constructor & Destructor Documentation

template<class T >
Foundry::Katana::ConstVector< T >::ConstVector ( const Attribute attr,
float  t 
) [inline]

Constructor for a ConstVector that shares ownership of attr.

template<class T >
Foundry::Katana::ConstVector< T >::ConstVector ( Attribute &&  attr,
float  t 
) [inline]

Constructor for a ConstVector that takes ownership of attr.


Member Function Documentation

template<class T >
const_reference Foundry::Katana::ConstVector< T >::at ( size_type  i) const [inline]

Individual element access read only

template<class T >
const_reference Foundry::Katana::ConstVector< T >::back ( ) const [inline]

Returns a const reference to the last element

template<class T >
const_iterator Foundry::Katana::ConstVector< T >::begin ( ) const [inline]

Returns an iterator at the beginning of the data

template<class T >
const value_type* Foundry::Katana::ConstVector< T >::data ( ) const [inline]

Pointer to the raw data (read-only)

template<class T >
bool Foundry::Katana::ConstVector< T >::empty ( ) const [inline]

Returns false if the ConstVector contains any data

Reimplemented from Foundry::Katana::ConstVectorBase< T >.

template<class T >
const_iterator Foundry::Katana::ConstVector< T >::end ( ) const [inline]

Returns an iterator at the end of the data

template<class T >
const_reference Foundry::Katana::ConstVector< T >::front ( ) const [inline]

Returns a const reference to the first element

template<class T >
const_reference Foundry::Katana::ConstVector< T >::operator[] ( size_type  i) const [inline]

Individual element access read only

template<class T >
size_type Foundry::Katana::ConstVector< T >::size ( ) const [inline]

Returns the number of data elements

Reimplemented from Foundry::Katana::ConstVectorBase< T >.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations Enumerator