Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
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
 Iterate over all representations using a functor or lambda function:
template<class Functor>
int iterate_all (const Functor &F) const
 Iterate over everything contained here.
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

Get the FragmentIDCollection that is responsible for all fields of this Representation.

This will be the FragmentIDCollection of the first Representation that has one.

Implements Fiber::FragmentIDCollectionProvider.

Reimplemented in Fiber::Skeleton.

Referenced by Fiber::Skeleton::operator=().

◆ 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,
{
}
);
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
StrongPtr< Object, ObjectBase > RefPtr
WeakPtr< BaseSpace > Representer
The type used to reference other objects, which is the anchor of representations of a Skeleton.
Definition RepresentationMap.hpp:28
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(), and iterate().

Referenced by Fiber::ShapefileSaver::apply_const(), ProjTransformator::get(), and ProjTransformator::get().