Inviwo  0.9.10.1
Inviwo documentation
inviwo::DataGroup< Self, Repr > Class Template Referenceabstract

The base class for all DataGroup objects. More...

#include <datagroup.h>

+ Inheritance diagram for inviwo::DataGroup< Self, Repr >:

Public Types

using self = Self
 
using repr = Repr
 

Public Member Functions

virtual DataGroup< Self, Repr > * clone () const =0
 
template<typename T >
const T * getRepresentation () const
 
template<typename T >
T * getEditableRepresentation ()
 
template<typename T >
bool hasRepresentation () const
 
bool hasRepresentations () const
 
void clearRepresentations ()
 

Protected Member Functions

 DataGroup (const DataGroup< Self, Repr > &rhs)
 
DataGroup< Self, Repr > & operator= (const DataGroup< Self, Repr > &rhs)
 

Protected Attributes

std::mutex mutex_
 
std::unordered_map< std::type_index, std::shared_ptr< Repr > > representations_
 

Detailed Description

template<typename Self, typename Repr>
class inviwo::DataGroup< Self, Repr >

The base class for all DataGroup objects.

It owns or has reference to zero or many Data objects.

It also owns DataGroupRepresentations, which has references to DataRepresentations, which are owned by the referenced/owned Data objects.

Differences between DataGroup and Data:

  • DataGroup can never hold any data with owning(referencing[later]) a Data object or a DataGroup object
  • DataGroupRepresentation need reference to all Data objects to be created correctly
  • DataGroup does not have converters, as the DataGroup objects always can create them self correctly.
  • DataGroupRepresentation becomes invalid when a child representations becomes invalid, thus we do not know when it's valid and we need to call update before we return it from getRepresentation.

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