coan  6.0.1
A C/C++ Configuration Analyzer
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
reference_cache Struct Reference

struct reference_cache encapsulates a cache of the the expansions and evaluations of symbol references. More...

#include <reference_cache.h>

Classes

struct  entry
 Encapsulates an entry in the reference cache. More...
 

Public Types

using map = std::map< std::string, entry >
 Type of map implementing the reference cache.
 
using value_type = map::value_type
 Value-type of map
 
using iterator = map::iterator
 Iterator type on map
 
using const_iterator = map::const_iterator
 Const-iterator type on map
 
using insert_result = std::pair< iterator, bool >
 Type of result of insertion.
 

Static Public Member Functions

static iterator insert (value_type const &v, iterator hint)
 Insert a value_type into the cache. More...
 
static iterator insert (std::string const &key, entry const &e, iterator hint)
 Insert an entry by key into cache. More...
 
static iterator lower_bound (std::string const &key)
 Get an iteraror to the lower bound of a key in the cache.
 
static void erase_symbol (std::string const &id)
 Delete all cached references of a given symbol.
 
static void clear ()
 Empty the cache.
 
template<class Iter >
static bool at_end (Iter i)
 Say whether an iterator points to the end of the cache.
 

Static Private Member Functions

static mapget_map ()
 The cache map.
 

Detailed Description

struct reference_cache encapsulates a cache of the the expansions and evaluations of symbol references.

Definition at line 51 of file reference_cache.h.

Member Function Documentation

static iterator reference_cache::insert ( value_type const &  v,
iterator  hint 
)
inlinestatic

Insert a value_type into the cache.

Parameters
vThe value_type to insert.
hintA hint-iterator as per std::map::insert.
Returns
An iterator to the inserted value_type.

Definition at line 134 of file reference_cache.h.

static iterator reference_cache::insert ( std::string const &  key,
entry const &  e,
iterator  hint 
)
inlinestatic

Insert an entry by key into cache.

Parameters
keyThe key of the entry.
eThe entry to be inserted.
hintA hint-iterator as per std::map::insert.
Returns
An iterator to the inserted value_type.

Definition at line 146 of file reference_cache.h.


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