|
FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
|
The main entity holding all information. More...
#include <Bundle.hpp>
Classes | |
| struct | Notifier |
| Mechanism to have notifier objects listening to changes on the Bundle, whatever nature those changes might be. More... | |
Public Types | |
| typedef MemCore::LoaderRegistry< Bundle > | Loader |
| typedef Info< Slice > | SliceInfo_t |
| The information as returned by a query for Slices. | |
| typedef Info< Grid > | GridInfo_t |
| The information as returned by a query for Grids. | |
| typedef Info< Skeleton > | SkeletonInfo_t |
| The information as returned by a query for Skeletons. | |
| using | grid_iterator = std::function< bool(double t, const GridID &id, Grid &g)> |
| typedef std::pair< double, double > | Range_t |
Public Member Functions | |
| const RefPtr< GridList > & | getGridList () const |
| const set< WeakPtr< GridID > > & | getGridIdentifiers () const |
| void | announceModification () const |
| Announce that "something" has been changed on this Bundle. | |
| void | addNotifier (const RefPtr< Notifier > &N) |
| void | bind (const RefPtr< Binder > &theBinder) |
| MemCore::SaveParameters::SaveError | bindTo (const string &url, const RefPtr< MemCore::InterfaceBase > &A=nullptr, const RefPtr< MemCore::InterfaceBase > &B=nullptr) |
| Bind this Bundle object to a file such that all objects can be swapped in and out. | |
| MemCore::SaveParameters::SaveError | bindToNew (const string &url, const RefPtrStorageTransformations &ST) |
| Bind to a newly created file. | |
| MemCore::SaveParameters::SaveError | bindToNew (const string &url) |
| const RefPtr< Binder > & | getBinder () const |
| bool | isBound () const |
| Check if this bundle is bound. | |
| std::string | boundUrl () const |
| The URL of the storage device to which this Bundle is bound. | |
| bool | sync (const RefPtr< MemCore::LoaderProgress > &SaveProgress=nullptr) const |
| Flushes all bundle-associated memory buffers and writes them to disk without releasing the memory. | |
| bool | merge (const RefPtr< LoaderParameters > &LP) |
| Merge data from an external device (file, URL, ...) to the current Bundle object. | |
| bool | merge (const string &url) |
| bool | merge (const list< string > &urls) |
| Bundle () | |
| Constructor. | |
| void | DeferredConstructor () |
| Deferred Constructor (. | |
| ~Bundle () | |
| Destructor. | |
| int | save (const string &url, const RefPtr< LoaderProgress > &SaveProgress=nullptr, const RefPtrStorageTransformations &ST=nullptr) |
| RefPtr< GridID > | operator() (const string &gridname) const |
| Query a GridID from a name. | |
| RefPtr< GridID > | operator[] (const string &gridname) const |
| Create a GridID from a name. | |
| int | getGridnames (GridList::stringset_t &Gridnames) const |
| Query all the grid names that lurk around at this Bundle. | |
| size_t | getNumberOfGrids () const |
| Get the number of grids defined on this Grid. | |
| const RefPtr< GlobalCharts > & | getAtlas () const |
| double | minTime () const |
| Return the minimal time, i.e. | |
| double | maxTime () const |
| Return the maximal time, i.e. | |
| SliceInfo_t | firstSlice () const |
| Return the first slice in this bundle. | |
| bool | accessFirstSlice () const |
| Access the first slice of this bundle, which implies loading or creating any metadata as associated with this bundle. | |
| Slice & | operator[] (double time) |
| Access one-dimensional index space, possibly creating an Slice entry. | |
| Slice & | operator[] (const ParameterSet &) |
| Access n-dimensional index space, possibly creating an Slice entry. | |
| SlicePtr | operator() (double &time) const |
| Query the one-dimensional index space for a Slice entry. | |
| SlicePtr | findPrev (double &time) const |
| SlicePtr | findNext (double &time) const |
| SliceInfo_t | prev (double time) const |
| Return the time slice just before the given time. | |
| SliceInfo_t | next (double time) const |
| Return the time slice just next after the given time. | |
| RefPtr< Grid > | operator() (double time, const string &gridname) const |
| Query the one-dimensional index space for a Grid. | |
| RefPtr< Grid > | operator() (double time, const RefPtr< GridID > &GridID) const |
| Query the one-dimensional index space for a Grid. | |
| Slice::grids_t::value_type | getUniqueGrid (double time) |
| RefPtr< Grid > | newGrid () const |
| Create a new Grid object that lives on this Bundle, but is not yet associated to any time, and yet unnamed. | |
| Info< Grid > | findFirst (const string &gridname, bool OnlyInspectLoadedSlices=false) const |
| Find the first occurence of a Grid object in the Bundle. | |
| Info< Grid > | findLast (const string &gridname, bool OnlyInspectLoadedSlices=false) const |
| Find the last occurence of a Grid object in the Bundle. | |
| int | NumberOfGrids (const string &gridname, bool OnlyInspectLoadedSlices) const |
| Return the number of Grid instances found on this Bundle. | |
| int | NumberOfGrids (double T0, double T1, const string &gridname, bool OnlyInspectLoadedSlices) const |
| Return the number of Grid instances found on this Bundle in the given time range. | |
| int | NumberOfGridInstances (double T0, double T1, const string &gridname, bool OnlyInspectLoadedSlices) const |
| int | getNrSlicesOfGridInTimeRange (double time_min, double time_max, const string &grid_name, bool loaded_slices_only) const |
| GridInfo_t | findMostRecentGrid (double time, const string &gridname) const |
| Return information when the requested grid was found most recently. | |
| GridInfo_t | findMostRecentGrid (double time, const RefPtr< GridID > &gridid) const |
| Return information when the requested grid was found most recently. | |
| Info< Grid > | findPrev (double time, const string &gridname) const |
| Find the latest existence of the grid object that exists at the current time. | |
| Info< Grid > | findPrev (double time, const RefPtr< GridID > &gridname) const |
| GridInfo_t | findPreviousGrid (double time, const string &gridname) const |
| GridInfo_t | findPreviousGrid (double time, const RefPtr< GridID > &GID) const |
| Info< Grid > | findNext (double time, const string &gridname) const |
| Find the next grid object that exists after the current time. | |
| Info< Grid > | findNext (double time, const RefPtr< GridID > &gridname) const |
| int | iterateBackward (double &time, const string &gridname, EvolutionIterator< Grid > &GEI, bool IterateOnlyLoadedSlices) const |
| Starting with the given time, find all grids that reside before this time until the GridEvolutionIterator returns false or there are no more such grids. | |
| int | iterateForward (double &time, const string &gridname, EvolutionIterator< Grid > &GEI, bool IterateOnlyLoadedSlices) const |
| Starting with the given time, find all grids that reside after this time until the GridEvolutionIterator returns false or there are no more such grids. | |
| SkeletonInfo_t | findPreviousRefinementLevel (double &T, const string &gridname, int Level, EvolutionIterator< Skeleton > *EIS, int IndexDepth) |
| SkeletonInfo_t | findPreviousRefinementLevel (double &T, const string &gridname, int Level, int IndexDepth=0) |
| Find the most recent refinement level of an adaptive mesh, which resides at a time before the current one. | |
| SkeletonInfo_t | findPreviousRefinementLevel (double &T, const string &gridname, int Level, EvolutionIterator< Skeleton > &EIS, int IndexDepth=0) |
| SkeletonInfo_t | findNextRefinementLevel (double &T, const string &gridname, int Level, int IndexDepth=0) |
| RefPtr< Slice > | operator() (const ParameterSet &) const |
| Query the n-dimensional index space for a Slice entry. | |
| int | sizeP1D () const |
| The size of the one-dimensional parameter space. | |
| const ParameterList & | AllParameters () const |
| int | iterate (const ParameterList &PL, EvolutionIterator< Slice > &SI) const |
| General iteration over all Slices contained in this Bundle. | |
| int | iterate (const string &gridname, EvolutionIterator< Grid > &GEI, bool IterateOnlyLoadedSlices) const |
| Iterate over all instances of a Grid, possibly restrained to only those Slices that have already been loaded. | |
| int | iterate (const string &gridname, const EvolutionIterator< Grid >::functor &GEI, bool IterateOnlyLoadedSlices) const |
| Iterate over all instances of a Grid, possibly restrained to only those. | |
| int | iterate (const RefPtr< GridID > &id, const grid_iterator &gi, bool IterateOnlyLoadedSlices=false) const |
| Iterate over all instances of a Grid, possibly restrained to only those Slices that have already been loaded. | |
| template<class Functor > | |
| int | iterate_timeslices (bool DoLoadAllSlices, const Functor &F) const |
| Range_t | getTimeRange (const string &Gridname, bool OnlyInspectAlreadyLoadedSlices=false) |
| Get the time range of a particular Grid. | |
| int | getMemoryUsage (memsize_t &UsedMemory, memsize_t &WantedMemory) const |
| Get the memory occupied by this Bundle (and all of its Grids). | |
| string | xml () const |
| void | extremeUnction () override |
Public Member Functions inherited from MemCore::Intercube | |
| void | addInterface (const RefPtr< InterfaceBase > &I) const |
| void | addInterfaceData (const Data &D) |
| void | addInterfaceData (const Data &D) |
| void | clearInterfaces () |
| bool | const_iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP) const |
| virtual RefPtr< InterfaceBase > | createInterface (const type_info &) const |
| RefPtr< InterfaceBase > | findInterface (const type_info &t) const |
| RefPtr< InterfaceBase > | getInterface (const type_info &t) |
| std::string | getInterfaceNames (const char delim=';') const |
| bool | gotNewInterfaceData (const Data &D) |
| bool | gotNewInterfaceData (mutex &M, const Data &D) |
| bool | gotNewInterfaceData (mutex &M, const Data &D) |
| bool | gotNewInterfaceData (mutex &M, const Data &D, const Selector &S) |
| bool | gotNewInterfaceData (mutex &M, const Data &D, const Selector *S) |
| bool | hasChangedInterfaceData (const Data &D) const |
| bool | hasChangedInterfaceData (const Data &D) const |
| bool | hasChangedInterfaceData (const Data &D, const Selector &) const |
| bool | hasChangedInterfaceData (const Data &D, const Selector *) const |
| bool | hasInterface (const type_info &t) const |
| bool | iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP) |
| void | printInterfaces () const |
| void | registerInterface (const type_info &t) |
| void | removeInterface () |
| void | removeInterfaceBase (const type_info &InterfaceBaseID) |
Public Member Functions inherited from MemCore::Attributes | |
| MemCore::RefPtr< MemCore::ChunkBase > | getAttribute (const std::string &name) const |
| const Ageable & | getAttributeAge () const |
| std::pair< bool, T > | getAttributeValue (const string &AttributeName, size_t ElementNumber=0) const |
| attributes_t & | getAttributeValues () |
| const attributes_t & | getAttributeValues () const |
| size_t | getNumberOfAttributes () const |
| bool | hasAttribute (const std::string &name) const |
| int | Iterate (const Functor &L) const |
| int | iterate (Iterator &it) const |
| int | iterate_attributes (const Functor &L) const |
| size_t | NumberOfAttributes () const |
| void | setAttribute (const std::string &name, const MemCore::RefPtr< MemCore::ChunkBase > &AttribData) |
| ResizableChunk< T > & | setAttributeValue (const std::string &name, const T &AttribData) |
| ResizableChunk< T > & | setAttributeValues (const std::string &name, const std::initializer_list< T > &AttribData) |
| const T & | setValue (const T &AttribData, const std::string &name) |
| const T & | setValue (const T &AttribData, const std::string &name, const std::string &Comment, const std::string &CommentPrefix="Comment") |
| string | toString () const |
| const Ageable & | touchAttributes () const |
| const Ageable & | updateAttributeAge (const Ageable &A) const |
Public Member Functions inherited from MemCore::Ageable | |
| constexpr | Ageable (age_t t) noexcept |
| constexpr | Ageable (const Ageable &A) noexcept |
| Ageable (const volatile Ageable &A) noexcept | |
| constexpr const Ageable & | getAge () const |
| bool | isNewerThan (const Ageable &a) const noexcept |
| bool | isOlderThan (const Ageable &a) const noexcept |
| bool | isYoungerThan (const Ageable &a) const noexcept |
| bool | operator!= (const Ageable &a) const noexcept |
| bool | operator< (const Ageable &a) const noexcept |
| bool | operator<= (const Ageable &a) const noexcept |
| bool | operator<= (const volatile Ageable &a) const volatile noexcept |
| bool | operator== (const Ageable &a) const noexcept |
| bool | operator> (const Ageable &a) const noexcept |
| bool | operator> (const volatile Ageable &a) const volatile |
| bool | operator>= (const Ageable &a) const noexcept |
| bool | operator>= (const volatile Ageable &a) const volatile noexcept |
| constexpr void | resetAge () noexcept |
| void | setInfinitelyNew () noexcept |
| age_t | time_value () const noexcept |
| age_t | time_value () const volatile noexcept |
| Ageable & | touch () noexcept |
| age_t | update (age_t age) noexcept |
| age_t | update (const Ageable &Other) noexcept |
| age_t | update (const volatile Ageable &Other) volatile noexcept |
Static Public Member Functions | |
| static RefPtr< Bundle > | load (bool &success, const RefPtr< LoaderParameters > &ld, const RefPtr< Bundle > &B=nullptr) |
| Load a Bundle object or append new data to an existing Bundle. | |
| static RefPtr< Bundle > | load (bool &success, const list< string > &urls, const RefPtr< Bundle > &B=nullptr, const RefPtr< LoaderProgress > &Progress=nullptr) |
| A simplified version to load a Bundle without detailed error information availlable (which would be in the LoaderParameters argument of the alternative functions). | |
| static std::pair< RefPtr< Bundle >, std::string > | load (const list< string > &urls, const RefPtr< LoaderProgress > &Progress=nullptr) |
| Convenience function to load a bundle from a given list of urls, returning a pair of a bundle pointer and error message string which contains possible errors. | |
| static RefPtr< Bundle > | load (bool &success, const string &url, const RefPtr< Bundle > &B=nullptr, const RefPtr< LoaderProgress > &Progress=nullptr) |
| static RefPtr< Bundle > | load (const string &url, const RefPtr< LoaderProgress > &Progress=nullptr) |
Static Public Member Functions inherited from MemCore::Ageable | |
| static const Ageable & | InfinitelyNew () noexcept |
| static constexpr const Ageable & | InfinitelyOld () noexcept |
| static age_t | now () noexcept |
Public Attributes | |
| std::set< RefPtr< Notifier > > | myNotifiers |
Friends | |
| class | Slice |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<class ObjectLevel > | |
| class BUNDLE_API | EvolutionIterator |
| Generic template definition for iterators over objects on many time steps. | |
The main entity holding all information.
A Bundle is a set of Slice objects, each of them accessed via some floating-point value, which is usually interpreted as time.
Note: by inheritance, the Bundle object allows to query GridID's from strings as well, see class GridList for details.
| Fiber::Bundle::~Bundle | ( | ) |
Destructor.
puts("Bundle::~Bundle() start clearance ");fflush(stdout);
| MemCore::SaveParameters::SaveError Fiber::Bundle::bindTo | ( | const string & | url, |
| const RefPtr< MemCore::InterfaceBase > & | A = nullptr, |
||
| const RefPtr< MemCore::InterfaceBase > & | B = nullptr |
||
| ) |
Bind this Bundle object to a file such that all objects can be swapped in and out.
Parameters are either Binder::Parameters ór StorageTransformations, in arbitrary order.
References MemCore::Intercube::iterateInterfaces().
| MemCore::SaveParameters::SaveError Fiber::Bundle::bindToNew | ( | const string & | url, |
| const RefPtrStorageTransformations & | ST | ||
| ) |
Bind to a newly created file.
Similar to bindTo with Binder::Parameters::AppendFile=false.
| void Fiber::Bundle::DeferredConstructor | ( | ) |
Deferred Constructor (.
| Info< Grid > Fiber::Bundle::findFirst | ( | const string & | gridname, |
| bool | OnlyInspectLoadedSlices = false |
||
| ) | const |
Find the first occurence of a Grid object in the Bundle.
| OnlyInspectLoadedSlices | Inspect only slices that exist in memory, i.e. don't try to load data from disk. |
References std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::begin(), and std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::end().
| Info< Grid > Fiber::Bundle::findLast | ( | const string & | gridname, |
| bool | OnlyInspectLoadedSlices = false |
||
| ) | const |
Find the last occurence of a Grid object in the Bundle.
| OnlyInspectLoadedSlices | Inspect only slices that exist in memory, i.e. don't try to load data from disk. |
References std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::rbegin(), and std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::rend().
Find the next grid object that exists after the current time.
References std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::begin(), std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::end(), and std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::lower_bound().
Find the latest existence of the grid object that exists at the current time.
References std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::begin(), std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::end(), and std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::upper_bound().
Get the memory occupied by this Bundle (and all of its Grids).
Not that if a Grid is shared on another location then it will be counted twice here. Use the MemCache::Cache function to determine the actual memory usage.
References std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::begin(), and std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::end().
Lambda iterator for bundles, provides Slices:
@eode iterate_timeslices(false, [](double t, const Slice&S) { Verbose(0) << " Data at T=" << t; return true; } );
References Eagle::P1().
| int Fiber::Bundle::iterateBackward | ( | double & | time, |
| const string & | gridname, | ||
| EvolutionIterator< Grid > & | GEI, | ||
| bool | IterateOnlyLoadedSlices | ||
| ) | const |
Starting with the given time, find all grids that reside before this time until the GridEvolutionIterator returns false or there are no more such grids.
| time | The initial time, will be modified(!) during traversal towards the first Grid found |
| IterateOnlyLoadedSlices | Specify if the iteration shall only be performed over those Slices that have already been loaded. |
References std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::begin(), std::count(), std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::end(), and std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::upper_bound().
| int Fiber::Bundle::iterateForward | ( | double & | time, |
| const string & | gridname, | ||
| EvolutionIterator< Grid > & | GEI, | ||
| bool | IterateOnlyLoadedSlices | ||
| ) | const |
Starting with the given time, find all grids that reside after this time until the GridEvolutionIterator returns false or there are no more such grids.
| time | The initial time, will be modified(!) during traversal towards the first Grid found |
| IterateOnlyLoadedSlices | Specify if the iteration shall only be performed over those Slices that have already been loaded. |
References std::count(), std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::end(), and std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::lower_bound().
|
static |
Load a Bundle object or append new data to an existing Bundle.
Creates a new Bundle object from an external device, as specified by the LoaderParameters, e.g. a file or an URL.
| success | Boolean that informs about the success of the load action. An eventual error code can be found in the LoaderParameters argument and the LoaderParameters::load_failure member for a human-readable description. |
| ld | Collection of all information that is required for loading data Includes things like filename, interaction callback object and possible error code retrieval. |
| B | Pointer to an eventually existing bundle. |
Note: Check ld->load_failure for detailed error messages.
References MemCore::LoaderRegistry< class X >::load().
Referenced by Wizt::FiberNutrition::checkBundleDigestibility().
|
inlinestatic |
Convenience function to load a bundle from a given list of urls, returning a pair of a bundle pointer and error message string which contains possible errors.
Use like this:
| double Fiber::Bundle::maxTime | ( | ) | const |
Return the maximal time, i.e.
the highest coordinate value of the one-dimensional parameter space.
References std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::rbegin(), and std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::size().
| bool Fiber::Bundle::merge | ( | const RefPtr< LoaderParameters > & | LP | ) |
Merge data from an external device (file, URL, ...) to the current Bundle object.
The Bundle object must already be referenced via a strong reference pointer.
Error information is provided in LP->LoaderParameters::load_failure on return false.
References MemCore::LoaderRegistry< class X >::load().
| double Fiber::Bundle::minTime | ( | ) | const |
Return the minimal time, i.e.
the lowest coordinate value of the one-dimensional parameter space.
References std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::begin(), and std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::size().
Return the number of Grid instances found on this Bundle.
| OnlyInspectLoadedSlices | Inspect only slices that exist in memory, i.e. don't try to load data from disk. |
References std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::begin(), and std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::end().
| int Fiber::Bundle::NumberOfGrids | ( | double | T0, |
| double | T1, | ||
| const string & | gridname, | ||
| bool | OnlyInspectLoadedSlices | ||
| ) | const |
Return the number of Grid instances found on this Bundle in the given time range.
| OnlyInspectLoadedSlices | Inspect only slices that exist in memory, i.e. don't try to load data from disk. |
References std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::lower_bound(), std::swap(), and std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::upper_bound().
|
inline |
The size of the one-dimensional parameter space.
For instance, this is the number of time slices in a time evolution.
References std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::size().
| bool Fiber::Bundle::sync | ( | const RefPtr< MemCore::LoaderProgress > & | SaveProgress = nullptr | ) | const |