FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

Keyed< T > Class Template Reference

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

#include <OpenFOAM/Keyed.H>


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 59 of file Keyed.H.

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 > &)

Constructor & Destructor Documentation

Keyed (  ) [inline]

Construct null.

Definition at line 33 of file KeyedI.H.

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

Construct as a copy of item, with a key.

Definition at line 40 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 48 of file KeyedI.H.

Keyed ( Istream &   is  ) [inline]

Construct from Istream.

Definition at line 56 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 79 of file KeyedI.H.

References forAll, and List< T >::size().

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 93 of file KeyedI.H.

References Foam::abort(), Foam::FatalError, FatalErrorIn, forAll, Foam::nl, and List< T >::size().

Foam::label key (  ) const [inline]

Return const access to the integer key.

Definition at line 65 of file KeyedI.H.

Foam::label & key (  ) [inline]

Return non-const access to the integer key.

Definition at line 71 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