|
The Vish Visualization Shell 0.3
Vish
|
Given some VObject, this is the accompanying Creator object that may be used to create VObject's on request. More...
#include <ocean/plankton/VCreator.hpp>
Public Member Functions | |
| VAcceptInfoList_t | accept (const RefPtr< VObject > &vobj) const override |
| Implementation of the acception function. | |
| RefPtr< VObject > | create (const VCreatorBase::CreationInfo &name, const Intercube &CreationContext, const RefPtr< VCreationPreferences > &AdditionalPreferences) const override |
| Actually create the associated VObject on request from the base class. | |
| string | createChildname (const string &parent_name) const override |
| Implementation of the child name creation functionality. | |
| VCreator (const VCreatorProperties &CreatorProperties, int quality, const RefPtr< VCreationPreferences > &prop=nullptr, const char *const CreatorReleaseIdentifier=VISH_CREATOR_RELEASE_IDENTIFIER) | |
| Construct a creator object with full properties specified. | |
| template<unsigned ID> | |
| VCreator (const VCreatorProperty< ID > &CreatorProperties, int quality, const RefPtr< VCreationPreferences > &prop=nullptr, const char *const ReleaseIdentifier=VISH_CREATOR_RELEASE_IDENTIFIER) | |
| Construct a creator object with full properties specified. | |
Public Member Functions inherited from Wizt::VCreatorBase | |
| RefPtr< VObject > | create (const string &name={}, const RefPtr< VCreationPreferences > &AdditionalPreferences=nullptr) const |
| Convenience function to create objects using default parameters. | |
| const VCreatorProperties & | getProperties () const |
| Get the properties (various textual descriptions) for this creator. | |
Public Member Functions inherited from Wizt::VInputCreatorBase | |
| RefPtr< VCreationPreferences > | CreationPreferences (const RefPtr< VCreationPreferences > &AdditionalPreferences=nullptr) const |
| Associated creation preferences. | |
| VInputCreatorBase (const string &name, int prior, const RefPtr< VCreationPreferences > &prop, const char *vish_creator_release_identifier) | |
| Constructor. | |
Public Member Functions inherited from Wizt::VManagedDomainObject< VInputCreatorBase > | |
| 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 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 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::VCreatorProperties | |
| VCreatorProperties (const string &keyname, const string &Description="", const string &Operatorname="") | |
| Creator with key, description and operator (deprecated) | |
| template<unsigned ID> | |
| VCreatorProperties (const VCreatorProperty< ID > &VP) | |
| Creator with arbitrary set of properties (prefrable!) | |
| ~VCreatorProperties () | |
| destructor | |
Public Member Functions inherited from Wizt::VCreatorProperty< UINT_MAX > | |
| VCreatorProperty () | |
| Empty constructor. | |
| VCreatorProperty (const string &name) | |
| Construct from a single string and assign to ID entry. | |
| VCreatorProperty (const VCreatorProperty< ID1 > &l, const VCreatorProperty< ID2 > &r) | |
| Merge two property sets. | |
| VCreatorProperty (const VCreatorProperty< ID1 > &vp) | |
| Construct from another indexed set. | |
Public Member Functions inherited from Wizt::VCreatorPropertyBase | |
| string & | Application () |
| Application domain. | |
| const string & | Application () const |
| Application domain. | |
| string & | Arguments () |
| Textual description of acceptable arguments, see POLYMORPHY. | |
| const string & | Arguments () const |
| Textual description of acceptable arguments, see POLYMORPHY. | |
| void | assign (const VCreatorPropertyBase &l) |
| Assignment - copy only those strings that are non-empty, otherwise status quo is kept. | |
| string | Author () const |
| authorship information, looked up from authors.txt | |
| string & | AuthorKey () |
| authorship information | |
| const string & | AuthorKey () const |
| author key | |
| string & | Category () |
| Group of creators. | |
| const string & | Category () const |
| Group of creators. | |
| string & | Description () |
| Descriptive name, UTF8 characters allowed. | |
| const string & | Description () const |
| Descriptive name, UTF8 characters allowed. | |
| string & | helpurl () |
| relative URL for integrated help for this creator | |
| const string & | helpurl () const |
| relative URL for integrated help for this creator | |
| string & | Identifier () |
| Identifier within this group. | |
| const string & | Identifier () const |
| Identifier within this group. | |
| string | keyname (const char separator[]="/") const |
| globally unique name | |
| std::string & | operator() (unsigned i) |
| Retrieve property i, writeable. | |
| const string & | operator() (unsigned i) const |
| Retrieve property i, readonly. | |
| string & | OperatorName () |
| Ideally a single UTF8 character, for operators. | |
| const string & | OperatorName () const |
| Ideally a single UTF8 character, for operators. | |
| string & | shorthelp () |
| short help string, for tooltip descriptions | |
| const string & | shorthelp () const |
| short help string, for tooltip descriptions | |
| string & | SourceFile () |
| Source code file. | |
| const string & | SourceFile () const |
| Source code file. | |
| string & | url () |
| Weburl for further info about this object. | |
| const string & | url () const |
| Weburl for further info about this object. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<unsigned ID1, unsigned ID2> | |
| VCreatorProperty< ID1+ID2 > | operator+ (const VCreatorProperty< ID1 > &l, const VCreatorProperty< ID2 > &r) |
| Merge two properties via the + operator. | |
| template<unsigned ID1, unsigned ID2> | |
| VCreatorProperty< ID1+ID2 > | operator/ (const VCreatorProperty< ID1 > &l, const VCreatorProperty< ID2 > &r) |
| Merge two properties via the / operator, same as using the + operator (just another syntax). | |
Additional Inherited Members | |
Public Types inherited from Wizt::VManagedDomainObject< VInputCreatorBase > | |
| typedef VInputCreatorBase | Domain_t |
| The domain type of this managed object. | |
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::VCreatorPropertyElements | |
| enum | { CATEGORY , TEXTIDENTIFIER , POLYMORPHY , DESCRIPTION , OPERATORNAME , OPERATORFONT , SHORTHELP , AUTHOR , HELPURL , URL , APPLICATION , APPLICATION_DOMAIN = APPLICATION , SOURCE_FILE , COMPILATION_DATE , RESERVED_1 , RESERVED_2 , RESERVED_3 , RESERVED_4 , MAX_PROPERTY , APPLICATION_SEPARATOR = ';' } |
Static Public Member Functions inherited from Wizt::VCreatorBase | |
| static int | iterateIdentifiers (const string &Identifier, IdentifierIterator &It) |
| Iterate over all identifiers across multiple categories. | |
Static Public Member Functions inherited from Wizt::VManagedDomainObject< VInputCreatorBase > | |
| 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 | |
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. | |
Protected Types inherited from Wizt::VCreatorPropertyBase | |
| enum | { NumberOfProperties = VCreatorPropertyElements::MAX_PROPERTY } |
Protected Member Functions inherited from Wizt::VCreatorBase | |
| void | deleteAllInstances (const type_info &DerivedType) const |
| To be called by the derived destructor. | |
| VCreatorBase (const string &CreatorKeyName, int priority, const RefPtr< VCreationPreferences > &prop, bool isStatic, const char *const vish_creator_release_identifier) | |
| Constructor a VCreator from a key name. | |
| VCreatorBase (const VCreatorProperties &CreatorProperties, int priority, const RefPtr< VCreationPreferences > &prop, bool isStatic, const char *const vish_creator_release_identifier) | |
| Construct a VCreator from given creation properties. | |
| ~VCreatorBase () | |
| Destructor. | |
Protected Member Functions inherited from Wizt::VInputCreatorBase | |
| ~VInputCreatorBase () | |
| Destructor. | |
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 Attributes inherited from Wizt::VCreatorPropertyBase | |
| std::string | txt [NumberOfProperties] |
| A textual description for each property. | |
Given some VObject, this is the accompanying Creator object that may be used to create VObject's on request.
The VObject must provide a constructor taking the new object's name and its priority number, which is forwarded from the creator's priority.
VCreator objects come with a property that tells whether the object it might create is suitable as output for a certain, existing VObject. A such, the existing VObject is to be checked for its properties to see if this VCreator is suitable for bearing a child object. This check is done through the virtual accept() member function. A specific VCreator may always overload this function to implement any operation.
The default VCreator utilizes a list of properties managed through the AcceptListIterator<> template. This one allows to specify a list of types. If any of these types is managed in the existing VObject, then the accept() function will return true. It is an OR of all properties.
The AcceptListIterator may also be used to implement operations on user defined types. For this, it needs to be specialized for a certain type and implement an accept() function such as in this following code snippet:
The accept() function may of course be arbitrarily complex. By default, there are accept list iterators implemented for native types (which are provided via output parameters of VObjects), and interfaces, that are attached to VObjects.
|
inline |
Construct a creator object with full properties specified.
| CreatorProperties | The properties of this creator, it is recommendable to make use of namespace Panthalassia or ProtoOcean. |
| quality | The object's matureness, according to ObjectQuality |
References Wizt::VCreatorPropertyBase::keyname(), and Wizt::Vprintf().
|
inline |
Construct a creator object with full properties specified.
| CreatorProperties | The properties of this creator, it is recommendable to make use of namespace Panthalassia or ProtoOcean. |
| quality | The object's matureness, according to ObjectQuality |
Allows to create objects via Panthalassia syntax:
References Wizt::VCreatorBase::getProperties(), Wizt::VCreatorPropertyBase::keyname(), and Wizt::Vprintf().
|
inlineoverridevirtual |
Implementation of the acception function.
Calls the static accept() function of the DerivedVObject.
Implements Wizt::VCreatorBase.
|
inlineoverridevirtual |
Actually create the associated VObject on request from the base class.
| CreationContext | An Intercube that allows specifying additional parameters for the circumstances of creation. It is passed to the VActionNotifier::VObjectCreation() call. |
Implements Wizt::VCreatorBase.
References Wizt::VInputCreatorBase::CreationPreferences(), MemCore::MutableName::Name(), MemCore::ReferenceBase< VManagedObjectBase >::self(), Wizt::VActionNotifier::VObjectCreation(), and Wizt::Vprintf().
|
inlineoverridevirtual |
Implementation of the child name creation functionality.
By default, calls a static member function of the derived object on which this VCreator is instantiated.
Reimplemented from Wizt::VCreatorBase.