C++Memo  1.0-RC
Generic framework for memoization, providing automatic parallelization.
 All Classes Files Functions
Public Member Functions | Friends | List of all members
cppmemo::CppMemo< Key, Value, KeyHash1, KeyHash2, KeyEqual >::PrerequisitesProvider Class Reference

The function object providing prerequisites to the Compute function passed to an appropriate CppMemo::getValue() overload. More...

#include <cppmemo.hpp>

Public Member Functions

const Value & operator() (const Key &key)
 Provides the value corresponding to the given key. More...
 

Friends

class CppMemo< Key, Value, KeyHash1, KeyHash2, KeyEqual >
 

Detailed Description

template<typename Key, typename Value, typename KeyHash1 = std::hash<Key>, typename KeyHash2 = fcmm::DefaultKeyHash2<Key>, typename KeyEqual = std::equal_to<Key>>
class cppmemo::CppMemo< Key, Value, KeyHash1, KeyHash2, KeyEqual >::PrerequisitesProvider

The function object providing prerequisites to the Compute function passed to an appropriate CppMemo::getValue() overload.

Member Function Documentation

template<typename Key , typename Value , typename KeyHash1 = std::hash<Key>, typename KeyHash2 = fcmm::DefaultKeyHash2<Key>, typename KeyEqual = std::equal_to<Key>>
const Value& cppmemo::CppMemo< Key, Value, KeyHash1, KeyHash2, KeyEqual >::PrerequisitesProvider::operator() ( const Key &  key)
inline

Provides the value corresponding to the given key.

Important note. If a CppMemo::getValue() overload was called that does not accept a DeclarePrerequisites function, then this method may return an invalid, default-constructed value, and "track" the request as an indirect means to gather prerequisites of a given key (via a dry run of the Compute funtion).

See Also
CppMemo::getValue()
Parameters
keythe requested key
Returns
the value corresponding to the requested key, or an invalid, default-constructed value (if dry running the Compute function)

The documentation for this class was generated from the following file: