Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
Public Types | Public Member Functions | Protected Attributes | List of all members
Wizt::Fish< Fiber::Field > Struct Reference

The fish scale to access the fields of a grid object in a fiber bundle. More...

#include <FishField.hpp>

Inheritance diagram for Wizt::Fish< Fiber::Field >:
Wizt::Fish< double > Wizt::Fish< VObject > Wizt::VSkale Wizt::VConnectable Wizt::VSlotContainer< int ExpertLevel > Wizt::VManagedObjectBase Wizt::VConnectionValidatorList Wizt::ValueCacheable MemCore::ReferenceBase< VManagedObjectBase > Wizt::FieldAnemoneBase Wizt::FieldCLOperation Wizt::FieldOperatorObject Wizt::TypedField< FieldTypes > Wizt::VFieldRenderObject Wizt::FieldAnemone Wizt::BinaryFieldOperatorObject< TheBinaryOperator, NamingOperator, PrimaryValueType, SecondaryValueType, ResultValueType > Wizt::EditField Wizt::FieldFunctor< Operation, GridInspectorType > Wizt::UnaryFieldOperatorObject< TheUnaryOperator, ResultType > Wizt::OrthoSlice Wizt::Vitreous Wizt::TypedFieldAnemone< DisplayShader::FieldType > Wizt::FieldSlice Wizt::PictureBase Wizt::ShadedFieldAnemone Wizt::TypedFieldAnemone< FieldType > Wizt::VolumeRender Wizt::VertexFieldShader< DisplayShader, RenderCategory > Wizt::ColorizedFloatSliceRenderer Wizt::OrthoSlice::FieldState Wizt::VectorFieldSlice Wizt::PictureInjectorBase Wizt::HeightDots Wizt::HeightDotsMultiView Wizt::WhiteDots

Public Types

enum  { NumberOfInputFields = 1 }
 
- Public Types inherited from Wizt::VSlotContainer< int ExpertLevel >
enum  AttachErrorCode
 
typedef void AcceptableInputTypes
 
typedef VSlotSet CreationSlots_t
 
typedef VSlot::Empty< IEmpty
 
- Public Types inherited from MemCore::ReferenceBase< VManagedObjectBase >
typedef Object reference_domain_t
 
typedef WeakPtr< Object, Object > SelfPtr_t
 

Public Member Functions

 Fish (const string &field, int ExpertLevel=0)
 Constructor, specify slot name for this field.
 
template<class ... T>
bool acceptType ()
 Tell this field to accept certain types.
 
void setFieldExpertLevel (int EL)
 Set the expert level of this slot.
 
 ~Fish ()
 Destructor, cleaning up.
 
void registerFieldAsOutput ()
 Make field visible as output.
 
string Fieldname (const RefPtr< ValuePool > &VP) const
 Get the name of the selected field.
 
string getFieldname (const RefPtr< ValuePool > &VP) const
 Get the name of the selected field.
 
RefPtr< Fiber::FieldgetField (const RefPtr< ValuePool > &VP) const
 Get a vertex field from the root level from the current selection.
 
RefPtr< Fiber::FieldgetField (const RefPtr< ValuePool > &VP, const string &theFieldName) const
 Get another field from the same Grid.
 
RefPtr< Fiber::FieldgetFieldRepresentation (const RefPtr< Fiber::Representation > &LevelRep, const RefPtr< ValuePool > &VP, const RefPtr< Fiber::Skeleton > &DestVertices, Fiber::Grid &SourceGrid, Fiber::Slice &DestGridSlice, const string &HelperDestGridName, bool StoreResult=true)
 Get Field from a possibly different Grid.
 
RefPtr< Fiber::FieldgetCoordinates (const RefPtr< ValuePool > &VP) const
 Get the coordinates on this Grid.
 
FieldSelector getFieldSelector (const RefPtr< ValuePool > &VP) const
 
double getTime (const RefPtr< ValuePool > &VP, const RefPtr< Fiber::Bundle > &SpaceTime) const override
 Get the time from the current field selector.
 
TypedSlot< VTimegetTimeSlot () const
 Return the associated time slot from the source object.
 
RefPtr< VManagedObjectgetSource () const
 Get the source object of this field slot, can be used to check if the field is connected to a source at all.
 
bool IterateLevels (LevelIterator &LI, const RefPtr< ValuePool > &Context, const Fiber::BundlePtr &SpaceTime=Fiber::BundlePtr(NullPtr())) const
 Get a field from an arbitrary representation from the current selection.
 
- Public Member Functions inherited from Wizt::Fish< double >
 Fish ()
 Default constructor.
 
 ~Fish ()
 Destructor.
 
virtual int getMaxRefinementLevel (const RefPtr< ValuePool > &VP) const
 Get the maximum refinement level that we seek to handle here.
 
virtual int getMinRefinementLevel (const RefPtr< ValuePool > &VP) const
 
virtual Fiber::Info< Fiber::SkeletongetRefinementLevel (int Level, const RefPtr< ValuePool > &VP, int IndexDepth=0, const Fiber::BundlePtr &SpaceTime=Fiber::BundlePtr(NullPtr())) const =0
 
bool IterateLevels (LevelIterator &LI, const Fiber::Info< Fiber::Grid > &G, const RefPtr< ValuePool > &Context) const
 Iterate over the diverse refinement levels of a Grid, which may exist at times different from the given coarsest grid.
 
- Public Member Functions inherited from Wizt::VConnectable
virtual void adjustConnections (const RefPtr< VSlot > &ChangedSlot, const RefPtr< VParameter > &par)
 
VSlotContainer::AttachErrorCode attach (const ParameterID &whichone, VSlotContainer &sourceObject, const ParameterID &sourceName)
 
AttachErrorCode attach (const RefPtr< VParameter > &OldParam, const RefPtr< VParameter > &NewParam, const string &Member={})
 
AttachErrorCode attachUniqueObject (const RefPtr< VParameter > &param, const RefPtr< VCreationPreferences > &VCP=NullPtr(), bool ReallyUnique=true)
 
AttachErrorCode attachUniqueObject (const RefPtr< VSlot > &slot, const RefPtr< VCreationPreferences > &VCP=NullPtr(), bool ReallyUnique=true)
 
RefPtr< VSlotConnect (const RefPtr< VParameter > &SourceParam)
 
RefPtr< VSlotConnectInterface (const RefPtr< VSlotContainer > &Provider, const RefPtr< InterfaceBase > &IB)
 
virtual bool CreatedFilteredConnection (const RefPtr< VParameter > &SourceParam)
 
- Public Member Functions inherited from Wizt::VSlotContainer< int ExpertLevel >
Ageableage (const RefPtr< ValuePool > &VP)
 
const Ageableage (const RefPtr< ValuePool > &VP) const
 
const AgeableConnectionAge () const
 
bool ConnectionsHaveChanged (const RefPtr< ValuePool > &VP) const
 
bool HasYoungerInput (const RefPtr< ValuePool > &Context, int RecursionLevel=0) const
 
Ageable YoungestInput (const RefPtr< ValuePool > &Context) const
 
Ageable YoungestOutput (const RefPtr< ValuePool > &Context) const
 
Ageable YoungestUncachedInput (const RefPtr< ValuePool > &Context) const
 
bool CheckIfThereExistNewerOutputs (const VRequest &request, bool AdjustObjectAge) const
 
RefPtr< VSlotaddParameter (const ParameterID &name, int EL, const RefPtr< VParameter > &param, bool overwriteExistingSlot)
 
virtual bool allowParameterReplacement (const RefPtr< VParameter > &NewParam, const RefPtr< VParameter > &OldParam, const string &localName, int ExpertLevel)
 
virtual int connectSlots (const VSlotContainerPtr &vobj)
 
bool removeParameter (const ParameterID &s)
 
RefPtr< VParametergetParameter (const ParameterID &s) const
 
RefPtr< VSlotgetSlot (const ParameterID &s, int &EL) const
 
bool setSlotValueFromText (const ParameterID &s, const string &ValueText, const RefPtr< ValuePool > &VP, const string &theMember={})
 
RefPtr< VSlotfindSlot (const RefPtr< VParameter > &param) const
 
string getSlotName (const RefPtr< VParameter > &param) const
 
bool AddAction (const ParameterID &s, const RefPtr< ValueActionBase > &VAB)
 
bool AddAction (const RefPtr< VSlot > &ActionSlot, bool(DerivedObject::*Action)(const RefPtr< VValueBase > &value))
 
RefPtr< VParametermkUniqueParameterInput (const ParameterID &s, const string &ContainerName)
 
int getExpertLevel (const ParameterID &s) const
 
int setExpertLevel (const ParameterID &s, int EL)
 
int getExpertLevel (const RefPtr< VParameter > &) const
 
int getExpertLevel (const RefPtr< VSlot > &S) const
 
int setExpertLevel (const RefPtr< VSlot > &S, int EL)
 
int setExpertLevel (const RefPtr< VParameter > &s, int EL)
 
bool hasChanged (const ParameterID &s, const RefPtr< ValuePool > &Context) const
 
bool hasChanged (const RefPtr< VSlot > &, const RefPtr< ValuePool > &Context) const
 
bool hasChanged (const RefPtr< ValuePool > &Context, int n,...) const
 
bool hasChanged (RefPtr< ValuePool > Context,...) const
 
virtual bool ignoreInput (const RefPtr< VSlot > &theSlot) const
 
bool getParameterValue (Type &Variable, const ParameterID &s, const RefPtr< ValuePool > &VP) const
 
bool getParameterValue (Type &Variable, const ParameterID &s, const VContext &C) const
 
bool getParameterValue (Type &Variable, const ParameterID &s, const VRequest &R) const
 
bool setParameterValue (const Type &Variable, const ParameterID &s, const RefPtr< ValuePool > &VP, bool autoCreateLocalValue) const
 
bool setParameterValue (const Type &Variable, const ParameterID &s, VContext &C, bool autoCreateLocalValue) const
 
bool setParameterValue (const Type &Variable, const ParameterID &s, VRequest &R, bool autoCreateLocalValue=false) const
 
RefPtr< VSlotaddParam (const ParameterID &name, const Type &init, const RefPtr< VCreationPreferences > &VP=NullPtr(), int expertLevel=0, bool overwriteExistingSlot=true)
 
bool setParameterProperty (const ParameterID &param, const string &Properties, const RefPtr< VValueBase > &Value=NullPtr())
 
RefPtr< VSlotaddFloatParam (double init, const ParameterID &param, double min, double max, const RefPtr< VCreationPreferences > &IP=NullPtr(), int expertLevel=0)
 
AttachErrorCode attach (const RefPtr< VParameter > &OldParam, const RefPtr< VParameter > &NewParam, const string &Member={})
 
int iterateParameters (int expertLevel, VSlotIterator &VIIt) const
 
int iterateInputSlots (int expertLevel, VSlotIterator &VIIt) const
 
int iterateInputs (VSlotIterator &VIIt, int expertLevel=0)
 
int iterate_inputs (const std::function< bool(VSlot &what, int ExpertLevel)>) const
 
RefPtr< VSlotgetUniqueInputSlot (const type_info &what)
 
int getNumberOfParameters (int expertLevel) const
 
virtual bool implements (const type_info &what) const
 
virtual RefPtr< VParametergetImplementation (const type_info &what, const string &name={}, const string &member={}) const
 
RefPtr< VSlotgetImplementationSlot (const type_info &what, const string &Name={}, const string &Member={}) const
 
VAcceptInfoList_t getAcceptInfoList (const std::type_info &request_type) const
 
bool provides (const RefPtr< VSlot > &OutputSlot) const
 
RefPtr< VSlotfindOutputSlot (const RefPtr< VParameter > &Who) const
 
bool isYounger (const RefPtr< VParameter > &OutputParam, const RefPtr< ValuePool > &VP) const
 
bool isNewlyConnected (const RefPtr< VParameter > &Who, const RefPtr< ValuePool > &VP) const
 
bool hasNewlyConnectedOutputs (const RefPtr< ValuePool > &VP) const
 
void findNewlyConnectedOutputs (const RefPtr< ValuePool > &VP, VSlotSet &WhichOnes) const
 
RefPtr< VSlotgetOutput (const string &Name) const
 
RefPtr< MemCore::StringListgetOutputs (const type_info &what=typeid(void)) const
 
virtual int iterateOutputs (VOutputIterator &VOut, const type_info &just_these=typeid(void)) const
 
bool registerOutput (const RefPtr< VParameter > &P, const string &AsName={})
 
bool registerOutput (const RefPtr< VParameter > &P, const string &AsName, const type_info &MemberType, const string &UseMember)
 
bool registerOutput (const RefPtr< VParameter > &P, const type_info &MemberType, const string &UseMember)
 
int getNumberOfInputs () const
 
int getNumberOfOutputs () const
 
bool hasChangedSlots (const MemCore::Intercube &IC, const RefPtr< ValuePool > &Context) const
 
auto include_self (const std::tuple< SlotList... > &t) const -> decltype(std::tuple_cat(std::make_tuple(this), t))
 
 in (VSlotContainer *that, const string &name, int expertLevel=0)
 
 in (VSlotContainer *that, const string &name, const GridSelector &GS=GridSelector(), int expertLevel=0)
 
 out (VConnectable *Source, const string &initial_name, const Fiber::GridSelector &InitValue=GridSelector(), const RefPtr< VCreationPreferences > &CP=NullPtr())
 
- Public Member Functions inherited from MemCore::ReferenceBase< VManagedObjectBase >
auto getObjectCountID () const noexcept
 
bool isIdentical (const WeakPtr< Object, Object > &PossibleSelf) const noexcept
 
void mkAutoDestructive ()
 
refcount_t refcount () const noexcept
 
 ReferenceBase (Object *that) noexcept
 
const auto & self () const
 
refcount_t wrefcount () const noexcept
 

Protected Attributes

TypedSlot< Fiber::FieldMyField
 

Additional Inherited Members

- Static Public Member Functions inherited from Wizt::VConnectable
static bool attachSlot (const WeakPtr< VSlot > &DestSlot, const RefPtr< VParameter > &ProvidedParam, const string &Member={})
 
static bool attachSlot (const WeakPtr< VSlot > &DestSlot, const RefPtr< VSlot > &SourceSlot, const string &Member={})
 
static bool detachSlot (const RefPtr< VSlot > &SourceSlot)
 
- Static Public Member Functions inherited from Wizt::VSlotContainer< int ExpertLevel >
static const charAttachErrorCodeMessage (AttachErrorCode)
 
static bool attachParameter (const RefPtr< VParameter > &theProvidedParam, const WeakPtr< VSlot > &theDestSlot, const string &theMember={})
 
- Static Public Member Functions inherited from Wizt::ValueCacheable
static ValueCacheconsider (MemCore::Intercube &IC, const WeakPtr< VSlot > &VS, const RefPtr< ValuePool > &Context)
 
static ValueCachegetValueCache (MemCore::Intercube &IC)
 
static bool hasChangedSlots (const WeakPtrToVSlotContainer &theSlotOwner, const MemCore::Intercube &IC, const RefPtr< ValuePool > &Context)
 
- Public Attributes inherited from Wizt::VSlotContainer< int ExpertLevel >
 AllLevels
 
 DestParameterNotFound
 
 InvalidDestParameter
 
- Protected Member Functions inherited from Wizt::VSlotContainer< int ExpertLevel >
virtual void setup (const CreationSlots_t &CreationSlots)
 
- Protected Member Functions inherited from MemCore::ReferenceBase< VManagedObjectBase >
virtual void extremeUnction ()
 
ReferenceBaseoperator= (const ReferenceBase &R)
 
void suicide ()
 

Detailed Description

The fish scale to access the fields of a grid object in a fiber bundle.

Fields that are selectable here are constrained to certain types. To define the specific types, use a syntax like this in your code, like in a derived class:

void addTypes()
{
}
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34

Member Enumeration Documentation

◆ anonymous enum

Enumerator
NumberOfInputFields 

How many fields must the connected object provide? Per default, one at least.

Child classes may define another enum.

Member Function Documentation

◆ acceptType()

template<class ... T>
bool Wizt::Fish< Fiber::Field >::acceptType ( )
inline

Tell this field to accept certain types.

Get global value of this slot (local field selection irrelevant)

◆ getField()

RefPtr< Fiber::Field > Wizt::Fish< Fiber::Field >::getField ( const RefPtr< ValuePool > &  VP,
const string &  theFieldName 
) const

Get another field from the same Grid.

Parameters
theFieldNameName of this other field.

◆ getSource()

RefPtr< VManagedObject > Wizt::Fish< Fiber::Field >::getSource ( ) const
inline

Get the source object of this field slot, can be used to check if the field is connected to a source at all.

◆ getTime()

double Wizt::Fish< Fiber::Field >::getTime ( const RefPtr< ValuePool > &  VP,
const RefPtr< Fiber::Bundle > &  SpaceTime 
) const
overridevirtual

Get the time from the current field selector.

Implements Wizt::Fish< double >.

◆ getTimeSlot()

TypedSlot< VTime > Wizt::Fish< Fiber::Field >::getTimeSlot ( ) const
inline

Return the associated time slot from the source object.

This is usually not required, but might be useful to inspect properties of the time object, such as a min/max range or the increments.

Application code might look like this:

double Tmin = 0.0, Tmax = 1.0, Tinc = 0.1;
{
MyTime->getProperty( VPROPERTY_VTIME_MIN, Tmin);
MyTime->getProperty( VPROPERTY_VTIME_MAX, Tmax);
}
TypedSlot< VTime > getTimeSlot() const
Return the associated time slot from the source object.
Definition FishField.hpp:304

◆ IterateLevels()

bool Wizt::Fish< Fiber::Field >::IterateLevels ( LevelIterator LI,
const RefPtr< ValuePool > &  Context,
const Fiber::BundlePtr SpaceTime = Fiber::BundlePtrNullPtr() ) 
) const

Get a field from an arbitrary representation from the current selection.

A representation may for instance be retrieved from the Fish<Skeleton> class:

RefPtr<Grid> G = ...;
RefPtr<Representation> LevelRep = getLevel( *G, R);
@code
/
const RefPtr<ValuePool>&VP) const;
getRefinementLevel(int Level,
int IndexDepth = 0,
const override ;
findMostRecentGrid(FieldSelector&GS, const RefPtr<ValuePool>&VP, const Fiber::BundlePtr&SpaceTime = Fiber::BundlePtr(NullPtr() )) const;
/**
Find the most recent grid for the current time ( Fish<Slice>() or virtual function getTime() ).
Note that this is only a convenient shortcut function as it will only be able to return one
Grid. In case of mesh refinement, the various levels might not reside all at time step and
may therefore be distributed across many Grid objects.
For correct treatment of such mesh refinements, employ the IterateLevels() function on an
LevelIterator.
/
Fiber::Bundle::GridInfo_t
findMostRecentGrid(const RefPtr<ValuePool>&VP, const Fiber::BundlePtr&SpaceTime = Fiber::BundlePtr( NullPtr() ) ) const;
using Fish<double>::IterateLevels;
/**
Iterate over all the selected levels of a Grid via an instance of the LevelIterator.
Use code like this in a subclass derived from Fish<Field> :
@code
struct DataExtractor : LevelIterator
{
bool apply(const RefPtr<Fiber::Representation>&CartesianLevelRep,
double time, int Level,
const RefPtr<Fiber::Grid>&GridWithCoarsetRefinementLevel,
const RefPtr<ValuePool>&Context) override
{
return truoverride;
}
}
DE;
IterateLevels(DE, Context);
Convenience class that implements a pointer to a Bundle object but adds some useful member funtions t...
Definition Bundle.hpp:779
An internal class that stores a couple of textual names.
Definition FieldSelector.hpp:18
std::nullptr_t NullPtr
The information as returned by a query for Grids.
Definition GridInfo.hpp:21
RefPtr< Fiber::Field > getField(const RefPtr< ValuePool > &VP) const
Get a vertex field from the root level from the current selection.
Definition FishField.cpp:192