sample_update_policy Interface (original) (raw)
A sample list-update policy.
This class serves to show the interface a list update functor needs to support.
Defined in: sample_update_policy.hpp
Public Methods
Constructors, destructor, and related.
Method | Description |
---|---|
sample_update_policy () | Default constructor. Must be default constructable. |
sample_update_policy (const sample_update_policy &other) | Copy constructor. Must be copy constructable. |
inline void swap (sample_update_policy &other) | Swaps content. Must be swappable (if there is such a word). |
Protected Types and Constants
Metadata definitions.
Type | Definition | Description |
---|---|---|
metadata_type | Some metadata type. | Metadata on which this functor operates. The class must declare the metadata type on which it operates; the list-update based containers will append to each node an object of this type. |
Protected Methods
Metadata operations.
Method | Description |
---|---|
metadata_type operator() () const | Creates a metadata object. A list-update based container object will call this method to create a metadata type when a node is created. |
bool operator() (metadata_reference r_data) const | Decides whether a metadata object should be moved to the front of the list. A list-update based containers object will call this method to decide whether to move a node to the front of the list. The method should returntrue if the node should be moved to the front of the list. metadata_reference is a reference to ametadata_type. |