OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

Keyed< T > Class Template Reference

A container with an integer key attached to any item. More...

Collaboration diagram for Keyed< T >:

List of all members.


Public Member Functions

 Keyed ()
 Construct null.
 Keyed (const T &item, const label key=0)
 Construct as a copy of item, with a key.
 Keyed (const Xfer< T > &item, const label key=0)
 Construct by transferring the item, with a key.
 Keyed (Istream &)
 Construct from Istream.
label key () const
 Return const access to the integer key.
label & key ()
 Return non-const access to the integer key.

Static Public Member Functions

static List< Keyed< T > > createList (const List< T > &, const label key=0)
 Add labels to a list of values.
static List< Keyed< T > > createList (const List< T > &, const List< label > &keys)
 Add labels to a list of values.

Friends

Istream & operator>> (Istream &, Keyed< T > &)
Ostream & operator (Ostream &, const Keyed< T > &)

Detailed Description

template<class T>
class Foam::Keyed< T >

A container with an integer key attached to any item.

The key can useful for sorting.

Source files

Definition at line 54 of file Keyed.H.


Constructor & Destructor Documentation

Keyed (  )  [inline]

Construct null.

Definition at line 25 of file KeyedI.H.

Referenced by Keyed< T >::createList().

Here is the caller graph for this function:

Keyed ( const T &  item,
const label  key = 0 
) [inline]

Construct as a copy of item, with a key.

Definition at line 32 of file KeyedI.H.

Keyed ( const Xfer< T > &  item,
const label  key = 0 
) [inline]

Construct by transferring the item, with a key.

Definition at line 40 of file KeyedI.H.

Keyed ( Istream &  is  )  [inline]

Construct from Istream.

Definition at line 48 of file KeyedI.H.


Member Function Documentation

Foam::List< Foam::Keyed< T > > createList ( const List< T > &  lst,
const label  key = 0 
) [inline, static]

Add labels to a list of values.

Definition at line 71 of file KeyedI.H.

Foam::List< Foam::Keyed< T > > createList ( const List< T > &  lst,
const List< label > &  keys 
) [inline, static]

Add labels to a list of values.

Definition at line 85 of file KeyedI.H.

References Keyed< T >::Keyed().

Here is the call graph for this function:

Foam::label key (  )  const [inline]

Return const access to the integer key.

Definition at line 57 of file KeyedI.H.

Foam::label & key (  )  [inline]

Return non-const access to the integer key.

Definition at line 63 of file KeyedI.H.


Friends And Related Function Documentation

Istream& operator>> ( Istream &  ,
Keyed< T > &   
) [friend]

Ostream& operator ( Ostream &  ,
const Keyed< T > &   
) [friend]


The documentation for this class was generated from the following files:
  • src/OpenFOAM/containers/Identifiers/Keyed/Keyed.H
  • src/OpenFOAM/containers/Identifiers/Keyed/KeyedI.H
Copyright © 2000-2009 OpenCFD Ltd