Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell

A helper class that keeps objects in memory all time. More...

#include <CreativeArray.hpp>

Inheritance diagram for Fiber::CreativeArray:
MemCore::Creator< MemBase, CreativeArrayBase > MemCore::CreatorBase< Domain >

Public Types

typedef MemCore::Creator< MemBase, CreativeArrayBaseCreator_t

Public Member Functions

 CreativeArray (const MemCore::RefPtr< MemBase > &Mb, const MemCore::RefPtr< MemCore::Cache > &Cache=MemCore::Cache::MemCache())
 Construct a creative array from data and Cache.
Creature::ReasonForReleasal release () override
Public Member Functions inherited from MemCore::Creator< MemBase, CreativeArrayBase >
 Creator (const RefPtr< RefType > &D, const WCachePtr &MyCache)
RefPtr< RefType > get () const override
CacheablePtr getCacheable () const override
const type_info & getType () override
bool hasData () const override
Creature::ReasonForReleasal release () override
bool supersede (const RefPtr< Domain > &NewData, bool CreateAsOld=false)
RefPtr< RefType > take () override
Public Member Functions inherited from MemCore::CreatorBase< Domain >
RefPtr< Domain > create (bool CreateAsOld=false)
RefPtr< Domain > createAsOld ()
 CreatorBase (const WCachePtr &theCache)
RefPtr< Domain > get_or_request (const result &R=nullptr)
bool isUnderCreation () const override
virtual bool request (const result &R=nullptr)

Protected Member Functions

 ~CreativeArray ()
 Destructor.
Protected Member Functions inherited from MemCore::Creator< MemBase, CreativeArrayBase >
 Creator (const WCachePtr &MyCache)
RefPtr< RefType > produce () override

Detailed Description

A helper class that keeps objects in memory all time.

This is in general not a good idea, but convenient, so it's used in a lots of places. To make it right, should replace this class by Creator that does real memory management, which means releasing memory when requested and re-creating it on demand (see OnDemandCreator). This class is just stilly and stupid, and wastes memory resources, for the sake of simplicity.

This Creator is used by the Field::setPersistentData() function.

Examples
XF_LineSetHierarchicalRegularized.cpp.