|
|
| OnDemandCreator (const Constructor_t &myConstructor, const MemCore::RefPtr< MemCore::Cache > &theCache) |
| | Construct an OnDemand Creator.
|
| |
| Creature::ReasonForReleasal | release () override |
| |
| bool | hasData () const override |
| |
| const std::type_info & | getType () override |
| |
| MemCore::CacheablePtr | getCacheable () const override |
| |
| RefPtr< MemBase > | get () const override |
| |
| RefPtr< MemBase > | take () override |
| |
| RefPtr< MemBase > | produce () override |
| | The data creation: Create an object of type Computer (the template argument), passing the constructor object from the Computer's class and a weak ptr to the creator, such as in:
|
| |
|
| CreativeArrayBase (const MemCore::WCachePtr &theCache) |
| |
|
Ageable & | touch () throw () |
| |
|
const Ageable & | touchAttributes () const |
| |
|
const Ageable & | updateAttributeAge (const Ageable &A) const |
| |
| void | extremeUnction () |
| |
| bool | needsSaving () const |
| | Check if the data here need to be saved, i.e.
|
| |
| void | hasBeenSaved () const |
| | Indicate that this dataset has been saved and does not need to be saved again.
|
| |
|
void | addDataMetaInfo (const MemCore::RefPtr< MemBase > &D) |
| | Set the type and size interfaces according to the given data.
|
| |
|
const FiberTypeIndex & | getFiberTypeIndex () const |
| |
| auto | value_type_size () const |
| | How many bytes this object occupies in memory.
|
| |
|
RefPtr< FiberTypeBase > | getFiberType () const |
| |
|
void | setFiberType (const RefPtr< FiberTypeBase > &FTB) |
| |
|
template<class ... T> |
| bool | isType () const |
| |
|
void | addMetaInfo (const DynamicSize &theSize, const RefPtr< FiberTypeBase > &theDataType) |
| |
|
void | addMetaInfo (int nDimensions, const RefPtr< FiberTypeBase > &theDataType) |
| |
| RefPtr< BinderBase > | getBinder () const |
| | Get the Binder from the Bundle where this Creator is contained, processing via Bundle::processOwnership(), which may be relatively slow.
|
| |
| void | save (const MemCore::RefPtr< MemBase > &D) const |
| | Passes the data object backwards through the ownership hierarchy, ultimately calling Bundle::processOwnership() which in turn calls Binder::save().
|
| |
|
RefPtr< Domain > | create (bool CreateAsOld=false) |
| |
|
RefPtr< Domain > | createAsOld () |
| |
|
| CreatorBase (const WCachePtr &theCache) |
| |
|
RefPtr< Domain > | get_or_request (const result &R=nullptr) |
| |
| std::string | hasProducer () const override |
| |
| bool | isReproducible () const override |
| |
| bool | isUnderCreation () const override |
| |
|
const WCachePtr & | myCache () const |
| |
|
virtual bool | request (const result &R=nullptr) |
| |
|
std::string | addrstr () const |
| |
|
string & | appendProvenance (const RefPtr< Provenance > &P) |
| |
|
string & | appendProvenance (const string &s) |
| |
|
| Creature (const WCachePtr &myCache) |
| |
|
virtual bool | discardCreation () |
| |
|
void | enableCaching (bool CreateAsOld=false) const |
| |
|
RefPtr< Provenance > | getFirstCreationSource () const |
| |
|
const WCachePtr & | myCache () const |
| |
|
ReasonForReleasal | releasePtr (RefPtr< RefType > &Data) const |
| |
|
void | resetStatistics () |
| |
|
string & | setProvenance (const RefPtr< Provenance > &P) |
| |
|
string & | setProvenance (const string &s) |
| |
|
auto | getObjectCountID () const noexcept |
| |
|
bool | isIdentical (const WeakPtr< Object, Object > &PossibleSelf) const noexcept |
| |
|
void | mkAutoDestructive () |
| |
|
refcount_t | refcount () const noexcept |
| |
|
| ReferenceBase (Object *that) noexcept |
| |
|
const auto & | self () const |
| |
|
refcount_t | wrefcount () const noexcept |
| |
|
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) |
| |
|
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 |
| |
| 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.
|
| |
|
Ownable & | operator= (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.
|
| |
|
bool | processOwnership (MemCore::Intercube &OutputAndInput) const |
| | Process ownership where the input information is shared with the output information in the same Intercube.
|
| |
|
void | attributesHaveBeenSaved () const |
| |
|
bool | attributesNeedSaving () const |
| |
|
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 |
| |
A Creator object that allows to create data on demand, when they are used and accessed.
For instance, some Field may be defined on a Grid whose values are computed once the Field is accessed. Providing such an On-Demand-Field does neither require computational nor memory resources.
The computational logic is put in the template argument Computer. It must
- provide an type ResultArray_t, which is derived from a MemBase; the type ResultArray_t must define a type value_type which will be used as the value type of this Creator.
- provide a type Constructor_t, which is used to communicate data from the Creator to the actual Computer object. The Computer object is create dynamically with a copy of the data provided at the constructor of the OnDemandCreator.
- provide a constructor that takes one argument of type Constructor_t .
- provide a member function result() which returns a type that is convertible to RefPtr<MemBase>
struct Compute
{
{
result_storage =
new ResultArray_t(
howmany, C);
}
{
return result_storage;
}
};
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
- Todo:
- Revise, derive from CreativeArray and overload the Producer instead.