Isis 3 Programmer Reference
Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy > Class Template Reference

Collector/container for arbitrary items. More...

#include <CollectorMap.h>

Inheritance diagram for Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >:
Inheritance graph
Collaboration diagram for Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >:
Collaboration graph

Public Types

enum  KeyPolicy { UniqueKeys, DuplicateKeys }
 Enumerated selection of key behaviour. More...
 
typedef T CollectorType
 Data type. More...
 
typedef std::multimap< K, CollectorType, ComparePolicy< K > > CollectorList
 A multimap attacking a key to a CollectorType and a ComparePolicy<CollectorType> More...
 
typedef CollectorList::iterator CollectorIter
 CollectorList iterator type declaration. More...
 
typedef CollectorList::const_iterator CollectorConstIter
 CollectorList constant iterator type declaration. More...
 

Public Member Functions

 CollectorMap ()
 Constructor. More...
 
 CollectorMap (const KeyPolicy &keyPolicy)
 Allows the user to choose if keys can be duplicated. More...
 
virtual ~CollectorMap ()
 Destructor handles removal of the elements within the collection. More...
 
 CollectorMap (const CollectorMap &cmap)
 Copy constructor invokes the copy policy as provided by the users. More...
 
CollectorMapoperator= (const CollectorMap &cmap)
 Assignment operator for the CollectorMap class object. More...
 
int size () const
 Returns the size of the collection. More...
 
int count (const K &key) const
 Returns the number of keys found in the list. More...
 
void add (const K &key, const T &value)
 Adds the element to the list. More...
 
bool exists (const K &key) const
 Checks the existance of a particular key in the list. More...
 
T & get (const K &key)
 Returns the value associated with the name provided. More...
 
const T & get (const K &key) const
 Const version returning the value associated with the given name. More...
 
int index (const K &key) const
 Returns the index of the first occuring element in the list. More...
 
T & getNth (int nth)
 Returns the nth value in the collection. More...
 
const T & getNth (int nth) const
 Returns the nth value in the collection. More...
 
const K & key (int nth) const
 Returns the nth key in the collection. More...
 
int remove (const K &key)
 Removes and entry from the list. More...
 
CollectorConstIter begin () const
 Const iterator into list. More...
 
CollectorConstIter end () const
 Const iterator to end of list. More...
 
CollectorIter begin ()
 Returns the start of the list for iterating purposes. More...
 
CollectorIter end ()
 Returns the end of the list. More...
 

Protected Member Functions

void destroy (T *element)
 Destroys the CollectorMap entry. More...
 
const T & copy (const T &src) const
 Returns a copy of the input. More...
 

Private Member Functions

void selfDestruct ()
 Thourough destruction of list. More...
 

Private Attributes

KeyPolicy _keyPolicy
 Unique or duplicate key constraint. More...
 
CollectorList _list
 The list. More...
 

Detailed Description

template<typename K, typename T, template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
class Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >

Collector/container for arbitrary items.

Used to contain types with iterators of const and non-const conditions. This is a multimap that contains arbitrary keys with arbitrary elements. It is intended to be used for pointers and copyable objects. They should be rather efficient in the copy out operation so large objects may not be suitable or classes that do not have a good copy operator. During testing it was noted that an object is copied up to four times and destroyed three times upon an add() operation.

This class is implemented using policies. The ComparePolicy is used to test key elements such as strings and double values. The NoCaseStringCompare policy is provided that expedites case insensitive string key comparisons. The RobustFloatCompare implements the comparison of double or float key types. Direct comparisons of floats can be problematic due to round off and storage manifestations of these values in conputers. The default policy, SimpleCompare, does a simple parameter to key equality test.

The RemovalPolicy is provided when a map value is removed from the list. This allows pointers and arrays to be stored in the map as well. To store pointers, use PointerRemoval and for arrays there is the ArrayRemoval policy. The default is the NoopRemoval policy which simply lets the destructor handle removals.

The CopyPolicy is necessary to properly handle the copying of elements. This is especially important for pointers and arrays. In order to minimize difficult passing strategies, map elements are passed by address and the return type is the element type. DefaultCopy simply copies the elements as is relying on the element T assigment operator to do the right thing. For pointers to objects, the PointerCopy allocates the object using the copy constructor. One could provide a similar operator assuming a clone() method existed for the type T element. The ArrayCopy policy is left to the user to provide their own as it cannot support arrays of varying length. (One should use std::vector instead!) Users can supply their own CopyPolicy that need only expose a copy(cont T *src) method.

Here are some examples that demonstrate how this policy-based template class can be used:

// Create a unique string key list that stores double floating point values.
// Use the default removal and copy policies but allow testing for character
// keys without regard to case via the NoCaseStringCompare.
#include "CollectorMap.h"
CollectorMap<QString, double, NoCaseStringCompare > dmap;
cout << "\nSize of double map = " << dmap.size() << endl;
dmap.add("one", 1.0);
dmap.add("two", 2.0);
cout << "Size of double map = " << dmap.size() << endl;
cout << "One = " << dmap.get("one") << endl;
cout << "Two = " << dmap.get("Two") << endl;
const double &one = dmap.get("one");
cout << "\nTest Const one = " << one << endl;
dmap.remove("one");

Using this class internal to classes is perhaps where it may be applied more frequently. The example below shows how to declare an integer key using pointers to classes:

#include "CollectorMap.h"
class ClassTest {
public:
ClassTest(int n = 0) : _n(n) { }
~ClassTest() { }
int Ident() const { return (_n); }
private:
int _n;
};
// Typedefs are sometimes convenient in these cases
typedef CollectorMap<int, ClassTest *, SimpleCompare,
PointerRemoval, PointerCopy> PointerMap;
PointerMap ctest2;
ctest2.add(4,new ClassTest(4));
ctest2.add(5,new ClassTest(5));
ctest2.add(6,new ClassTest(6));
ctest2.add(7,new ClassTest(7));
cout << "Remove ClassTest 6\n";
ctest2.remove(6);
// Creates a copy of ctest2 using the PointerCopy policy
PointerMap map2(ctest2);
cout << "Find element 7: " << map2.find(7)->Ident() << endl;

And, finally, an example of how to use duplicate keys:

#include "CollectorMap.h"
typedef CollectorMap<int,QString> IntStr;
IntStr dupstr(IntStr::DuplicateKeys);
dupstr.add(1,"One");
dupstr.add(1, "One #2");
dupstr.add(1,"One #3");
dupstr.add(2,"Two");
dupstr.add(2,"Two #2");
dupstr.add(3,"Three");
cout << "Size of Dup object: " << dupstr.size() << endl;
cout << "Number Ones: " << dupstr.count(1) << endl;
cout << "Number Twos: " << dupstr.count(2) << endl;
cout << "Number Threes: " << dupstr.count(3) << endl;
cout << "Number Fours: " << dupstr.count(4) << endl;
IntStr::CollectorConstIter isIter;
int j = 0;
for (isIter = dupstr.begin() ; isIter != dupstr.end() ; ++isIter, j++) {
cout << "IntStr[" << j << "] = {" << isIter->first << ", "
<< isIter->second << "}, Index: " << dupstr.index(isIter->first)
<< endl;
cout << "Nth Test Ident = " << dupstr.getNth(j) << endl;
}

The output of the above example is:

Size of Dup object: 6
Number Ones: 3
Number Twos: 2
Number Threes: 1
Number Fours: 0
IntStr[0] = {1, One}, Index: 0
Nth Test Ident = One
IntStr[1] = {1, One #2}, Index: 0
Nth Test Ident = One #2
IntStr[2] = * {1, One #3}, Index: 0
Nth Test Ident = One #3
IntStr[3] * = {2, Two}, Index: 3
Nth Test Ident = Two
IntStr[4] = * {2, Two #2}, Index: 3
Nth Test Ident = Two #2
IntStr[5] = * {3, Three}, Index: 5
Nth Test Ident = Three
Author
2006-06-21 Kris Becker
History:
2006-07-03 Kris Becker Added the ability to stored duplicate keys if needed (using a multimap instead of a map). Initial default behavior of unique keys is retained. See KeyPolicy.
History:
2006-07-28 Kris Becker Fixed a bug in the NoCaseStringCompare implementation. Prior to this fix, it would not function properly at all for case-insenstive keys.
History:
2006-08-30 Kris Becker Fixed bug in copy constructors that attempted to use a virtual method in the object being created when it must use the method from the one it is being created from. (g++ 4.1 on Suse 10.1 didn't like this bug at all!)
History:
2008-06-18 Christopher Austin Fixed Documentation
History:
2017-08-30 Summer Stapleton - Updated documentation. References #4807.

Definition at line 419 of file CollectorMap.h.

Member Typedef Documentation

◆ CollectorConstIter

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
typedef CollectorList::const_iterator Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::CollectorConstIter

CollectorList constant iterator type declaration.

Definition at line 427 of file CollectorMap.h.

◆ CollectorIter

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
typedef CollectorList::iterator Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::CollectorIter

CollectorList iterator type declaration.

Definition at line 425 of file CollectorMap.h.

◆ CollectorList

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
typedef std::multimap<K, CollectorType, ComparePolicy<K> > Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::CollectorList

A multimap attacking a key to a CollectorType and a ComparePolicy<CollectorType>

Definition at line 423 of file CollectorMap.h.

◆ CollectorType

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
typedef T Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::CollectorType

Data type.

Definition at line 421 of file CollectorMap.h.

Member Enumeration Documentation

◆ KeyPolicy

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
enum Isis::CollectorMap::KeyPolicy

Enumerated selection of key behaviour.

Using this enumeration during construction allows the user of this class to specify if the keys used to identify elements are unique or can be duplicated.

Enumerator
UniqueKeys 

Constrain keys to be unique.

DuplicateKeys 

Allow duplication of keys.

Definition at line 436 of file CollectorMap.h.

Constructor & Destructor Documentation

◆ CollectorMap() [1/3]

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::CollectorMap ( )
inline

Constructor.

Definition at line 441 of file CollectorMap.h.

◆ CollectorMap() [2/3]

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::CollectorMap ( const KeyPolicy keyPolicy)
inline

Allows the user to choose if keys can be duplicated.

This constructor is provided to the user that wants to explicity define how the keys, namely insertions are managed. The default is unique keys in the noop constructor...this one allows instantiation of either policy.

Parameters
keyPolicyCan be UniqueKeys or DuplicateKeys

Definition at line 452 of file CollectorMap.h.

◆ ~CollectorMap()

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
virtual Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::~CollectorMap ( )
inlinevirtual

Destructor handles removal of the elements within the collection.

This must take into account the removal strategy and apply to any remaining elements.

Definition at line 459 of file CollectorMap.h.

◆ CollectorMap() [3/3]

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::CollectorMap ( const CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy > &  cmap)
inline

Copy constructor invokes the copy policy as provided by the users.

This copy constructor will transfer the map of an incoming CollectorMap to a newly created one. This process employs the user selectable CopyPolicy. It invokes the copy() method exposed in the copy policy.

Parameters
cmapThe CollectorMap to be copied

Definition at line 472 of file CollectorMap.h.

Member Function Documentation

◆ add()

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
void Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::add ( const K &  key,
const T &  value 
)
inline

Adds the element to the list.

If the element exists and the key policy is restricted to uniqueness, it is replaced after the removal strategy is applied. If it doesn't exist, it is inserted into the list. For duplicate keys, it is simply inserted.

Parameters
keyKey in the associative map for the value
valueValue to be associated with the key

Definition at line 540 of file CollectorMap.h.

Referenced by Isis::DatabaseFactory::add(), Isis::DbProfile::add(), Isis::DatabaseFactory::addAccessProfile(), Isis::DatabaseFactory::addProfile(), Isis::DbAccess::addProfile(), Isis::Kernels::categorizeByType(), Isis::DbProfile::DbProfile(), Isis::CSVReader::getColumnSummary(), Isis::DatabaseFactory::getResourceList(), Isis::Gruen::initErrorList(), Isis::DbAccess::load(), Isis::DbProfile::loadkeys(), Isis::LroWideAngleCamera::LroWideAngleCamera(), and Isis::DbProfile::replace().

◆ begin() [1/2]

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
CollectorIter Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::begin ( )
inline

Returns the start of the list for iterating purposes.

Returns
CollectorIter Returns an iterator on the collection

Definition at line 729 of file CollectorMap.h.

◆ begin() [2/2]

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
CollectorConstIter Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::begin ( ) const
inline

Const iterator into list.

Returns
CollectorConstIter Returns a const iterator to the list

Definition at line 711 of file CollectorMap.h.

◆ copy()

template<typename T >
const T& Isis::DefaultCopy< T >::copy ( const T &  src) const
inlineprotectedinherited

Returns a copy of the input.

Parameters
srcThe map element to be copied
Returns
const T& The copy of the input

Definition at line 192 of file CollectorMap.h.

Referenced by Isis::CollectorMap< int, ErrorCounter >::CollectorMap(), and Isis::CollectorMap< int, ErrorCounter >::operator=().

◆ count()

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
int Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::count ( const K &  key) const
inline

Returns the number of keys found in the list.

For unique keys, this will always be 1. If duplicate keys are allowed, this will return the number of keys in the container.

Parameters
keyKey to return count for
Returns
int Number keys in container

Definition at line 526 of file CollectorMap.h.

◆ destroy()

template<typename T >
void Isis::NoopRemoval< T >::destroy ( T *  element)
inlineprotectedinherited

Destroys the CollectorMap entry.

Parameters
elementThe CollectorMap to be destroyed

Definition at line 117 of file CollectorMap.h.

Referenced by Isis::CollectorMap< int, ErrorCounter >::remove(), and Isis::CollectorMap< int, ErrorCounter >::selfDestruct().

◆ end() [1/2]

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
CollectorIter Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::end ( )
inline

Returns the end of the list.

Returns
CollectorIter Returns the end of the list for determining the end of the iteration loop

Definition at line 739 of file CollectorMap.h.

◆ end() [2/2]

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
CollectorConstIter Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::end ( ) const
inline

Const iterator to end of list.

Returns
CollectorConstIter Returns the const end of the list

Definition at line 720 of file CollectorMap.h.

◆ exists()

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
bool Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::exists ( const K &  key) const
inline

◆ get() [1/2]

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
T& Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::get ( const K &  key)
inline

Returns the value associated with the name provided.

If the specifed name and value does not exist in the list, an out_of_range exception is thrown. Use exists to predetermine of the value is in the list.

Parameters
keyKey to fetch the value for
Returns
T Value associated with name
Exceptions
IExceptionif the value is not found

Definition at line 567 of file CollectorMap.h.

Referenced by Isis::DbProfile::add(), Isis::Kernels::categorizeByType(), Isis::DbProfile::count(), Isis::DatabaseFactory::create(), Isis::CSVReader::getColumnSummary(), Isis::DatabaseFactory::getProfile(), Isis::DbAccess::getProfile(), Isis::DatabaseFactory::isDriverAvailable(), Isis::Gruen::logError(), Isis::LroWideAngleCamera::LroWideAngleCamera(), and Isis::DbProfile::value().

◆ get() [2/2]

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
const T& Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::get ( const K &  key) const
inline

Const version returning the value associated with the given name.

Parameters
keyKey to fetch the value for
Returns
The value associated with the given name

Definition at line 583 of file CollectorMap.h.

◆ getNth() [1/2]

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
T& Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::getNth ( int  nth)
inline

Returns the nth value in the collection.

If the specifed value does not exist in the list, an out_of_range exception is thrown. Use size() to predetermine if the range is valid.

Parameters
nthReturn the Nth value in the list
Returns
T Value associated with name

Definition at line 624 of file CollectorMap.h.

Referenced by Isis::Gruen::AlgorithmStatistics(), Isis::DbProfile::DbProfile(), Isis::DbAccess::getProfile(), and Isis::LroWideAngleCamera::LroWideAngleCamera().

◆ getNth() [2/2]

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
const T& Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::getNth ( int  nth) const
inline

Returns the nth value in the collection.

If the specifed value does not exist in the list, an out_of_range exception is thrown. Use size() to predetermine if the range is valid.

Parameters
nthReturn the Nth value in the list
Returns
T Value associated with name

Definition at line 649 of file CollectorMap.h.

◆ index()

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
int Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::index ( const K &  key) const
inline

Returns the index of the first occuring element in the list.

This returns the index such that the getNth() methods would retrieve the element with key. For duplicate keys, it is garaunteed to return the first element. It will return -1 if the element is not in the list.

Parameters
keyKey to fetch the value for
Returns
int Zero-based index of (first) element with key. If it doesn't exist, -1 is returned.

Definition at line 604 of file CollectorMap.h.

◆ key()

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
const K& Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::key ( int  nth) const
inline

◆ operator=()

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
CollectorMap& Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::operator= ( const CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy > &  cmap)
inline

Assignment operator for the CollectorMap class object.

This object assignment operator is provided to properly handle the copying of CollectorMap elements to a new instantiation. This implements the CopyPolicy for each element in the cmap object to the current one. This is a two step operation: first destroy any elements that exist in the destination object (using the RemovalPolicy) and then copy all elements from the cmap object to the current one using the copy() method exposed in the CopyPolicy.

Parameters
cmapThe CollectorMap to be copied
Returns
Pointer to this CollectorMap

Definition at line 495 of file CollectorMap.h.

◆ remove()

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
int Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::remove ( const K &  key)
inline

Removes and entry from the list.

Parameters
keyName of key/value pair to remove from the list
Returns
int Number of elements erased

Definition at line 694 of file CollectorMap.h.

Referenced by Isis::CollectorMap< int, ErrorCounter >::add(), Isis::DatabaseFactory::remove(), Isis::DbProfile::remove(), and Isis::DatabaseFactory::selfDestruct().

◆ selfDestruct()

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
void Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::selfDestruct ( )
inlineprivate

Thourough destruction of list.

This method iterates through each element in the list applying the RemovalPolicy to each value in the map. It then clears the internal list for subsequent reuse if needed.

Definition at line 754 of file CollectorMap.h.

Referenced by Isis::CollectorMap< int, ErrorCounter >::operator=(), and Isis::CollectorMap< int, ErrorCounter >::~CollectorMap().

◆ size()

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
int Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::size ( ) const
inline

Member Data Documentation

◆ _keyPolicy

template<typename K , typename T , template< class > class ComparePolicy = SimpleCompare, template< class > class RemovalPolicy = NoopRemoval, template< class > class CopyPolicy = DefaultCopy>
KeyPolicy Isis::CollectorMap< K, T, ComparePolicy, RemovalPolicy, CopyPolicy >::_keyPolicy
private

◆ _list


The documentation for this class was generated from the following file:
Isis::CollectorMap::CollectorMap
CollectorMap()
Constructor.
Definition: CollectorMap.h:441