FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Public Member Functions | Protected Member Functions | List of all members
Fiber::FiberMap< ID > Class Template Reference

Base class for fields defined on some base space. More...

#include <FiberSpace.hpp>

Inheritance diagram for Fiber::FiberMap< ID >:
Fiber::BaseSpaceDependency MemCore::Ageable Fiber::Ownable< BaseSpaceDependency > Fiber::OwnerBase

Public Member Functions

RefPtr< FragmentIDCollectiongetFragmentIDCollection () const
 Return the associated fragment ID collection of the first field that has one.
 
 FiberMap ()
 Default constructor.
 
size_t getNumberOfFields () const
 Get the number of fields contained here.
 
Fieldoperator[] (const ID &id)
 Access field by name, create one, in case.
 
void mkFieldID (const ID &id)
 
void insertField (const ID &id, const RefPtr< Field > &F)
 
const RefPtr< Field > & find (const ID &id) const
 Find an entry.
 
RefPtr< CreativeArrayBasefind (const ID &id, const RefPtr< FragmentID > &f) const
 
RefPtr< CreativeArrayBasefind (const ID &id, const string &FragmentName) const
 
const RefPtr< Field > & operator() (const ID &id) const
 Find an entry, operator interface to the find() member function for convenience.
 
void iterate (const std::function< bool(const ID &, const RefPtr< Field > &)> &F) const
 
bool remove (const ID &id)
 Remove an Field.
 
void getMinMaxAge (Ageable &Youngest, Ageable &Oldest) const
 Get the youngest/oldest age of all fields contained here, including the fiber space itself taking into account when fields have last been inserted or removed here.
 
RefPtr< FieldfindMostFragmentedField () const
 Find the Field with the most fragments.
 
int getMemoryUsage (memsize_t &UsedMemory, memsize_t &WantedMemory) const
 Memory usage.
 
int providesFieldType (const Fiber::TypeList_t &AcceptedFields) const
 Check how many fields exist here that conform to the given type.
 
string xml () const
 
void clear_fields ()
 
const RefPtr< Field > & getFirstField () const
 
- Public Member Functions inherited from Fiber::BaseSpaceDependency
 BaseSpaceDependency ()
 Constructor.
 
virtual ~BaseSpaceDependency ()
 Destructor.
 
- Public Member Functions inherited from Fiber::Ownable< BaseSpaceDependency >
void x_updateOwnershipAge (const MemCore::Ageable &theNewAge) override
 Forward some age to all Owners.
 
void insertOwner (const Container &theOwner)
 Add some owner.
 
bool insertOwner (const MemCore::WeakPtr< Container > &theOwner)
 Add some owner.
 
void addOwner (const Container &theOwner, const MemCore::Ageable &theNewAge)
 Add some owner and broadcast a new age to all Ownerrs.
 
void addOwner (const MemCore::WeakPtr< Container > &theOwner, const MemCore::Ageable &theNewAge)
 Add some owner and broadcast a new age to all Ownerrs.
 
 Ownable ()
 Default constructor, empty Ownership list.
 
 Ownable (const Ownable &)
 Copy constructor, does NOT copy any ownership information, the new Ownable will be unowned.
 
 Ownable (const MemCore::WeakPtr< Container > &theOwner, const MemCore::Ageable &theNewAge)
 Construct an Ownable with an initial owner.
 
 Ownable (const Container &theOwner, const MemCore::Ageable &theNewAge)
 Construct an Ownable with an initial owner.
 
Ownableoperator= (const Ownable &)
 Assignment, does NOT copy any ownership information, the assigned Ownable will retain all its ownership information.
 
MemCore::WeakPtr< Container > getPrimaryOwner () const
 Get the first valid owner.
 
size_t getNumberOfValidOwners () const
 Get the first valid owner.
 
bool processOwnership (MemCore::Intercube &Output, const MemCore::Intercube &Input) const override
 Process some ownership action.
 
- Public Member Functions inherited from Fiber::OwnerBase
bool processOwnership (MemCore::Intercube &OutputAndInput) const
 Process ownership where the input information is shared with the output information in the same Intercube.
 
- 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 AgeablegetAge () 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
 
Ageabletouch () noexcept
 
age_t update (age_t age) noexcept
 
age_t update (const Ageable &Other) noexcept
 
age_t update (const volatile Ageable &Other) volatile noexcept
 

Protected Member Functions

RefPtr< Field > & create_entry (const ID &id)
 Get a modifyable field entry.
 
Fields_t copy_Fields_map () const
 

Additional Inherited Members

- Public Types inherited from Fiber::OwnerBase
template<class ItemType >
using Item = MemCore::InterfaceData< ItemType >
 An optional convenience class that allows to easily add arbitrary types to Intercubes .
 
- Static Public Member Functions inherited from MemCore::Ageable
static const AgeableInfinitelyNew () noexcept
 
static constexpr const AgeableInfinitelyOld () noexcept
 
static age_t now () noexcept
 
- Public Attributes inherited from Fiber::Ownable< BaseSpaceDependency >
std::unordered_set< MemCore::WeakPtr< Container > > Owners
 The (internal) list of owners.
 

Detailed Description

template<class ID>
class Fiber::FiberMap< ID >

Base class for fields defined on some base space.

This class provides a set of named fields and an age, which reflects the age of the last insertion of a Field. Note that this age is not the age of the newest Field here, but the age when a new field has been inserted or removed.

Member Function Documentation

◆ create_entry()

template<class ID >
RefPtr< Field > & Fiber::FiberMap< ID >::create_entry ( const ID &  id)
inlineprotected

◆ operator[]()

template<class ID >
Field & Fiber::FiberMap< ID >::operator[] ( const ID &  id)
inline

◆ providesFieldType()

template<class ID >
int Fiber::FiberMap< ID >::providesFieldType ( const Fiber::TypeList_t AcceptedFields) const
inline

Check how many fields exist here that conform to the given type.

Only fields that have the MemArrayProperties set can be checked here, all other fields will be ignored.

If the type list is empty, then all fields will be returned.

References std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::begin(), and std::map< typename _Key, typename _Tp, typename _Compare, typename _Alloc >::end().

◆ remove()

template<class ID >
bool Fiber::FiberMap< ID >::remove ( const ID &  id)
inline