FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Public Types | Public Member Functions | List of all members
Wizt::GridActor< GridInspector, CreativeObject > Struct Template Reference

Creator for objects operating on certain kinds of Grid objects, providing an interface for the function Fiber::hasProperty() . More...

#include <GridActor.hpp>

Inheritance diagram for Wizt::GridActor< GridInspector, CreativeObject >:
Wizt::VCreator< VObjectType DerivedVObject, class AcceptedTypes > Wizt::VCreatorBase Wizt::VInputCreatorBase Wizt::VCreatorProperties Wizt::VManagedDomainObject< VInputCreatorBase > Wizt::VCreatorProperty< UINT_MAX > Wizt::VManagedObject Wizt::VCreatorPropertyBase Wizt::VManagedObjectBase MemCore::Intercube MemCore::MutableName Wizt::VCreatorPropertyElements MemCore::ReferenceBase< VManagedObjectBase >

Public Types

typedef VCreator< CreativeObject, AcceptList< Fiber::Grid > > Base_t
 
- Public Types inherited from Wizt::VManagedDomainObject< VInputCreatorBase >
typedef What Domain_t
 
- Public Types inherited from MemCore::ReferenceBase< VManagedObjectBase >
typedef Object reference_domain_t
 
typedef WeakPtr< Object, Object > SelfPtr_t
 

Public Member Functions

 GridActor (const std::string &name, int quality, const RefPtr< VCreationPreferences > &VP=nullptr, const char *const CreatorReleaseIdentifier=VISH_INPUT_CREATOR_RELEASE_IDENTIFIER)
 Construct grid actor from name and quality description.
 
template<unsigned ID>
 GridActor (const VCreatorProperty< ID > &CreatorProperties, int quality, const RefPtr< VCreationPreferences > &VP=nullptr, const char *const CreatorReleaseIdentifier=VISH_INPUT_CREATOR_RELEASE_IDENTIFIER)
 Construct grid actor from creation properties.
 
VAcceptInfoList_t accept (const RefPtr< VObject > &vobj) const override
 Acceptance function: check whether a grid exists with a Skeleton of type (1,1) (dimensionality one, index depth one -> edges).
 
- Public Member Functions inherited from Wizt::VCreator< VObjectType DerivedVObject, class AcceptedTypes >
VAcceptInfoList_t accept (const RefPtr< VObject > &vobj) const override
 
RefPtr< VObjectcreate (const VCreatorBase::CreationInfo &name, const Intercube &CreationContext, const RefPtr< VCreationPreferences > &AdditionalPreferences) const override
 
string createChildname (const string &parent_name) const override
 
 VCreator (const VCreatorProperties &CreatorProperties, int quality, const RefPtr< VCreationPreferences > &prop=nullptr, const char *const CreatorReleaseIdentifier=VISH_CREATOR_RELEASE_IDENTIFIER)
 
 VCreator (const VCreatorProperty< ID > &CreatorProperties, int quality, const RefPtr< VCreationPreferences > &prop=nullptr, const char *const ReleaseIdentifier=VISH_CREATOR_RELEASE_IDENTIFIER)
 
VCreatorProperty< ID1+ID2operator+ (const VCreatorProperty< ID1 > &l, const VCreatorProperty< ID2 > &r)
 
VCreatorProperty< ID1+ID2operator/ (const VCreatorProperty< ID1 > &l, const VCreatorProperty< ID2 > &r)
 
- Public Member Functions inherited from Wizt::VCreatorBase
virtual RefPtr< VObjectcreate (const CreationInfo &name, const Intercube &CreationContext, const RefPtr< VCreationPreferences > &AdditionalPreferences=nullptr) const=0
 
RefPtr< VObjectcreate (const string &name={}, const RefPtr< VCreationPreferences > &AdditionalPreferences=nullptr) const
 
const VCreatorPropertiesgetProperties () const
 
- Public Member Functions inherited from Wizt::VInputCreatorBase
RefPtr< VCreationPreferencesCreationPreferences (const RefPtr< VCreationPreferences > &AdditionalPreferences=nullptr) const
 
 VInputCreatorBase (const string &name, int prior, const RefPtr< VCreationPreferences > &prop, const char *vish_creator_release_identifier)
 
- Public Member Functions inherited from Wizt::VManagedDomainObject< VInputCreatorBase >
const type_infogetDomainType () const override
 
void remove ()
 
 VManagedDomainObject (const string &name, int priority=DEFAULT_PRIORITY)
 
- Public Member Functions inherited from Wizt::VManagedObject
string getLoadModule () const
 
void insert (const string &s, int priority=DEFAULT_PRIORITY)
 
void remove ()
 
void setPriority (int priority)
 
 VManagedObject (const string &name, int priority=DEFAULT_PRIORITY)
 
- 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
 
- Public Member Functions inherited from MemCore::Intercube
void addInterface (const RefPtr< InterfaceBase > &I) const
 
void addInterfaceData (const Data &D)
 
void addInterfaceData (const Data &D)
 
void clearInterfaces ()
 
bool const_iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP) const
 
virtual RefPtr< InterfaceBasecreateInterface (const type_info &) const
 
RefPtr< InterfaceBasefindInterface (const type_info &t) const
 
RefPtr< InterfaceBasegetInterface (const type_info &t)
 
std::string getInterfaceNames (const char delim=';') const
 
bool gotNewInterfaceData (const Data &D)
 
bool gotNewInterfaceData (mutex &M, const Data &D)
 
bool gotNewInterfaceData (mutex &M, const Data &D)
 
bool gotNewInterfaceData (mutex &M, const Data &D, const Selector &S)
 
bool gotNewInterfaceData (mutex &M, const Data &D, const Selector *S)
 
bool hasChangedInterfaceData (const Data &D) const
 
bool hasChangedInterfaceData (const Data &D) const
 
bool hasChangedInterfaceData (const Data &D, const Selector &) const
 
bool hasChangedInterfaceData (const Data &D, const Selector *) const
 
bool hasInterface (const type_info &t) const
 
bool iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP)
 
void printInterfaces () const
 
void registerInterface (const type_info &t)
 
void removeInterface ()
 
void removeInterfaceBase (const type_info &InterfaceBaseID)
 
- Public Member Functions inherited from MemCore::MutableName
void addNameChangeNotifier (const WeakPtr< Notifier > &)
 
std::string BaseName (const char Separator) const
 
const std::string & getName () const
 
 MutableName (const std::string &theName)
 
const std::string & Name () const
 
void rename (const std::string &newName)
 
void setName (const std::string &newName)
 
- Public Member Functions inherited from Wizt::VCreatorProperties
 VCreatorProperties (const string &keyname, const string &Description="", const string &Operatorname="")
 
 VCreatorProperties (const VCreatorProperty< ID > &VP)
 
- Public Member Functions inherited from Wizt::VCreatorProperty< UINT_MAX >
 VCreatorProperty (const string &name)
 
 VCreatorProperty (const VCreatorProperty< ID1 > &l, const VCreatorProperty< ID2 > &r)
 
 VCreatorProperty (const VCreatorProperty< ID1 > &vp)
 
- Public Member Functions inherited from Wizt::VCreatorPropertyBase
string & Application ()
 
const string & Application () const
 
string & Arguments ()
 
const string & Arguments () const
 
void assign (const VCreatorPropertyBase &l)
 
string Author () const
 
string & AuthorKey ()
 
const string & AuthorKey () const
 
string & Category ()
 
const string & Category () const
 
string & Description ()
 
const string & Description () const
 
string & helpurl ()
 
const string & helpurl () const
 
string & Identifier ()
 
const string & Identifier () const
 
string keyname (const char separator[]="/") const
 
std::string & operator() (unsigned i)
 
const string & operator() (unsigned i) const
 
string & OperatorName ()
 
const string & OperatorName () const
 
string & shorthelp ()
 
const string & shorthelp () const
 
string & SourceFile ()
 
const string & SourceFile () const
 
string & url ()
 
const string & url () const
 

Additional Inherited Members

- Static Public Member Functions inherited from Wizt::VCreatorBase
static int iterateIdentifiers (const string &Identifier, IdentifierIterator &It)
 
- Static Public Member Functions inherited from Wizt::VManagedDomainObject< VInputCreatorBase >
static bool remove (const std::string &s)
 
static RefPtr< VManagedObjectfind (const string &s)
 
static int iterate (VManagedObjectIterator_t VIt, int p_start=INT_MIN, int p_end=INT_MAX)
 
static int size ()
 
static int traverse (VManagedObjectIterator &VIt, int p_start=INT_MIN, int p_end=INT_MAX)
 
- Static Public Member Functions inherited from Wizt::VManagedObject
static int count ()
 
static VManagedObjectPtr find (const type_info &, const std::string &s)
 
static bool InitDomain (const type_info &)
 
static int iterateModules (ModuleIterator &VIM)
 
static int size (const type_info &)
 
static int traverse (const type_info &, VManagedObjectIterator &VIt, int p_start, int p_end)
 
static void UnloadVModule (const string &what, VRemoveItem &RI)
 
- Static Public Member Functions inherited from MemCore::MutableName
static std::string BaseName (const std::string &theName, const char Separator)
 
- Public Attributes inherited from Wizt::VCreatorPropertyElements
 CATEGORY
 
 TEXTIDENTIFIER
 
 POLYMORPHY
 
 DESCRIPTION
 
 OPERATORNAME
 
 OPERATORFONT
 
 SHORTHELP
 
 AUTHOR
 
 HELPURL
 
 URL
 
 APPLICATION
 
 MAX_PROPERTY
 
- Static Public Attributes inherited from Wizt::VManagedObject
static string CurrentLoadModule
 
- Protected Member Functions inherited from Wizt::VCreatorBase
void deleteAllInstances (const type_info &DerivedType) const
 
 VCreatorBase (const string &CreatorKeyName, int priority, const RefPtr< VCreationPreferences > &prop, bool isStatic, const char *const vish_creator_release_identifier)
 
 VCreatorBase (const VCreatorProperties &CreatorProperties, int priority, const RefPtr< VCreationPreferences > &prop, bool isStatic, const char *const vish_creator_release_identifier)
 
- Protected Member Functions inherited from MemCore::ReferenceBase< VManagedObjectBase >
virtual void extremeUnction ()
 
ReferenceBaseoperator= (const ReferenceBase &R)
 
void suicide ()
 
- Protected Attributes inherited from Wizt::VCreatorPropertyBase
 NumberOfProperties
 
std::string txt [NumberOfProperties]
 

Detailed Description

template<class GridInspector, class CreativeObject = void>
struct Wizt::GridActor< GridInspector, CreativeObject >

Creator for objects operating on certain kinds of Grid objects, providing an interface for the function Fiber::hasProperty() .

This template class provides a VCreator which requires input objects to provide Fiber::Grid objects that fulfull certain conditions, such as being a triangular surface or a set of lines.

Such conditions are formulated as a Fiber::BundleProperty, this template is a convenience helper class for VCreator objects that maps BundleProperty objects to VCreator acceptance functions.

For instance, one possible property to look for in a Grid object is the existence of a specific Skeleton. This property is modeled via a SkeletonExistence object. Code for objects operating on LineSets would look like this:

struct MyGridInspector
{
static SkeletonExistence InspectionProperty()
{
return SkeletonExistence( LineSet::ID() );
}
};
static Ref<GridActor<MyGridInspector, LineSetOperationObject> >
VLineSetOperationObjectCreator("Demo/LineSetOperationObject", ObjectQuality::DEMO);
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
A concrete Grid Property which looks for the existence of a Skeleton of the specified dimension and i...
Definition BundleProperty.hpp:76

Note that the function MyGridInspector::InspectionProperty() may return any object that is derived from class Fiber::BundleProperty and is accepted by Fiber::hasProperty(). For instance, a generic property may be defined as

struct MyGridInspector
{
{
bool checkSlice(Slice&S, const string&GridName) const override
{
...
}
};
static MyProperty&InspectionProperty()
{
static MyProperty myProperty;
return myProperty;
}
};
Convenient abstract base class for inspecting and evaluating properties of Bundles.
Definition BundleProperty.hpp:21
Information per time slice, mainly a set of Grid objects that are accessed via GridID objects.
Definition Slice.hpp:36

To generically check for a specific Grid derive from the GridProperty class:

struct MyGridInspector
{
{
bool checkGrid(const Grid&G) const override
{
return true;
}
};
static const MyProperty&InspectionProperty()
{
static MyProperty myProperty;
return myProperty;
}
};
An abstract bundle property which returns true if a Grid with the property query as implemented in th...
Definition BundleProperty.hpp:59
A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object.
Definition Grid.hpp:60
Note
User code may #define VERBOSE_GRIDACTOR prior to any header file inclusion to enable printing of some informative messages when the GridActor evaluates objects and tries to find out if there is a match.

, Fiber::BundleProperty, Fiber::GridSelector

Member Function Documentation

◆ accept()

VAcceptInfoList_t Wizt::GridActor< GridInspector, CreativeObject >::accept ( const RefPtr< VObject > &  vobj) const
inlineoverridevirtual

Acceptance function: check whether a grid exists with a Skeleton of type (1,1) (dimensionality one, index depth one -> edges).

Implements Wizt::VCreatorBase.

References Wizt::VCreator< CreativeObject, AcceptList< Fiber::Grid > >::accept(), Fiber::GridSelector::BundleSource(), Fiber::Iterator< T >::getValue(), Fiber::GridSelector::hasProperty(), and MemCore::Typename().