|
The Vish Visualization Shell 0.3
Vish
|
Generic base class for all VObjects. More...
#include <ocean/plankton/VObject.hpp>
Classes | |
| struct | ExecutionStatus |
| Exception class that might be thrown by update() and is handled in the data flow traversal. More... | |
| struct | OutputObjectIterator |
| Iterator callback object for searching and finding output objects. More... | |
Public Types | |
| typedef void | AcceptableInputTypes |
| Each VObject may define a set of possible input types, which are types that are provided by some other objects to be used as inputs of this object. | |
| template<int I> | |
| using | Empty = VConnectable::Empty< I > |
| Shortcut typedef to be used in construction of empty slots. | |
Public Types inherited from MemCore::ReferenceBase< VManagedObjectBase > | |
| using | reference_domain_t = VManagedObjectBase |
| The type of the base class. | |
| using | SelfPtr_t = WeakPtr< VManagedObjectBase, VManagedObjectBase > |
| Type for a pointer to this object itself. | |
Public Types inherited from Wizt::VSlotContainer< ExpertLevel > | |
| enum | { AllLevels = INT_MAX } |
| typedef void | AcceptableInputTypes |
| Each VObject may define a set of possible input types, which are types that are provided by some other objects to be used as inputs of this object. | |
| typedef VSlotSet | CreationSlots_t |
| A set of slots. | |
| template<int I> | |
| using | Empty = VSlot::Empty< I > |
| Shortcut typedef to be used in construction of empty slots. | |
| enum | AttachErrorCode { } |
Public Types inherited from Wizt::VSaveable | |
| using | save_iterator = std::function< bool(const string &s, VishSaver &VS)> |
| Callback function to iterate over object savers. | |
Public Types inherited from Wizt::VManagedDomainObject< VObject > | |
| typedef VObject | Domain_t |
| The domain type of this managed object. | |
Public Member Functions | |
| string | CreatorName () const |
| Retrieve the name of the object's creator. | |
| const WeakPtrVCreatorBase & | getCreator () const |
| Get the Creator of this object. | |
Public Member Functions inherited from Wizt::VManagedObjectBase | |
| VManagedObjectBase () | |
| Constructor. | |
| ~VManagedObjectBase () | |
| Destructor. | |
Public Member Functions inherited from MemCore::ReferenceBase< VManagedObjectBase > | |
| auto | getObjectCountID () const noexcept |
| Get a unique ID for this object in the given domain. | |
| bool | isIdentical (const WeakPtr< VManagedObjectBase, VManagedObjectBase > &PossibleSelf) const noexcept |
| Check if this object is identical to the one used by the given pointer. | |
| void | mkAutoDestructive () |
| Marks this object as being automatically destructed, e.g. | |
| refcount_t | refcount () const noexcept |
| The strong reference count. | |
| ReferenceBase (VManagedObjectBase *that) noexcept | |
| Constructor, initializes reference counter to zero. | |
| const auto & | self () const |
| Return weak pointer to the object self. | |
| refcount_t | wrefcount () const noexcept |
| The weak reference count. | |
Public Member Functions inherited from Wizt::VConnectable | |
| virtual void | adjustConnections (const RefPtr< VSlot > &ChangedSlot, const RefPtr< VParameter > &par) |
| Callback function that is called when a Connect() has been issued. | |
| VSlotContainer::AttachErrorCode | attach (const ParameterID &whichone, VSlotContainer &sourceObject, const ParameterID &sourceName) |
| Share a parameter with another one. | |
| AttachErrorCode | attach (const RefPtr< VParameter > &OldParam, const RefPtr< VParameter > &NewParam, const string &Member={}) |
| Replace a given parameter of the current object with another parameter. | |
| AttachErrorCode | attachUniqueObject (const RefPtr< VParameter > ¶m, const RefPtr< VCreationPreferences > &VCP=NullPtr(), bool ReallyUnique=true) |
| Try to find an existing object that matches its type with the specified parameter. | |
| AttachErrorCode | attachUniqueObject (const RefPtr< VSlot > &slot, const RefPtr< VCreationPreferences > &VCP=NullPtr(), bool ReallyUnique=true) |
| Try to find an existing object that matches its type with the specified parameter. | |
| RefPtr< VSlot > | Connect (const RefPtr< VParameter > &SourceParam) |
| Given a certain parameter, overload a parameter of the same type in the current object with this one. | |
| RefPtr< VSlot > | ConnectInterface (const RefPtr< VSlotContainer > &Provider, const RefPtr< InterfaceBase > &IB) |
| virtual bool | CreatedFilteredConnection (const RefPtr< VParameter > &SourceParam) |
| We wish to connect the current object to the given parameter, but it provides an output type that cannot be used by this current object as input type. | |
Public Member Functions inherited from Wizt::VSlotContainer< ExpertLevel > | |
| Ageable & | age (const RefPtr< ValuePool > &VP) |
| Return the age of this object, which may be modified. | |
| const Ageable & | age (const RefPtr< ValuePool > &VP) const |
| Return the age of this object in read-only form. | |
| const Ageable & | ConnectionAge () const |
| Return the age when connections had last been modified. | |
| bool | ConnectionsHaveChanged (const RefPtr< ValuePool > &VP) const |
| Check whether the connections have changed on this object. | |
| bool | HasYoungerInput (const RefPtr< ValuePool > &Context, int RecursionLevel=0) const |
| Ageable | YoungestInput (const RefPtr< ValuePool > &Context) const |
| Return the age of the youngest input. | |
| Ageable | YoungestOutput (const RefPtr< ValuePool > &Context) const |
| Determine the age of the youngest output object. | |
| Ageable | YoungestUncachedInput (const RefPtr< ValuePool > &Context) const |
| Return the age of the youngest input slot that is not cached. | |
| virtual | ~VSlotContainer () |
| Destructor. | |
| RefPtr< VSlot > | addParameter (const ParameterID &name, int EL, const RefPtr< VParameter > ¶m, bool overwriteExistingSlot) |
| Specify a parameter (type) as input for this VObject. | |
| virtual bool | allowParameterReplacement (const RefPtr< VParameter > &NewParam, const RefPtr< VParameter > &OldParam, const string &localName, int ExpertLevel) |
| Virtual callback function invoked by replaceParameter() when the implementation of a parameter is changed by another one. | |
| virtual int | connectSlots (const VSlotContainerPtr &vobj) |
| Tries to connect all slots found in the given VObject with those of the current one. | |
| bool | removeParameter (const ParameterID &s) |
| Remove a parameter from the list of input objects. | |
| RefPtr< VParameter > | getParameter (const ParameterID &s) const |
| Return the local input parameter slot for a certain parameter name. | |
| RefPtr< VSlot > | getSlot (const ParameterID &s, int &EL) const |
| A more verbose version of getParameter() which also provides information about which member of a certain parameter is used here; note that the type of the full parameter will be different from the type of a member of the parameter. | |
| bool | setSlotValueFromText (const ParameterID &s, const string &ValueText, const RefPtr< ValuePool > &VP, const string &theMember={}) |
| Convenience function to set an input value from its textual representation. | |
| RefPtr< VSlot > | findSlot (const RefPtr< VParameter > ¶m) const |
| Given a parameter, find a slot that refers to this one. | |
| string | getSlotName (const RefPtr< VParameter > ¶m) const |
| Check whether this object contains the given parameter, and if so, under which slot's name. | |
| bool | AddAction (const ParameterID &s, const RefPtr< ValueActionBase > &VAB) |
| Associate the change of a certain parameter of this object with a certain action. | |
| template<class DerivedObject > | |
| bool | AddAction (const RefPtr< VSlot > &ActionSlot, bool(DerivedObject::*Action)(const RefPtr< VValueBase > &value)) |
| Connect the change of a parameter with the invocation of an object's member function. | |
| RefPtr< VParameter > | mkUniqueParameterInput (const ParameterID &s, const string &ContainerName) |
| Calls VParameter::copy();. | |
| int | getExpertLevel (const ParameterID &s) const |
| Get the expert level of a parameter. | |
| int | setExpertLevel (const ParameterID &s, int EL) |
| Set the expert level of a parameter. | |
| int | getExpertLevel (const RefPtr< VParameter > &) const |
| Get the expert level of a parameter via pointer. | |
| int | getExpertLevel (const RefPtr< VSlot > &S) const |
| Get the expert level of a parameter via pointer. | |
| int | setExpertLevel (const RefPtr< VSlot > &S, int EL) |
| Set the expert level of a parameter via pointer. | |
| int | setExpertLevel (const RefPtr< VParameter > &s, int EL) |
| Set the expert level of a parameter via pointer. | |
| bool | hasChanged (const ParameterID &s, const RefPtr< ValuePool > &Context) const |
| Check whether a certain input parameter has changed. | |
| bool | hasChanged (const RefPtr< VSlot > &, const RefPtr< ValuePool > &Context) const |
| Check whether a certain input slot has changed. | |
| bool | hasChanged (const RefPtr< ValuePool > &Context, int n,...) const |
| Check a set of input parameters whether one has changed. | |
| bool | hasChanged (RefPtr< ValuePool > Context,...) const |
| Check a set of input parameters whether one has changed. | |
| virtual bool | ignoreInput (const RefPtr< VSlot > &theSlot) const |
| Allow ignoring certain slots on update(). | |
| template<class Type > | |
| bool | getParameterValue (Type &Variable, const ParameterID &s, const RefPtr< ValuePool > &VP) const |
| Get a value for a certain parameter. | |
| template<class Type > | |
| bool | getParameterValue (Type &Variable, const ParameterID &s, const VContext &C) const |
| Get a value for a certain parameter. | |
| template<class Type > | |
| bool | getParameterValue (Type &Variable, const ParameterID &s, const VRequest &R) const |
| Get a value for a certain parameter. | |
| template<class Type > | |
| bool | setParameterValue (const Type &Variable, const ParameterID &s, const RefPtr< ValuePool > &VP, bool autoCreateLocalValue) const |
| Set a value for a parameter, given a ValuePool. | |
| template<class Type > | |
| bool | setParameterValue (const Type &Variable, const ParameterID &s, VContext &C, bool autoCreateLocalValue) const |
| Set a value for a parameter, given a context. | |
| template<class Type > | |
| bool | setParameterValue (const Type &Variable, const ParameterID &s, VRequest &R, bool autoCreateLocalValue=false) const |
| Set a value for a parameter, given a context. | |
| template<class Type > | |
| RefPtr< VSlot > | addParam (const ParameterID &name, const Type &init, const RefPtr< VCreationPreferences > &VP=NullPtr(), int expertLevel=0, bool overwriteExistingSlot=true) |
| Add an input parameter to the VObject. | |
| bool | setParameterProperty (const ParameterID ¶m, const string &Properties, const RefPtr< VValueBase > &Value=NullPtr()) |
| Set a property of an input parameter, such as the minimum or maximum of a bounded numerical value. | |
| RefPtr< VSlot > | addFloatParam (double init, const ParameterID ¶m, double min, double max, const RefPtr< VCreationPreferences > &IP=NullPtr(), int expertLevel=0) |
| Shortcut function to add a floating point parameter. | |
| AttachErrorCode | attach (const RefPtr< VParameter > &OldParam, const RefPtr< VParameter > &NewParam, const string &Member={}) |
| Replace a given parameter of the current object with another parameter. | |
| int | iterateParameters (int expertLevel, VSlotIterator &VIIt) const |
| Iterate over all VInput objects that have an expert level lower or equal to the expertLevel parameter. | |
| int | iterateInputSlots (int expertLevel, VSlotIterator &VIIt) const |
| Same as iterateParameters(). | |
| int | iterateInputs (VSlotIterator &VIIt, int expertLevel=0) |
| Iterate all inputs with expert level smaller than zero (default), or as specified. | |
| int | iterate_inputs (const std::function< bool(VSlot &what, int ExpertLevel)>) const |
| Iterate over all VInput objects that have an expert level lower or equal to the expertLevel parameter. | |
| RefPtr< VSlot > | getUniqueInputSlot (const type_info &what) |
| Find an input slot that queries a specific type. | |
| int | getNumberOfParameters (int expertLevel) const |
| Get the number of parameters up to a certain expert level. | |
| virtual bool | implements (const type_info &what) const |
| Check whether this VObject implements a certain type. | |
| virtual RefPtr< VParameter > | getImplementation (const type_info &what, const string &name={}, const string &member={}) const |
| By querying a type and an optional finer textual description, retrieve an Parameter that is implemented by this VObject. | |
| RefPtr< VSlot > | getImplementationSlot (const type_info &what, const string &Name={}, const string &Member={}) const |
| Query an output slot for the given type. | |
| VAcceptInfoList_t | getAcceptInfoList (const std::type_info &request_type) const |
| Get a list of possible output implementations for the given request type. | |
| bool | provides (const RefPtr< VSlot > &OutputSlot) const |
| Verifies that the specified slot is provided by the current VObject. | |
| RefPtr< VSlot > | findOutputSlot (const RefPtr< VParameter > &Who) const |
| Find an output slot that refers to the given parameter, i.e. | |
| bool | isYounger (const RefPtr< VParameter > &OutputParam, const RefPtr< ValuePool > &VP) const |
| Check if an output parameter is of younger age, which might be the case if it has been recently connected or modified through external means. | |
| bool | isNewlyConnected (const RefPtr< VParameter > &Who, const RefPtr< ValuePool > &VP) const |
| Check if an output parameter has been recently connected or modified through external means. | |
| bool | hasNewlyConnectedOutputs (const RefPtr< ValuePool > &VP) const |
| Check if there are new connections. | |
| void | findNewlyConnectedOutputs (const RefPtr< ValuePool > &VP, VSlotSet &WhichOnes) const |
| Find all output parameters that have been recently connected since the last update() call. | |
| RefPtr< VSlot > | getOutput (const string &Name) const |
| Get the output slot for a given name. | |
| RefPtr< MemCore::StringList > | getOutputs (const type_info &what=typeid(void)) const |
| Get a list of all output names that are provided by this object. | |
| virtual int | iterateOutputs (VOutputIterator &VOut, const type_info &just_these=typeid(void)) const |
| Iterate over all the Outputs of this VObject, i.e. | |
| bool | registerOutput (const RefPtr< VParameter > &P, const string &AsName={}) |
| Register a certain parameter as being output by this VObject under the given name (optionally). | |
| bool | registerOutput (const RefPtr< VParameter > &P, const string &AsName, const type_info &MemberType, const string &UseMember) |
| Register a member of a parameter, that is output by this VObject, as being available to external VObjects. | |
| bool | registerOutput (const RefPtr< VParameter > &P, const type_info &MemberType, const string &UseMember) |
| Register a component of a parameter, using the default name of the parameter. | |
| int | getNumberOfInputs () const |
| Get the number of input parameters, ie. on how many parameters does this object depend on? | |
| int | getNumberOfOutputs () const |
| Get the number of output parameters, ie. how many parameters does this object provide? | |
| bool | hasChangedSlots (const MemCore::Intercube &IC, const RefPtr< ValuePool > &Context) const |
| Check if the given Intercube hosts any VSlots that have been changed relative to the given Context. | |
| template<typename... SlotList> | |
| auto | include_self (const std::tuple< SlotList... > &t) const -> decltype(std::tuple_cat(std::make_tuple(this), t)) |
| Given a tuple of values, create a new tuple that includes the object itself. | |
Public Member Functions inherited from Wizt::VStateCreatorBase | |
| RefPtr< State > & | getState (const WeakPtr< ValuePool > &VP) const |
| Retrieve a pointer to a state object for the given context. | |
| RefPtr< InterfaceBase > | hasLocalInterface (const type_info &InterfaceType) const |
| Check whether any of the local object states has an interface of the given type. | |
| RefPtr< State > | myState (const WeakPtr< ValuePool > &Context) const |
| Retrieve a state for the current context, possibly creating one. | |
| virtual RefPtr< State > | newState () const |
| create a new state object. Child classes might deliver child states. | |
| void | setState (const WeakPtr< ValuePool > &, const RefPtr< State > &st) const |
| Set a state object for a given context. | |
Public Member Functions inherited from Wizt::VSaveable | |
| void | addSaver (const string &, const RefPtr< VishSaver > &) |
| Add a save object that is associated with the certain text. | |
| template<class AppClass > | |
| void | addSavers (AppClass &A) |
| To add external savers a derived class call. | |
| bool | autosave () const |
| Save object using the last used saver. | |
| RefPtr< VishSaver > | getMostRecentSaver () const |
| Get the last saver that had been used for this object. | |
| size_t | getNumberOfSavers () const |
| Get the number of savers. | |
| RefPtr< VishSaver > | getSaver (const string &) const |
| Retrieve a saver functor that is associated to the certain text. | |
| RefPtr< VishSaver > | getSaverByExt (const string &ext) const |
| Retrieve a saver functor for the given file extension. | |
| int | iterate_savers (const save_iterator &si) const |
| Iterate over all savers associated with this object. | |
| VSaveable () | |
| Constructor, does nothing. | |
| ~VSaveable () | |
| Destructor, does nothing but automatic cleanup. | |
Public Member Functions inherited from Wizt::VManagedDomainObject< VObject > | |
| const type_info & | getDomainType () const override |
| Get the associated domain type. | |
| void | remove () |
| Remove the current object from the pool of objects. | |
| VManagedDomainObject (const string &name, int priority=DEFAULT_PRIORITY) | |
| Constructor, inserts the new object into the object pool of the respective domain under the given name with the assigned priority. | |
Public Member Functions inherited from Wizt::VManagedObject | |
| string | getLoadModule () const |
| Get the name of the module that was active when loading/creating this object. | |
| void | insert (const string &s, int priority=DEFAULT_PRIORITY) |
| Insert new objects into the object data base. | |
| void | remove () |
| Remove this object from the database. | |
| void | setPriority (int priority) |
| Set the priority level in the database list. | |
| VManagedObject (const string &name, int priority=DEFAULT_PRIORITY) | |
| Constructor. | |
| virtual | ~VManagedObject () |
| Virtual destructor. | |
Public Member Functions inherited from MemCore::Intercube | |
| void | addInterface (const RefPtr< InterfaceBase > &I) const |
| Add an interface class object. | |
| template<class Data > | |
| void | addInterfaceData (const Data &D) |
| Add data via an interface class object. | |
| template<class Data , typename TypeSelector > | |
| void | addInterfaceData (const Data &D) |
| Add data via an interface class object. | |
| void | clearInterfaces () |
| Remove all interfaces. | |
| bool | const_iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP) const |
| Constant iterator. | |
| virtual RefPtr< InterfaceBase > | createInterface (const type_info &) const |
| Virtual function which allows derived objects to create Interface objects on demand. | |
| RefPtr< InterfaceBase > | findInterface (const type_info &t) const |
| Find a certain interface of specified type. | |
| RefPtr< InterfaceBase > | getInterface (const type_info &t) |
| Retrieve an interface object from a certain type. | |
| std::string | getInterfaceNames (const char delim=';') const |
| Debug function retrieving all interfaces as human-readable string. | |
| template<class Data > | |
| bool | gotNewInterfaceData (const Data &D) |
| Check whether data on the given interface have changed, and if so, set new data as interface. | |
| template<class Data > | |
| bool | gotNewInterfaceData (mutex &M, const Data &D) |
| Check whether interface data have changed, if so, then set new interface data and return true. | |
| template<class Data , typename Selector > | |
| bool | gotNewInterfaceData (mutex &M, const Data &D) |
| Check whether interface data have changed, if so, then set new interface data and return true. | |
| template<class Data , typename Selector > | |
| bool | gotNewInterfaceData (mutex &M, const Data &D, const Selector &S) |
| Check whether interface data have changed, if so, then set new interface data and return true. | |
| template<class Data , typename Selector > | |
| bool | gotNewInterfaceData (mutex &M, const Data &D, const Selector *S) |
| Check whether interface data have changed, if so, then set new interface data and return true. | |
| template<class Data > | |
| bool | hasChangedInterfaceData (const Data &D) const |
| Check whether interface data have changed. | |
| template<class Data , typename Selector > | |
| bool | hasChangedInterfaceData (const Data &D) const |
| Check whether interface data have changed. | |
| template<class Data , typename Selector > | |
| bool | hasChangedInterfaceData (const Data &D, const Selector &) const |
| Check whether interface data have changed. | |
| template<class Data , typename Selector > | |
| bool | hasChangedInterfaceData (const Data &D, const Selector *) const |
| Check whether interface data have changed. | |
| bool | hasInterface (const type_info &t) const |
| Check if some Interface might exist. | |
| Intercube () | |
| Constructor. | |
| bool | iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP) |
| Modifyable iterator. | |
| void | printInterfaces () const |
| Debug function that prints the names of all interfaces. | |
| void | registerInterface (const type_info &t) |
| Register an interface type; when the interface is actually required, the virtual createInterface() function will be called. | |
| template<class InterfaceType > | |
| void | removeInterface () |
| Remove an interface. | |
| void | removeInterfaceBase (const type_info &InterfaceBaseID) |
| Remove an interface. | |
| virtual | ~Intercube () |
| Destructor. | |
Public Member Functions inherited from MemCore::MutableName | |
| void | addNameChangeNotifier (const WeakPtr< Notifier > &) |
| Add a new listener. | |
| std::string | BaseName (const char Separator) const |
| return the name of this item cropped anything after the Separator | |
| const std::string & | getName () const |
| The name of the object. | |
| MutableName (const std::string &theName) | |
| Construct from text. | |
| const std::string & | Name () const |
| The name of the object. | |
| void | rename (const std::string &newName) |
| rename, same as setName() | |
| void | setName (const std::string &newName) |
| Set a new name. | |
Public Member Functions inherited from Wizt::VScriptable | |
| RefPtr< VScriptFunctor > | findFunctor (const string &name) const |
| Find a functor. | |
| RefPtr< VScriptFunctor > | insertFunctor (const string &name, const RefPtr< VScriptFunctor > &) |
| Insert a function call, eventually replaces a former call. | |
| bool | iterate (iterator &it) |
| Iterate over all functors. | |
| int | nFunctors () const |
| How many functors are available? | |
| void | removeFunctor (const string &name) |
| Remove a functor. | |
Public Member Functions inherited from Wizt::VTraceRequestID | |
| bool | addRequest (const VRequest &request) |
| Returns false if there is already a request attached. | |
| bool | hasRequest (const VRequest &request) const |
| Check whether a request is just handled. | |
Static Public Attributes | |
| static constexpr char | NameSeparator = C0::RS |
| The control character used to separate entities of VObject when constructing object names from existing objects. | |
| static constexpr char | SlotNameSeparator = C0::US |
| The control character used to separate entities of VObject from slot names. | |
Static Public Attributes inherited from Wizt::VSlotContainer< ExpertLevel > | |
Static Public Attributes inherited from Wizt::VManagedObject | |
| static string | CurrentLoadModule |
| The name of the current shared library/DLL/plugin which provides the code of the currently loaded objects. | |
Procedures related to Event model and context-dependent | |
execution | |
| enum | HelpType { PlainText , HelpURL , HTMLText , ShortText , ShortHTMLText } |
| Parameter types for the help() function which may provide information about the current object. More... | |
| typedef bool(* | UpdateFunction) (VObject *, VRequest &, double precision) |
| Update function pointers which may be used to ensure being called base classes also when a derived class fully overloads the update() function itself. | |
| MemCore::Counter | UpdateCounter |
| A counter telling if this object is currently being updated. | |
| MemCore::Counter | RequestCounter |
| A counter telling if this object is currently being under a request. | |
| string | UserInfo |
| An arbitrary text that can be used to store any kind of context information about this object which may be helpful for instance in a graphical user interface. | |
| virtual bool | request (VRequest &, double precision, const WeakVObjectPtr &ImmediateRequestor, const WeakVObjectPtr &RootRequestor) |
| Request an action, to be performed with a certain precision. | |
| bool | schedule (double precision, const RefPtr< ValuePool > &Context=nullptr) |
| Schedule a request for this object for later processing. | |
| void | enableRequestProcessing () |
| Enable processing of requests. | |
| void | disableRequestProcessing () |
| Disable the processing of requests. | |
| bool | acceptsRequests () const |
| Check whether this object may process requests. | |
| const MemCore::Counter & | UpdateCount () const |
| A read-only counter telling if this object is currently being updated. | |
| const MemCore::Counter & | RequestCount () const |
| A read-only counter telling if this object is currently being under a request. | |
| VObject (const string &name, int p, const RefPtr< VCreationPreferences > &VP) | |
| Create a Vish Object. | |
| virtual const GimpIcon * | gimp_icon () const |
| If this object provides an icon in GIMP C source format, return it here. | |
| virtual const char *const * | xpm_icon () const |
| If this object provides an icon in XPM source format, return it here. | |
| virtual string | qt_icon () const |
| Supporting QT resource strings. | |
| virtual string | help (HelpType=HTMLText) const |
| Return a string, containing HTML or Richtext formatting suitable to be displayed in QT. | |
| bool | setObjectAsChild (const VObjectPtr &childVObject, const string &DependencySlotName) |
| Set a certain object as being a child of the current one. | |
| virtual | ~VObject () |
| Destructor. | |
| double | requestTime () const |
| Last computation time in seconds. | |
| void | remove () |
| remove this object from the object database | |
| const RefPtr< VCreationPreferences > & | CreationPreferences () const |
| Return the creation preferences. | |
| static bool | remove (const string &s) |
| remove an object of the given name from the object database | |
| virtual bool | update (VRequest &, double precision=1.0) |
| Virtual update function that implements some heavy action on the object. | |
| virtual bool | unsychronized_update (VRequest &VR, double precision) |
| Virtual function that is called without synchronization of the object mutex. | |
Functions related to input parameters | |
| using | VObjectIterator_f = std::function< bool(const RefPtr< VObject > &vobj, const VSlot &ChildConnection)> |
| Functor for iterateParents(). | |
| virtual std::string | type_key () const |
| Return a unique string representing the type represented by this VObject. | |
| void | iterateParents (VObjectIterator &VOI, int EL=0) const |
| Iterate over all the parent objects that drive this VObject. | |
| int | iterateParents (const VObjectIterator_f &VOI, int EL=0) const |
| Iterate over all the parent objects that drive this VObject. | |
Functions related to provided parameter functionality, | |
i.e. output objects. An VObject may serve as input parameter of another VObject; if so, the VObject serves as a VParameter of certain type. Even more, a VObject may incorporate multiple types, and even many types of the same kind which are distinguished by a textual description name. Use function iterateOutputs() to query information on which types are supported under which names. Function implements() is a simpler, limited but equivalent shortcut function. A certain parameter can be retrieved via the getImplementation() function. | |
| virtual string | CreateParameterName (const ParameterID &name) const |
| Creation of global parameter names. | |
| int | iterateChildren (ChildIterator &) const |
| Find all children connected from the current object. | |
| template<class Lambda > | |
| int | findChildren (const Lambda &theLambda) const |
| std::list< std::vector< std::string > > | getProvenance () const |
| Parse the object name string into provenance information, i.e. | |
| AttachErrorCode | attachNewObject (const RefPtr< VSlot > &slot, const string &name, const Intercube &CreationContext, const RefPtr< VCreationPreferences > &VCP=nullptr) |
| Create a new object with the type of the specified slot, whatever that is, but using the creation preferences. | |
| AttachErrorCode | attachNewObject (const RefPtr< VSlot > &slot, const string &name, const RefPtr< VCreationPreferences > &VCP=nullptr) |
| Create a new object with the type of the specified slot, whatever that is, but using the creation preferences. | |
| AttachErrorCode | attachInputObject (const RefPtr< VSlot > &slot, const string &name={}, const RefPtr< VCreationPreferences > &VCP=nullptr, bool ReallyUnique=true) |
| For the given input slot, connect it to an existing VObject providing this type as output, or create a new one under the given name if there is none found yet. | |
| CreateConnectionResult_t | createChild (const VAcception &VA, const Intercube &CreationContext) |
| Based on the accept information provided by some Object creator, create a VObject that accepts the current object as an input object. | |
| CreateConnectionResult_t | connectChild (const VObjectPtr &ChildObject, const RefPtr< VAcceptInfo > &VA) |
| Connect an existing object as a child to the current object. | |
| CreateConnectionResult_t | connectAsChild (const VObjectPtr &ChildObject, const VAcception &VA) |
| Note: Calls the setup() functions. | |
| virtual void | InputCreation (const RefPtr< VParameter > &CurrentObjectsInput, const VObjectPtr &NewlyCreatedObject, const RefPtr< VParameter > &TheNewObjectsOutputParameter) |
| Virtual callback function, as invoked from createInput() . | |
| VObjectPtr | createInput (const WeakPtrVCreatorBase &VCrec, const RefPtr< VSlot > &what, const string &name, Intercube &CreationContext) |
| Given a certain VCreatorBase that is supposed to fit to a given slot, create an object that serves as input to this one. | |
| VObjectPtr | extractSlot (const RefPtr< VSlot > &theSlot, const string &theNewName=string()) const |
| Given a slot of this VObject create a new VObject from it that provides just this slot and serves as input to the current VObject. | |
| static int | findOutputObjects (const type_info &Type, OutputObjectIterator &GOutputs) |
| Find all objects that implement a certain output type. | |
| static string | createChildname (const string &parent_name) |
| A static function that is used to create an object's name of this type, when it is created from some parent object. | |
| static VAcceptInfoList_t | accept (const VObjectPtr &vobj) |
| A static function used by the associated creator to determine whether an object of this type may use an given object as input parameter. | |
| static RefPtr< VParameter > | findUniqueOutputObject (const type_info &Type, const RefPtr< VCreationPreferences > &VCP, bool ReallyUnique, const VObject *NotThisOne) |
| Find an existing VObject that implements the specified type, returning exactly that parameter which implements this type. | |
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={}) |
| Attach a given parameter to a slot of the current object. | |
| static bool | attachSlot (const WeakPtr< VSlot > &DestSlot, const RefPtr< VSlot > &SourceSlot, const string &Member={}) |
| Attach the source slot's parameter to the destination slot's parameter, overwriting the destination slot's par. | |
| static bool | detachSlot (const RefPtr< VSlot > &SourceSlot) |
| Detach the source slot's parameter by assigning a copy of the parameter to itself. | |
Static Public Member Functions inherited from Wizt::VSlotContainer< ExpertLevel > | |
| static const char * | AttachErrorCodeMessage (AttachErrorCode) |
| Given an error code from one of the attach() functions, return some textual description. | |
| static bool | attachParameter (const RefPtr< VParameter > &theProvidedParam, const WeakPtr< VSlot > &theDestSlot, const string &theMember={}) |
| This function basically does: | |
Static Public Member Functions inherited from Wizt::ValueCacheable | |
| static ValueCache & | consider (MemCore::Intercube &IC, const WeakPtr< VSlot > &VS, const RefPtr< ValuePool > &Context) |
| static ValueCache & | getValueCache (MemCore::Intercube &IC) |
| Get, and possibly create, a ValueCache that will be stored at the given Intercube. | |
| static bool | hasChangedSlots (const WeakPtrToVSlotContainer &theSlotOwner, const MemCore::Intercube &IC, const RefPtr< ValuePool > &Context) |
| Check if the given Intercube hosts any VSlots that have been changed relative to the given Context. | |
Static Public Member Functions inherited from Wizt::VSaveable | |
| static VSaveable & | GlobalState () |
| A global saveable object that is supposed to take care of the entire VISH state. | |
Static Public Member Functions inherited from Wizt::VManagedDomainObject< VObject > | |
| static RefPtr< VManagedObject > | find (const string &s) |
| Find an object with a certain name. | |
| static int | iterate (VManagedObjectIterator_t VIt, int p_start=INT_MIN, int p_end=INT_MAX) |
| Iterate through all objects within a given priority range. | |
| static bool | remove (const std::string &s) |
| Remove an compatible object given its name. | |
| static int | size () |
| Tell us how many object of this domain exist. | |
| static int | traverse (VManagedObjectIterator &VIt, int p_start=INT_MIN, int p_end=INT_MAX) |
| Iterate through all objects within a given priority range. | |
Static Public Member Functions inherited from Wizt::VManagedObject | |
| static int | count () |
| How many objects reside in the domain database at all? | |
| static VManagedObjectPtr | find (const type_info &, const std::string &s) |
| Find a certain managed object by its name. | |
| static bool | InitDomain (const type_info &) |
| An initialization function. | |
| static int | iterateModules (ModuleIterator &VIM) |
| Iterate over all modules which have put objects into the object database so far. | |
| static int | size (const type_info &) |
| How many objects reside in the domain database for a certain type? | |
| static int | traverse (const type_info &, VManagedObjectIterator &VIt, int p_start, int p_end) |
| Iterate through a domain for certain levels. | |
| static void | UnloadVModule (const string &what, VRemoveItem &RI) |
| Unload a certain module. | |
Static Public Member Functions inherited from MemCore::MutableName | |
| static std::string | BaseName (const std::string &theName, const char Separator) |
| return the name of this item cropped anything after the Separator | |
Protected Member Functions inherited from MemCore::ReferenceBase< VManagedObjectBase > | |
| virtual void | extremeUnction () |
| A virtual function that will be called just before the object is destroyed. | |
| ReferenceBase & | operator= (const ReferenceBase &R) |
| Protected assignment operator (should not be called). | |
| void | suicide () |
| Delete this. | |
| virtual | ~ReferenceBase () |
| Virtual destructor. | |
Protected Member Functions inherited from Wizt::VSlotContainer< ExpertLevel > | |
| virtual void | setup (const CreationSlots_t &CreationSlots) |
| When a VObject is created as a child of an existing VObject, this variant of the setup function is called, telling which slot is the one connected to the object that triggered creation of this one. | |
Related Symbols inherited from Wizt::VSlotContainer< ExpertLevel > | |
| bool | CheckIfThereExistNewerOutputs (const VRequest &request, bool AdjustObjectAge) const |
| Check if there are outputs in this very object that are newer (more recent) than this object itself. | |
Generic base class for all VObjects.
The relationships among VObjects, VRenderObjects and VInputs are as follows:
Use VObject::iterateInputs(VCreatorIterator&) to iterate through all VObject's.
Input parameters are ordered in a hierarchy of two levels. These two levels are parameterized by an integer (called the "expert level") and a textual description.
Each VObject may define a set of possible input types, which are types that are provided by some other objects to be used as inputs of this object.
The default is void, meaning this object will not require any input types, thus being a data source.
Multiple types may be defined by creating a type list via META::LIST, for instance:
This input type will allow to use int's and float's .
Update function pointers which may be used to ensure being called base classes also when a derived class fully overloads the update() function itself.
If any of these functions returns false then the entire update process will be terminated.
Parameter types for the help() function which may provide information about the current object.
| Wizt::VObject::VObject | ( | const string & | name, |
| int | p, | ||
| const RefPtr< VCreationPreferences > & | VP | ||
| ) |
Create a Vish Object.
After creation, the initialize() function is called if deferred initialization of the Object is requested.
| name | The intended name of this object; note that the assigned name might differ. |
References Wizt::VScriptable::insertFunctor(), and MemCore::ReferenceBase< VManagedObjectBase >::self().
|
static |
| VObject::AttachErrorCode Wizt::VObject::attachInputObject | ( | const RefPtr< VSlot > & | slot, |
| const string & | name = {}, |
||
| const RefPtr< VCreationPreferences > & | VCP = nullptr, |
||
| bool | ReallyUnique = true |
||
| ) |
For the given input slot, connect it to an existing VObject providing this type as output, or create a new one under the given name if there is none found yet.
This function may be called from a setup function in a VObject's constructor like this:
References Wizt::VConnectable::attach(), attachNewObject(), and findUniqueOutputObject().
| VObject::AttachErrorCode Wizt::VObject::attachNewObject | ( | const RefPtr< VSlot > & | slot, |
| const string & | name, | ||
| const Intercube & | CreationContext, | ||
| const RefPtr< VCreationPreferences > & | VCP = nullptr |
||
| ) |
Create a new object with the type of the specified slot, whatever that is, but using the creation preferences.
| CreationContext | context information for this call. |
References Wizt::VConnectable::attach(), Wizt::VSlotContainer< ExpertLevel >::DestParameterNotFound, Wizt::findBestVInputCreator(), and Wizt::VSlotContainer< ExpertLevel >::InvalidDestParameter.
Referenced by attachInputObject(), Wizt::Brush::connectBrushAsInput(), Wizt::MovieRecorder::MovieRecorder(), and Wizt::Viewer::Viewer().
|
inline |
Create a new object with the type of the specified slot, whatever that is, but using the creation preferences.
The CreationContext implicitly is this object itself.
| VObject::CreateConnectionResult_t Wizt::VObject::connectChild | ( | const VObjectPtr & | ChildObject, |
| const RefPtr< VAcceptInfo > & | VA | ||
| ) |
Connect an existing object as a child to the current object.
The current object will become its parent, and changes in this parent objects will trigger an update in the child object. The parent object is the source of the data flow, the child object the destination of the data.
Note: Calls the setup() functions.
This object is seeking a connection to an interface Thus, need to find an input slot in the new object that is suitable to accept such an interface.
References Wizt::VSlotContainer< ExpertLevel >::getImplementation(), MemCore::MutableName::Name(), MemCore::ReferenceBase< VManagedObjectBase >::self(), setObjectAsChild(), and Wizt::VActionNotifier::Warning().
Referenced by connectAsChild().
| VObject::CreateConnectionResult_t Wizt::VObject::createChild | ( | const VAcception & | VA, |
| const Intercube & | CreationContext | ||
| ) |
Based on the accept information provided by some Object creator, create a VObject that accepts the current object as an input object.
| CreationContext | some information of the circumstance of this creation. |
Note: Calls the setup() functions.
References connectAsChild(), MemCore::MutableName::Name(), and MemCore::ReferenceBase< VManagedObjectBase >::self().
|
static |
A static function that is used to create an object's name of this type, when it is created from some parent object.
This function may be redefined in some child class. A VCreator instantiated over this child class will then call the derived function. By default, the name of a new child is the name of its VCreator, unrelated to the parent's name.
| RefPtr< VObject > Wizt::VObject::createInput | ( | const WeakPtrVCreatorBase & | VCrec, |
| const RefPtr< VSlot > & | what, | ||
| const string & | name, | ||
| Intercube & | CreationContext | ||
| ) |
Given a certain VCreatorBase that is supposed to fit to a given slot, create an object that serves as input to this one.
The virtual function InputCreation() is called to adjust any possible connections.
| CreationContext | An Intercube that allows specifying additional parameters for the circumstances of creation. It is passed to the VActionNotifier::VObjectCreation() call. |
References Wizt::VConnectable::attach(), InputCreation(), MemCore::MutableName::Name(), MemCore::ReferenceBase< VManagedObjectBase >::self(), and Wizt::VActionNotifier::Warning().
|
virtual |
Creation of global parameter names.
By default the new parameter identifier will be the concatenation of this object's name, a dot, and the given parameter name. This follows the convention of class members in most programming languages. However, this is not mandatory at all.
References MemCore::MutableName::Name().
| void Wizt::VObject::enableRequestProcessing | ( | ) |
Enable processing of requests.
Call if once the object has been fully constructed. The VCreator<> template does this automatically.
Find all children of the current object and its connections via
a lambda function (or functor). Use code such as the following:
|
inline |
Parse the object name string into provenance information, i.e.
who created this object, IF that information is encoded in the object name following the standard conventions.
If this object provides an icon in GIMP C source format, return it here.
If none found, then xpm_icon is tried.
|
virtual |
Request an action, to be performed with a certain precision.
Its main purpose is to iterate all parameters and forward the request to them. If this all parameters have fullfilled their request(), then the virtual update() function is called.
In rare case, an object might want to overload this function, for instance when request shall be forwarded to input objects only under certain circumstances (e.g. an Viewer object that is not visible at the moment).
| VRequest::Incomplete | might occur if a synchroneous request is issued but some operations are still in asynchroneous construction. This is the case when a synchroneous request is issued after an asynchroneous one that has not yet been completed. In such a case, the caller may just repeat the same request. The caller may and should do something else in the meantime, as the async request may still take a while to finish. |
Check the age of the local state
Some parameter has changed, so call object's update().
Reimplemented in Wizt::RemoteVish.
References Wizt::VTraceRequestID::addRequest(), Wizt::VSlotContainer< ExpertLevel >::age(), Wizt::VSlotContainer< ExpertLevel >::CheckIfThereExistNewerOutputs(), Wizt::VSlotContainer< ExpertLevel >::ConnectionAge(), Wizt::VSlotContainer< ExpertLevel >::getNumberOfOutputs(), Wizt::VSlotContainer< ExpertLevel >::getNumberOfParameters(), MemCore::ReferenceBase< VManagedObjectBase >::getObjectCountID(), Wizt::VStateCreatorBase::getState(), Wizt::VTraceRequestID::hasRequest(), Wizt::VSlotContainer< ExpertLevel >::iterateParameters(), MemCore::MutableName::Name(), request(), RequestCounter, MemCore::ReferenceBase< VManagedObjectBase >::self(), MemCore::Ageable::update(), update(), and UpdateCounter.
Referenced by request(), and Wizt::RemoteVish::request().
|
inline |
A read-only counter telling if this object is currently being under a request.
This might be the case in a reentrant or multithreading situation.
Schedule a request for this object for later processing.
The actual request may be issued at a later time, and possibly in another thread.
| precision | Indicate what effort shall be undertaken for processing this requestion. A value of 1.0 tells that we want full quality, may it be as slow as whatever it takes. A value of 0.0 means just do the absolute minimum, but return as quickly as possible. Values outside the range 0.0 to 1.0 are undefined. |
| Context | Give an optional context relative to which the request shall be executed. This will most likely always be the case. |
References Wizt::VScheduler::schedule(), and MemCore::ReferenceBase< VManagedObjectBase >::self().
| bool Wizt::VObject::setObjectAsChild | ( | const VObjectPtr & | childVObject, |
| const string & | DependencySlotName | ||
| ) |
Set a certain object as being a child of the current one.
This creates a new internal parameter that is exported by the current object as output, and used as input by the child object. This functionality allows to set up a dependency relationship among those objects. It is called by createChild(), but would not necessarily exist automatically because createChild() connects existing parameters. If the parent object shares a parameter with another objects, then the child object would have a relationship to that one, not to the parent object. This one would then be bypassed in the execution pipeline. To fix this, this function explicitely creates such a relation.
At the moment, such an explicit parent dependency is unique. Adding more explicit ones may be considered, as well as means to change and break an existing parent/child relationship (which can be done already via explicit access to the object slots).
| DependencySlotName | The name under which the dependency slot shall occur |
References Wizt::VSlotContainer< ExpertLevel >::addParameter(), MemCore::MutableName::Name(), Wizt::VSlotContainer< ExpertLevel >::registerOutput(), and MemCore::ReferenceBase< VManagedObjectBase >::self().
Referenced by connectChild().
|
virtual |
Return a unique string representing the type represented by this VObject.
By default, this will be the type of this object itself, but a derived class can implement a different method for objects that are merely containers to other types.
Virtual function that is called without synchronization of the object mutex.
This function must perform all synchronization itself if required:
which is required for all writing operation. As such, this function may get a bunch of data, process it, and only perform the synchronization once the data is ready to be stored.
Virtual update function that implements some heavy action on the object.
Update function.
It is called only if any input object is newer than the current object. It must return true on successful completion. However, the object may touch() itself in the update() routine. Then, it will get a newer time than all input objects, which will trigger all dependent objects as well.
Reimplemented in WebFileRenderer, Wizt::VChartSelector, Wizt::WebVish, Wizt::BaseCursor3D, Wizt::CatchStatus, Wizt::ShaderLightSource, Wizt::DeferredRenderObject, Wizt::MSDeferredObjectDisplay, Wizt::VStereoLens, Wizt::VLensBase, Wizt::CrossSectionCam, Wizt::VScene, Wizt::VCameraBase, Wizt::RemoteViewer, Wizt::RemoteVish, Wizt::VProxyObject, and FloatsToPoint2D.
Referenced by request().
|
inline |
A read-only counter telling if this object is currently being updated.
This might be the case in a reentrant or multithreading situation.
|
related |
Find an existing VObject that implements the specified type, returning exactly that parameter which implements this type.
A result is only given if the query is unique. If there are more implementations of the same type, an invalid pointer is returned.
References findOutputObjects().
Referenced by attachInputObject(), Wizt::VConnectable::attachUniqueObject(), and Wizt::Brush::connectBrushAsInput().
|
related |
Iterate over all the parent objects that drive this VObject.
Note that any inputs, which are not associated with a VObject, are invisible here! ()
References Wizt::VSlot::getParameter(), Wizt::VSlot::getSource(), and Wizt::VSlotContainer< ExpertLevel >::iterateParameters().
|
related |
Iterate over all the parent objects that drive this VObject.
Note that any inputs, which are not associated with a VObject, are invisible here! ()
References Wizt::VSlotContainer< ExpertLevel >::iterateParameters().
Referenced by Wizt::MetaViewer::getRenderer(), and Wizt::VScene::update().
|
protected |
|
protected |
| string Wizt::VObject::UserInfo |
An arbitrary text that can be used to store any kind of context information about this object which may be helpful for instance in a graphical user interface.
This text may change in each application domain, so it is not object-specific, but will depend on the context where and how this object is used.