Inviwo  0.9.10.1
Inviwo documentation
inviwo::TemplateColumn< T > Class Template Reference

Data column used for plotting which represents a named buffer of type T. The name is used as column header. More...

#include <column.h>

+ Inheritance diagram for inviwo::TemplateColumn< T >:

Public Types

using type = T
 

Public Member Functions

 TemplateColumn (const std::string &header)
 
 TemplateColumn (const TemplateColumn< T > &rhs)
 
 TemplateColumn (TemplateColumn< T > &&rhs)
 
TemplateColumn< T > & operator= (const TemplateColumn< T > &rhs)
 
TemplateColumn< T > & operator= (TemplateColumn< T > &&rhs)
 
virtual TemplateColumnclone () const override
 
virtual const std::string & getHeader () const override
 
void setHeader (const std::string &header) override
 
virtual void add (const T &value)
 
virtual void add (const std::string &value) override
 converts given value to type T, which is added to the column More...
 
virtual void set (size_t idx, const T &value)
 
get (size_t idx) const
 
virtual std::shared_ptr< DataPointBaseget (size_t idx, bool getStringsAsStrings) const override
 returns the data value for the given index. More...
 
virtual double getAsDouble (size_t idx) const override
 
virtual dvec2 getAsDVec2 (size_t idx) const override
 
virtual dvec3 getAsDVec3 (size_t idx) const override
 
virtual dvec4 getAsDVec4 (size_t idx) const override
 
void setBuffer (std::shared_ptr< Buffer< T >> buffer)
 
virtual std::string getAsString (size_t idx) const override
 
virtual std::shared_ptr< BufferBasegetBuffer () override
 
virtual std::shared_ptr< const BufferBasegetBuffer () const override
 
std::shared_ptr< Buffer< T > > getTypedBuffer ()
 
std::shared_ptr< const Buffer< T > > getTypedBuffer () const
 
virtual size_t getSize () const override
 

Protected Attributes

std::string header_
 
std::shared_ptr< Buffer< T > > buffer_
 

Detailed Description

template<typename T>
class inviwo::TemplateColumn< T >

Data column used for plotting which represents a named buffer of type T. The name is used as column header.

Member Function Documentation

◆ add()

template<typename T>
void inviwo::TemplateColumn< T >::add ( const std::string &  value)
overridevirtual

converts given value to type T, which is added to the column

Parameters
value
Exceptions
InvalidConversionif the value cannot be converted to T

Implements inviwo::Column.

Reimplemented in inviwo::CategoricalColumn.

◆ get()

template<typename T >
std::shared_ptr< DataPointBase > inviwo::TemplateColumn< T >::get ( size_t  idx,
bool  getStringsAsStrings 
) const
overridevirtual

returns the data value for the given index.

Parameters
idxindex
getStringsAsStringsif true, strings will be returned for categorical values instead of their internal representation. This will not affect other column types.
See also
CategoricalColumn

Implements inviwo::Column.

Reimplemented in inviwo::CategoricalColumn.


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