Map< T > Class Template Reference

A HashTable to objects of type <T> with a label key. More...

Inheritance diagram for Map< T >:
[legend]

Public Types

typedef Map< Tthis_type
 The template instance used for this Map. More...
 
typedef HashTable< T, label, Hash< label > > parent_type
 The template instance used for the parent HashTable. More...
 
using iterator = typename parent_type::iterator
 
using const_iterator = typename parent_type::const_iterator
 

Public Member Functions

 Map ()
 Default construct with default table capacity. More...
 
 Map (const label size)
 Construct with given initial table capacity. More...
 
 Map (Istream &is)
 Construct from Istream with default table capacity. More...
 
 Map (const this_type &map)
 Copy construct. More...
 
 Map (this_type &&map)
 Move construct. More...
 
 Map (std::initializer_list< std::pair< label, T >> map)
 Construct from an initializer list. More...
 
void operator= (const this_type &rhs)
 Copy assignment. More...
 
void operator= (this_type &&rhs)
 Move assignment. More...
 
void operator= (const this_type &rhs)
 Copy assign. More...
 
void operator= (std::initializer_list< std::pair< Key, T >> rhs)
 Copy assign from an initializer list. More...
 
void operator= (this_type &&rhs)
 Move assign. More...
 

Detailed Description

template<class T>
class Foam::Map< T >

A HashTable to objects of type <T> with a label key.

Note
The Map contents are unordered. When the key order is important, use the sortedToc() method to obtain a list of sorted keys and use that for further access.
See also
PtrMap

Definition at line 69 of file lumpedPointController.H.

Member Typedef Documentation

◆ this_type

typedef Map<T> this_type

The template instance used for this Map.

Definition at line 64 of file Map.H.

◆ parent_type

typedef HashTable<T, label, Hash<label> > parent_type

The template instance used for the parent HashTable.

Definition at line 67 of file Map.H.

◆ iterator

using iterator = typename parent_type::iterator

Definition at line 69 of file Map.H.

◆ const_iterator

Definition at line 70 of file Map.H.

Constructor & Destructor Documentation

◆ Map() [1/6]

Map ( )
inline

Default construct with default table capacity.

Definition at line 76 of file Map.H.

◆ Map() [2/6]

Map ( const label  size)
inlineexplicit

Construct with given initial table capacity.

Definition at line 82 of file Map.H.

◆ Map() [3/6]

Map ( Istream is)
inline

Construct from Istream with default table capacity.

Definition at line 88 of file Map.H.

◆ Map() [4/6]

Map ( const this_type map)
inline

Copy construct.

Definition at line 94 of file Map.H.

◆ Map() [5/6]

Map ( this_type &&  map)
inline

Move construct.

Definition at line 100 of file Map.H.

◆ Map() [6/6]

Map ( std::initializer_list< std::pair< label, T >>  map)
inline

Construct from an initializer list.

Definition at line 106 of file Map.H.

Member Function Documentation

◆ operator=() [1/5]

void operator= ( const this_type rhs)
inline

Copy assignment.

Definition at line 117 of file Map.H.

Referenced by IOMap< T >::IOMap(), IOMap< T >::operator=(), distribution::operator=(), boundaryRegion::operator=(), and cellTable::operator=().

Here is the caller graph for this function:

◆ operator=() [2/5]

void operator= ( this_type &&  rhs)
inline

Move assignment.

Definition at line 123 of file Map.H.

◆ operator=() [3/5]

void operator=

Copy assign.

◆ operator=() [4/5]

void operator=

Copy assign from an initializer list.

Duplicate entries are handled by overwriting

Definition at line 796 of file HashTable.C.

◆ operator=() [5/5]

void operator=

Move assign.


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