The Vish Visualization Shell 0.3
Vish
MemCore::LoaderParameters Class Reference

Parameters for the loading process. More...

#include <elementary/memcore/Loader.hpp>

Inheritance diagram for MemCore::LoaderParameters:
MemCore::ReferenceBase< LoaderParameters > MemCore::Intercube MemCore::Attributes

Public Member Functions

RefPtr< LoaderProgress > getLoaderProgress ()
 A callback object that gets notified regularly.
RefPtr< LoaderProgress > getLoaderProgressor ()
 A callback object that gets notified regularly.
RefPtr< LoaderProgress > LoaderProgressor ()
 A callback object that gets notified regularly.
void setProgressCallbacks (const RefPtr< LoaderProgress > &LP)
 Establish a functor object that catches various actions that occur during loading.
Public Member Functions inherited from MemCore::ReferenceBase< LoaderParameters >
auto getObjectCountID () const noexcept
 Get a unique ID for this object in the given domain.
bool isIdentical (const WeakPtr< LoaderParameters, LoaderParameters > &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 (LoaderParameters *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, typename TypeSelector>
void addInterfaceData (const Data &D)
 Add data via an interface class object.
template<class Data>
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, 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>
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, typename Selector>
bool hasChangedInterfaceData (const Data &D) const
 Check whether interface data have changed.
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 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::Attributes
 Attributes ()
 Default constructor.
MemCore::RefPtr< MemCore::ChunkBase > getAttribute (const std::string &name) const
 get an attribute by name
const Ageable & getAttributeAge () const
 Get the age of these attributes.
template<class T>
std::pair< bool, T > getAttributeValue (const string &AttributeName, size_t ElementNumber=0) const
 Get a single value from an attribute, use structured binding for most compact syntax such as:
attributes_t & getAttributeValues ()
 allow direct access to internal map
const attributes_t & getAttributeValues () const
 allow direct access to internal map
size_t getNumberOfAttributes () const
 Retrieve the number of attributes.
bool hasAttribute (const std::string &name) const
 Check if an attribute exists.
template<class Functor>
int Iterate (const Functor &L) const
int iterate (Iterator &it) const
 Iterate over attributes and apply iterator's apply function for each attribute, i.e.
template<class Functor>
int iterate_attributes (const Functor &L) const
size_t NumberOfAttributes () const
 Retrieve the number of attributes.
void setAttribute (const std::string &name, const MemCore::RefPtr< MemCore::ChunkBase > &AttribData)
 set an attribute
template<class T>
ResizableChunk< T > & setAttributeValue (const std::string &name, const T &AttribData)
 set a single attribute
template<class T>
ResizableChunk< T > & setAttributeValues (const std::string &name, const std::initializer_list< T > &AttribData)
 set an attribute
template<class T>
const T & setValue (const T &AttribData, const std::string &name)
 Convenience function: set an single attribute, return the value itself.
template<class T>
const T & setValue (const T &AttribData, const std::string &name, const std::string &Comment, const std::string &CommentPrefix="Comment")
 Convenience function: set an single attribute with a comment, return the value itself.
string toString () const
 Convert attributes to string.
const Ageable & touchAttributes () const
 Touch the attribute age to indicate some values in the attributes have been changed.
const Ageable & updateAttributeAge (const Ageable &A) const
 Update the attribute age to another age to indicate some values in the attributes have been changed.
 ~Attributes ()
 Destructor.

Public Attributes

string load_failure
 A textual description of an eventual load failure.
list< string > urls
 The resource(s) to be loaded.

Additional Inherited Members

Public Types inherited from MemCore::ReferenceBase< LoaderParameters >
using reference_domain_t
 The type of the base class.
using SelfPtr_t
 Type for a pointer to this object itself.
Protected Member Functions inherited from MemCore::ReferenceBase< LoaderParameters >
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.

Detailed Description

Parameters for the loading process.

The loading of files is done via an I/O independent abstraction layer, built upon the LoaderBase class. As a specific implementation of an I/O layer might require specific parameters to operate well, it may query the LoaderParameters for a certain interface.

One such possible interface is the LoaderProgress class which allows to notify an external instance about the progress and procedure of loading a file or reading from an external resource.

Note
Generic loading of objects is done via class LoaderRegistry .

,LoaderRegistry