The Vish Visualization Shell 0.3
Vish
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Wizt::VNutrition Class Referenceabstract

Base class for objects that provide data processing on a file basis, such as converting file formats. More...

#include <ocean/plankton/VNutrition.hpp>

Inheritance diagram for Wizt::VNutrition:
Wizt::VSlotContainer< ExpertLevel > Wizt::VManagedDomainObject< VNutrition > Wizt::VManagedObjectBase Wizt::VConnectionValidatorList Wizt::ValueCacheable Wizt::VManagedObject MemCore::ReferenceBase< VManagedObjectBase > Wizt::VManagedObjectBase MemCore::Intercube MemCore::MutableName MemCore::ReferenceBase< VManagedObjectBase > Wizt::AnemoneNutrition

Classes

struct  OutputScript
 

Public Types

using analysis_return_t = std::tuple< html, std::string >
 Return type for the analysis function:
 
using fileid = string
 Alias for the type used for file names.
 
using FileList_t = std::set< fileid >
 A list of unique file identifiers.
 
using Genres_t = std::set< string >
 The type of how to store genres (ordered set, for comparison and alphabetical listing).
 
using html = string
 Alias name for strings to indicate the text stored here may contain HTML.
 
using NutritionIterator = std::function< void(const WeakPtr< VNutrition > &)>
 Callback functor for iterating over Nutrition objects.
 
- 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 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::VManagedDomainObject< VNutrition >
typedef VNutrition Domain_t
 The domain type of this managed object.
 

Public Member Functions

virtual analysis_return_t analyse (const FileList_t &)=0
 Any information that requires a somewhat slower in-depth analysis, such as by opening the files to check their actual content.
 
int computeExpectedOutput (FileList_t &OutputFiles, const string &OutputPath, const FileList_t &InputFiles, const string &NewExtension) const
 A convenience function to compute expected output for each file based on a specified new file extension.
 
virtual html digest (FileList_t &OutputFiles, const string &OutputPath, const std::function< string(const string &)> &OutputFileModifier, const FileList_t &theInputFiles, const MemCore::RefPtr< MemCore::LoaderProgress > &theProgress, map< string, string > &ActualFilenames)
 Central function performing the file conversion.
 
virtual bool digestible (const fileid &) const
 A sanity check function to determine whether a certain file can be handled by this importer.
 
virtual int expectedOutput (FileList_t &OutputFiles, const string &OutputPath, const FileList_t &InputFiles) const =0
 Estimated output files that would be produced from the given input files.
 
unsigned getExtensions (const std::function< void(const string &)> &callback) const
 Iterate over all the extensions that have been registered for this Nutrition object.
 
virtual html quickinfo (const FileList_t &) const
 Any information that can be provided quickly, such as by looking at the file names only.
 
void registerViaExtension (const string &ext) const
 Register this VNutrition object for a certain file name extension.
 
 VNutrition (const string &Name, const string &Description, const MemCore::StringList &exts, const RefPtr< VCreationPreferences > &CreationPreferences=nullptr)
 Constructor.
 
 VNutrition (const string &Name, const string &Description, const RefPtr< VCreationPreferences > &CreationPreferences=nullptr)
 Provide a short, simple name for this nutrition.
 
 VNutrition (const string &Name, const string &Description, const std::initializer_list< string > &exts, const RefPtr< VCreationPreferences > &CreationPreferences=nullptr)
 Constructor.
 
 VNutrition (const string &Name, const string &Description, const string &ext, const RefPtr< VCreationPreferences > &CreationPreferences=nullptr)
 Constructor.
 
- Public Member Functions inherited from Wizt::VSlotContainer< ExpertLevel >
Ageableage (const RefPtr< ValuePool > &VP)
 Return the age of this object, which may be modified.
 
const Ageableage (const RefPtr< ValuePool > &VP) const
 Return the age of this object in read-only form.
 
const AgeableConnectionAge () 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< VSlotaddParameter (const ParameterID &name, int EL, const RefPtr< VParameter > &param, 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< VParametergetParameter (const ParameterID &s) const
 Return the local input parameter slot for a certain parameter name.
 
RefPtr< VSlotgetSlot (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< VSlotfindSlot (const RefPtr< VParameter > &param) const
 Given a parameter, find a slot that refers to this one.
 
string getSlotName (const RefPtr< VParameter > &param) 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< VParametermkUniqueParameterInput (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< VSlotaddParam (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 &param, 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< VSlotaddFloatParam (double init, const ParameterID &param, 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< VSlotgetUniqueInputSlot (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< VParametergetImplementation (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< VSlotgetImplementationSlot (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< VSlotfindOutputSlot (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< VSlotgetOutput (const string &Name) const
 Get the output slot for a given name.
 
RefPtr< MemCore::StringListgetOutputs (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::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::VManagedDomainObject< VNutrition >
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< InterfaceBasecreateInterface (const type_info &) const
 Virtual function which allows derived objects to create Interface objects on demand.
 
RefPtr< InterfaceBasefindInterface (const type_info &t) const
 Find a certain interface of specified type.
 
RefPtr< InterfaceBasegetInterface (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.
 

Static Public Member Functions

static unsigned iterate (const std::function< void(const string &ext, const WeakPtr< VNutrition > &)> &)
 Iterate over all available Nutrition objects.
 
static unsigned iterate (const string &ext, const NutritionIterator &NI)
 Iterate over all Nutrition objects that have been registered for a given extension.
 
- Static Public Member Functions inherited from Wizt::VSlotContainer< ExpertLevel >
static const charAttachErrorCodeMessage (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 ValueCacheconsider (MemCore::Intercube &IC, const WeakPtr< VSlot > &VS, const RefPtr< ValuePool > &Context)
 
static ValueCachegetValueCache (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::VManagedDomainObject< VNutrition >
static RefPtr< VManagedObjectfind (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
 

Public Attributes

const string Description
 A somewhat detailed description of what this VNutrition object is doing, up to a half a page.
 
Genres_t Genres
 Optionally possible genres where this converter may fit in; multiple genres are allowed.
 
FileList_t OutputExtensions
 An (optional) list of output extensions, used for easier selection of a particular nutrition.
 

Additional Inherited Members

- 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.
 
- 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.
 
- Protected Member Functions inherited from MemCore::ReferenceBase< VManagedObjectBase >
virtual void extremeUnction ()
 A virtual function that will be called just before the object is destroyed.
 
ReferenceBaseoperator= (const ReferenceBase &R)
 Protected assignment operator (should not be called).
 
void suicide ()
 Delete this.
 
virtual ~ReferenceBase ()
 Virtual destructor.
 

Detailed Description

Base class for objects that provide data processing on a file basis, such as converting file formats.


Class Documentation

◆ Wizt::VNutrition::OutputScript

struct Wizt::VNutrition::OutputScript

Member Typedef Documentation

◆ analysis_return_t

using Wizt::VNutrition::analysis_return_t = std::tuple<html, std::string>

Return type for the analysis function:

  1. Some HTML with a decently short description
  2. A possibly longer text that contains more details.

◆ FileList_t

A list of unique file identifiers.

This is an ordered set such that comparisons of file lists can be performed easily. With an unordered_set that becomes effortsome.

Constructor & Destructor Documentation

◆ VNutrition() [1/3]

Wizt::VNutrition::VNutrition ( const string &  Name,
const string &  Description,
const string &  ext,
const RefPtr< VCreationPreferences > &  CreationPreferences = nullptr 
)
inline

Constructor.

Parameters
NameA descriptive, unique name for this importer that fits into one line to be used in a combo box selection. May contain spaces.

◆ VNutrition() [2/3]

Wizt::VNutrition::VNutrition ( const string &  Name,
const string &  Description,
const std::initializer_list< string > &  exts,
const RefPtr< VCreationPreferences > &  CreationPreferences = nullptr 
)
inline

Constructor.

Parameters
NameA descriptive, unique name for this importer that fits into one line to be used in a combo box selection. May contain spaces.
extsA list of file name extensions that this Nutrition can handle, such as {"jpg","png","tif"} - no dot, only extension!

◆ VNutrition() [3/3]

Wizt::VNutrition::VNutrition ( const string &  Name,
const string &  Description,
const MemCore::StringList exts,
const RefPtr< VCreationPreferences > &  CreationPreferences = nullptr 
)
inline

Constructor.

Parameters
NameA descriptive, unique name for this importer that fits into one line to be used in a combo box selection. May contain spaces.
extsA list of file name extensions that this Nutrition can handle, such as {"jpg","png","tif"} - no dot, only extension!

Member Function Documentation

◆ analyse()

virtual analysis_return_t Wizt::VNutrition::analyse ( const FileList_t )
pure virtual

Any information that requires a somewhat slower in-depth analysis, such as by opening the files to check their actual content.

The function may store information of the analysis in a local data structure to be reused later on, such as via can_handle(). Of course, all functions making use of such analysis info are advised to verify that such info is up to date with possible changes of the respective file.

◆ digestible()

bool Wizt::VNutrition::digestible ( const fileid f) const
virtual

A sanity check function to determine whether a certain file can be handled by this importer.

The function may make use of the results of a former analyse() call.

References getExtensions().

◆ iterate()

unsigned Wizt::VNutrition::iterate ( const string &  ext,
const NutritionIterator NI 
)
static

Iterate over all Nutrition objects that have been registered for a given extension.

Note that registering for an empty extension is totally valid, as well as multiple registrations of the same VNutrition for different extensions.

References Wizt::VManagedObject::count().

◆ registerViaExtension()

void Wizt::VNutrition::registerViaExtension ( const string &  ext) const

Register this VNutrition object for a certain file name extension.

Note that registering for an empty extension is totally valid, as well as multiple registrations of the same VNutrition for different extensions.

References MemCore::ReferenceBase< VManagedObjectBase >::self().