Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::RepresentationOf Concept Reference

#include <data.h>

Concept definition

template<typename D, typename Rep>
concept inviwo::RepresentationOf = is_instance_of<D, Data> && std::is_base_of_v<typename D::repr, Rep>
Definition data.h:466

Detailed Description

Concept for ensuring that D is an instance of the Data class that TRAMrep is a RAM representation of D as well.

Usage:

template <DataType T, RepresentationOf<T> TRAMrep>
std::shared_ptr<T> createFromRAMRepresentation(std::shared_ptr<TRAMrep> ramRep) {
    return std::make_shared<T>(ramRep);
}