OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

FixedList Class Template Reference

Inheritance diagram for FixedList:

Inheritance graph
[legend]
Collaboration diagram for FixedList:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T, label Size>
class Foam::FixedList< T, Size >

Definition at line 76 of file FixedList.H.


Public Types

typedef T value_type
 Type of values the FixedList contains.
typedef T & reference
 Type that can be used for storing into.
typedef const T & const_reference
 Type that can be used for storing into.
typedef label difference_type
 The type that can represent the difference between any two.
typedef label size_type
 The type that can represent the size of a FixedList.
typedef T * iterator
 Random access iterator for traversing FixedList.
typedef const T * const_iterator
 Random access iterator for traversing FixedList.
typedef T * reverse_iterator
 Reverse iterator for reverse traversal of FixedList.
typedef const T * const_reverse_iterator
 Reverse iterator for reverse traversal of constant FixedList.

Public Member Functions

 FixedList ()
 Null constructor.
 FixedList (const T v[Size])
 Construct from components.
 FixedList (const T &)
 Construct from value.
 FixedList (const UList< T > &)
 Construct from UList.
 FixedList (const SLList< T > &)
 Construct from SLList.
 FixedList (const FixedList< T, Size > &)
 Copy constructor.
 FixedList (Istream &)
 Construct from Istream.
autoPtr< FixedList< T, Size > > clone () const
 Clone.
label fcIndex (const label i) const
 Return the forward circular index, i.e. the next index.
label rcIndex (const label i) const
 Return the reverse circular index, i.e. the previous index.
void checkStart (const label start) const
 Check start is within valid range (0 ... size-1).
void checkSize (const label size) const
 Check size is within valid range (0 ... size).
void checkIndex (const label i) const
 Check index i is within valid range (0 ... size-1).
void setSize (const label)
 Dummy setSize function.
void writeEntry (Ostream &os) const
 Write the FixedList as a dictionary entry.
void writeEntry (const word &keyword, Ostream &os) const
 Write the FixedList as a dictionary entry with keyword.
T & operator[] (const label)
 Return subscript-checked element of FixedList.
const T & operator[] (const label) const
 Return subscript-checked element of constant FixedList.
void operator= (const T v[Size])
 Assignment from array operator. Takes linear time.
void operator= (const UList< T > &)
 Assignment from UList operator. Takes linear time.
void operator= (const SLList< T > &)
 Assignment from SLList operator. Takes linear time.
void operator= (const T &)
 Assignment of all entries to the given value.
iterator begin ()
 Return an iterator to begin traversing the FixedList.
iterator end ()
 Return an iterator to end traversing the FixedList.
const_iterator begin () const
 Return a const_iterator to begin traversing the.
const_iterator end () const
 Return a const_iterator to end traversing the.
reverse_iterator rbegin ()
 Return a reverse_iterator to begin reverse traversing the.
reverse_iterator rend ()
 Return a reverse_iterator to end reverse traversing the.
const_reverse_iterator rbegin () const
 Return a const_reverse_iterator to begin reverse traversing the.
const_reverse_iterator rend () const
 Return a const_reverse_iterator to end reverse traversing the.
label size () const
 Return the number of elements in the FixedList.
label max_size () const
 Return size of the largest possible FixedList.
bool empty () const
 Return true if the FixedList is empty (i.e., if size() == 0).
void swap (FixedList< T, Size > &)
 Swap two FixedLists of the same type in constant time.
bool operator== (const FixedList< T, Size > &) const
 Equality operation on FixedLists of the same type.
bool operator!= (const FixedList< T, Size > &) const
 The opposite of the equality operation. Takes linear time.
bool operator< (const FixedList< T, Size > &) const
 Compare two FixedLists lexicographically. Takes linear time.
bool operator> (const FixedList< T, Size > &) const
 Compare two FixedLists lexicographically. Takes linear time.
bool operator<= (const FixedList< T, Size > &) const
 Return true if !(a > b). Takes linear time.
bool operator>= (const FixedList< T, Size > &) const
 Return true if !(a < b). Takes linear time.

Static Public Member Functions

static FixedList< T, Size > & null ()
 Return a null FixedList.

Friends

Istream & operator>> (Istream &, FixedList< T, Size > &)
 Read List from Istream, discarding contents of existing List.
Ostream & operator (Ostream &, const FixedList< T, Size > &)

Classes

class  Hash
 Hashing function class. More...

Member Typedef Documentation

typedef T value_type

Type of values the FixedList contains.

Definition at line 208 of file FixedList.H.

typedef T& reference

Type that can be used for storing into.

FixedList::value_type objects.

Definition at line 214 of file FixedList.H.

typedef const T& const_reference

Type that can be used for storing into.

constant FixedList::value_type objects

Definition at line 220 of file FixedList.H.

The type that can represent the difference between any two.

FixedList iterator objects.

Definition at line 226 of file FixedList.H.

typedef label size_type

The type that can represent the size of a FixedList.

Definition at line 229 of file FixedList.H.

typedef T* iterator

Random access iterator for traversing FixedList.

Definition at line 235 of file FixedList.H.

typedef const T* const_iterator

Random access iterator for traversing FixedList.

Definition at line 247 of file FixedList.H.

typedef T* reverse_iterator

Reverse iterator for reverse traversal of FixedList.

Definition at line 265 of file FixedList.H.

typedef const T* const_reverse_iterator

Reverse iterator for reverse traversal of constant FixedList.

Definition at line 283 of file FixedList.H.


Constructor & Destructor Documentation

FixedList (  )  [inline]

Null constructor.

Definition at line 43 of file FixedListI.H.

FixedList ( const T  v[Size]  )  [inline]

Construct from components.

Definition at line 47 of file FixedListI.H.

FixedList ( const T &   )  [inline]

Construct from value.

Definition at line 56 of file FixedListI.H.

FixedList ( const UList< T > &   )  [inline]

Construct from UList.

Definition at line 65 of file FixedListI.H.

FixedList ( const SLList< T > &   )  [inline]

Construct from SLList.

Definition at line 76 of file FixedListI.H.

FixedList ( const FixedList< T, Size > &   )  [inline]

Copy constructor.

Definition at line 93 of file FixedListI.H.

FixedList ( Istream &   ) 

Construct from Istream.


Member Function Documentation

autoPtr< FixedList< T, Size > > clone (  )  const [inline]

Clone.

Definition at line 102 of file FixedListI.H.

static FixedList<T, Size>& null (  )  [static]

Return a null FixedList.

label fcIndex ( const label  i  )  const [inline]

Return the forward circular index, i.e. the next index.

which returns to the first at the end of the list

Definition at line 111 of file FixedListI.H.

label rcIndex ( const label  i  )  const [inline]

Return the reverse circular index, i.e. the previous index.

which returns to the last at the begining of the list

Definition at line 118 of file FixedListI.H.

References FatalErrorIn.

void checkStart ( const label  start  )  const [inline]

Check start is within valid range (0 ... size-1).

Definition at line 126 of file FixedListI.H.

void checkSize ( const label  size  )  const [inline]

Check size is within valid range (0 ... size).

Definition at line 139 of file FixedListI.H.

void checkIndex ( const label  i  )  const [inline]

Check index i is within valid range (0 ... size-1).

Definition at line 152 of file FixedListI.H.

void setSize ( const   label  )  [inline]

Dummy setSize function.

needed to make FixedList consistent with List

Definition at line 170 of file FixedListI.H.

void writeEntry ( Ostream &  os  )  const

Write the FixedList as a dictionary entry.

void writeEntry ( const word &  keyword,
Ostream &  os 
) const

Write the FixedList as a dictionary entry with keyword.

T & operator[] ( const   label  )  [inline]

Return subscript-checked element of FixedList.

Definition at line 182 of file FixedListI.H.

Referenced by edge::edge(), triFace::mag(), triFace::nEdges(), tetCell::tetCell(), and triFace::triFace().

Here is the caller graph for this function:

const T & operator[] ( const   label  )  const [inline]

Return subscript-checked element of constant FixedList.

Definition at line 193 of file FixedListI.H.

void operator= ( const T  v[Size]  )  [inline]

Assignment from array operator. Takes linear time.

Definition at line 203 of file FixedListI.H.

void operator= ( const UList< T > &   )  [inline]

Assignment from UList operator. Takes linear time.

Definition at line 212 of file FixedListI.H.

void operator= ( const SLList< T > &   )  [inline]

Assignment from SLList operator. Takes linear time.

Definition at line 223 of file FixedListI.H.

void operator= ( const T &   )  [inline]

Assignment of all entries to the given value.

Definition at line 240 of file FixedListI.H.

FixedList< T, Size >::iterator begin (  )  [inline]

Return an iterator to begin traversing the FixedList.

Definition at line 253 of file FixedListI.H.

FixedList< T, Size >::iterator end (  )  [inline]

Return an iterator to end traversing the FixedList.

Reimplemented in edge.

Definition at line 269 of file FixedListI.H.

FixedList< T, Size >::const_iterator begin (  )  const [inline]

Return a const_iterator to begin traversing the.

constant FixedList.

Definition at line 261 of file FixedListI.H.

FixedList< T, Size >::const_iterator end (  )  const [inline]

Return a const_iterator to end traversing the.

constant FixedList.

Reimplemented in edge.

Definition at line 277 of file FixedListI.H.

FixedList< T, Size >::iterator rbegin (  )  [inline]

Return a reverse_iterator to begin reverse traversing the.

FixedList.

Definition at line 284 of file FixedListI.H.

FixedList< T, Size >::iterator rend (  )  [inline]

Return a reverse_iterator to end reverse traversing the.

FixedList.

Definition at line 300 of file FixedListI.H.

FixedList< T, Size >::const_iterator rbegin (  )  const [inline]

Return a const_reverse_iterator to begin reverse traversing the.

FixedList.

Definition at line 292 of file FixedListI.H.

FixedList< T, Size >::const_iterator rend (  )  const [inline]

Return a const_reverse_iterator to end reverse traversing the.

FixedList.

Definition at line 308 of file FixedListI.H.

label size (  )  const [inline]

Return the number of elements in the FixedList.

Definition at line 315 of file FixedListI.H.

label max_size (  )  const [inline]

Return size of the largest possible FixedList.

Definition at line 322 of file FixedListI.H.

bool empty (  )  const [inline]

Return true if the FixedList is empty (i.e., if size() == 0).

Definition at line 329 of file FixedListI.H.

void swap ( FixedList< T, Size > &   ) 

Swap two FixedLists of the same type in constant time.

bool operator== ( const FixedList< T, Size > &   )  const

Equality operation on FixedLists of the same type.

Returns true when the FixedLists are elementwise equal (using FixedList::value_type::operator==). Takes linear time.

bool operator!= ( const FixedList< T, Size > &   )  const

The opposite of the equality operation. Takes linear time.

bool operator< ( const FixedList< T, Size > &   )  const

Compare two FixedLists lexicographically. Takes linear time.

bool operator> ( const FixedList< T, Size > &   )  const

Compare two FixedLists lexicographically. Takes linear time.

bool operator<= ( const FixedList< T, Size > &   )  const

Return true if !(a > b). Takes linear time.

bool operator>= ( const FixedList< T, Size > &   )  const

Return true if !(a < b). Takes linear time.


Friends And Related Function Documentation

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

Read List from Istream, discarding contents of existing List.

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


The documentation for this class was generated from the following files: Copyright © 2000-2007 OpenCFD Ltd