FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Classes | Public Member Functions | List of all members
Fiber::RepresentationMap Class Reference

A map that associates Representer objects with Representation instances. More...

#include <RepresentationMap.hpp>

Inheritance diagram for Fiber::RepresentationMap:
Fiber::FragmentIDCollectionProvider Fiber::Skeleton

Classes

class  ConstIterator
 Constant Iterator base class to inspect all representations in a given RepresentationMap. More...
 
class  Iterator
 Mutable Iterator base class to inspect all representations in a given RepresentationMap. More...
 

Public Member Functions

void clear ()
 
RefPtrRepresentation_t makeRepresentation (const Representer &D)
 
Representationoperator[] (const Representer &D)
 Retrieve (and possibly create) a Representation.
 
Representationoperator[] (const BaseSpace &D)
 
RefPtrRepresentation_t findRepresentation (const Representer &D) const
 Query a representation.
 
RefPtrRepresentation_t findRepresentation (const BaseSpace &D)
 
RefPtrRepresentation_t operator() (const Representer &D) const
 Use operator () to query a representation.
 
RefPtrRepresentation_t operator() (const BaseSpace &D)
 
int DataRank () const
 
RefPtr< SizeInterfacegetSize () const
 Get the data dimensionality of this Skeleton, which is taken from the positions field of the first representation, whatever it is.
 
RefPtr< SizeInterfacegetFragmentSize (const RefPtr< FragmentID > &Fid) const
 
int size () const
 Return the number of representations available here.
 
int getNumberOfRepresentations () const
 Return the number of representations available here.
 
RefPtr< FragmentIDCollectiongetFragmentIDCollection () const override
 Get the FragmentIDCollection that is responsible for all fields of this Representation.
 
std::tuple< Representer, RefPtrRepresentation_t, RefPtr< FragmentIDCollection > > getFragmentIDCollectionRepresentation () const
 
RefPtr< FragmentIDfindFragmentIDByName (const std::string &FragmentName) const
 
DynamicSize getFragmentLayout () const
 
int iterate (ConstIterator &) const
 Inspect all elements of this map.
 
int iterate (Iterator &)
 Iterate over all elements of this map.
 
int iterate (const std::function< bool(const Representer &, const Representation &)> &F) const
 Immutable iteration via std::function.
 
int iterate (const std::function< bool(const Representer &, Representation &)> &F)
 Mutable iteration via std::function.
 
template<class Functor >
int iterate_representations (const Functor &F) const
 
template<class Functor >
int iterate_all (const Functor &F) const
 
int getMemoryUsage (memsize_t &UsedMemory, memsize_t &WantedMemory) const
 Get memory usage.
 
void Speak (int indent=0, int maxindent=-1) const
 Informative debug message.
 
string xml () const
 

Detailed Description

A map that associates Representer objects with Representation instances.

Member Function Documentation

◆ getFragmentIDCollection()

RefPtr< FragmentIDCollection > Fiber::RepresentationMap::getFragmentIDCollection ( ) const
overridevirtual

◆ iterate_all()

template<class Functor >
int Fiber::RepresentationMap::iterate_all ( const Functor F) const
inline
    Iterate over everything contained here.
    Syntax using a Lambda function:
R.iterate_all( [](const Representer&theRepresenter, const Representation&R,
const FieldID&d, const Field&F,
{
}
);
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Identifier for Fields within a Grid.
Definition FieldID.hpp:53
A Field is a collection of CreativeArrayBase reference pointers which are accessed via FragmentID obj...
Definition Field.hpp:245
A Representation is a set of Field objects, each of them accessed via some FieldID identifier.
Definition Representation.hpp:101
See also
iterate_representations()

References apply(), iterate(), and Fiber::Representation::iterate_all().

Referenced by Fiber::Grid::iterate_all().

◆ iterate_representations()

template<class Functor >
int Fiber::RepresentationMap::iterate_representations ( const Functor F) const
inline
       Iterate over all representations using a functor or
       lambda function:
S.iterate_representations( [](const Representer&theRepresenter, const Representation&R)
{
if (RefPtr<Chart> C = theRepresenter)
Verbose(0) << " Coordinate Representation in " << C->Name();
if (RefPtr<Skeleton> S = theRepresenter)
Verbose(0) << " Relative Representation";
return true;
}
);

References apply().