Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
FixedList Class Reference

A 1D vector of objects of type <T> with a fixed length <N>. More...

Inheritance diagram for FixedList:
Inheritance graph
[legend]

Classes

struct  Hash
 
struct  hasher
 

Public Types

typedef T value_type
 
typedef Tpointer
 
typedef Treference
 
typedef Titerator
 
typedef label size_type
 
typedef label difference_type
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 

Public Member Functions

 FixedList ()=default
 
 FixedList (const T &val)
 
 FixedList (const Foam::zero)
 
 FixedList (const T list[N])
 
 FixedList (const FixedList< T, N > &list)
 
 FixedList (FixedList< T, N > &&list)
 
 FixedList (std::initializer_list< T > list)
 
 FixedList (const UList< T > &list)
 
template<unsigned AnyNum>
 FixedList (const FixedList< T, AnyNum > &list, const FixedList< label, N > &indices)
 
 FixedList (const UList< T > &list, const FixedList< label, N > &indices)
 
 FixedList (const SLList< T > &list)
 
 FixedList (Istream &is)
 
autoPtr< FixedList< T, N > > clone () const
 
const Tcdata () const noexcept
 
Tdata () noexcept
 
const char * cdata_bytes () const noexcept
 
char * data_bytes () noexcept
 
Tfirst () noexcept
 
const Tfirst () const noexcept
 
Tlast () noexcept
 
const Tlast () const noexcept
 
label fcIndex (const label i) const
 
const TfcValue (const label i) const
 
TfcValue (const label i)
 
label rcIndex (const label i) const
 
const TrcValue (const label i) const
 
TrcValue (const label i)
 
void checkStart (const label start) const
 
void checkSize (const label size) const
 
void checkIndex (const label i) const
 
bool uniform () const
 
label find (const T &val, label pos=0) const
 
label rfind (const T &val, label pos=-1) const
 
bool found (const T &val, label pos=0) const
 
void resize (const label n)
 
void resize_nocopy (const label n)
 
void setSize (const label n)
 
void fill (const T &val)
 
void fill (const Foam::zero)
 
void moveFirst (const label i)
 
void moveLast (const label i)
 
void swapFirst (const label i)
 
void swapLast (const label i)
 
void transfer (FixedList< T, N > &list)
 
Toperator[] (const label i)
 
const Toperator[] (const label i) const
 
void operator= (const T list[N])
 
void operator= (const UList< T > &list)
 
void operator= (const SLList< T > &list)
 
void operator= (std::initializer_list< T > list)
 
void operator= (const T &val)
 
void operator= (const Foam::zero)
 
void operator= (const FixedList< T, N > &list)
 
void operator= (FixedList< T, N > &&list)
 
iterator begin () noexcept
 
iterator end () noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
const_iterator begin () const noexcept
 
const_iterator end () const noexcept
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
void swap (FixedList< T, N > &other)
 
bool operator== (const FixedList< T, N > &list) const
 
bool operator!= (const FixedList< T, N > &list) const
 
bool operator< (const FixedList< T, N > &list) const
 
bool operator> (const FixedList< T, N > &list) const
 
bool operator<= (const FixedList< T, N > &list) const
 
bool operator>= (const FixedList< T, N > &list) const
 
IstreamreadList (Istream &is)
 
void writeEntry (const word &keyword, Ostream &os) const
 
OstreamwriteList (Ostream &os, const label shortLen=0) const
 

Static Public Member Functions

static const FixedList< T, N > & null ()
 
static std::streamsize size_bytes () noexcept
 
static std::streamsize byteSize ()
 
static constexpr bool empty () noexcept
 
static constexpr label size () noexcept
 
static constexpr unsigned max_size () noexcept
 

Public Attributes

const typedef Tconst_pointer
 
const typedef Tconst_reference
 
const typedef Tconst_iterator
 

Protected Member Functions

void writeEntry (Ostream &os) const
 

Friends

Istreamoperator>> (Istream &is, FixedList< T, N > &list)
 

Detailed Description

A 1D vector of objects of type <T> with a fixed length <N>.

Source files

Definition at line 100 of file HashTable.H.

Member Typedef Documentation

◆ value_type

typedef T value_type

Definition at line 103 of file FixedList.H.

◆ pointer

typedef T* pointer

Definition at line 106 of file FixedList.H.

◆ reference

typedef T& reference

Definition at line 112 of file FixedList.H.

◆ iterator

typedef T* iterator

Definition at line 118 of file FixedList.H.

◆ size_type

typedef label size_type

Definition at line 124 of file FixedList.H.

◆ difference_type

typedef label difference_type

Definition at line 127 of file FixedList.H.

◆ reverse_iterator

typedef std::reverse_iterator<iterator> reverse_iterator

Definition at line 130 of file FixedList.H.

◆ const_reverse_iterator

typedef std::reverse_iterator<const_iterator> const_reverse_iterator

Definition at line 133 of file FixedList.H.

Constructor & Destructor Documentation

◆ FixedList() [1/12]

FixedList ( )
default

◆ FixedList() [2/12]

FixedList ( const T val)
inlineexplicit

Definition at line 38 of file FixedListI.H.

◆ FixedList() [3/12]

FixedList ( const Foam::zero  )
inlineexplicit

Definition at line 45 of file FixedListI.H.

◆ FixedList() [4/12]

FixedList ( const T  list[N])
inlineexplicit

Definition at line 52 of file FixedListI.H.

◆ FixedList() [5/12]

FixedList ( const FixedList< T, N > &  list)
inline

Definition at line 62 of file FixedListI.H.

◆ FixedList() [6/12]

FixedList ( FixedList< T, N > &&  list)
inline

Definition at line 72 of file FixedListI.H.

◆ FixedList() [7/12]

FixedList ( std::initializer_list< T list)
inline

Definition at line 82 of file FixedListI.H.

◆ FixedList() [8/12]

FixedList ( const UList< T > &  list)
inlineexplicit

Definition at line 96 of file FixedListI.H.

◆ FixedList() [9/12]

FixedList ( const FixedList< T, AnyNum > &  list,
const FixedList< label, N > &  indices 
)
inline

Definition at line 110 of file FixedListI.H.

◆ FixedList() [10/12]

FixedList ( const UList< T > &  list,
const FixedList< label, N > &  indices 
)
inline

Definition at line 124 of file FixedListI.H.

◆ FixedList() [11/12]

FixedList ( const SLList< T > &  list)
inlineexplicit

Definition at line 137 of file FixedListI.H.

◆ FixedList() [12/12]

FixedList ( Istream is)
explicit

Definition at line 44 of file FixedListIO.C.

Member Function Documentation

◆ writeEntry() [1/2]

void writeEntry ( Ostream os) const
protected

Definition at line 30 of file FixedListIO.C.

◆ null()

const Foam::FixedList< T, N > & null ( )
inlinestatic

Definition at line 29 of file FixedListI.H.

◆ clone()

Foam::autoPtr< Foam::FixedList< T, N > > clone ( ) const
inline

Definition at line 152 of file FixedListI.H.

◆ cdata()

const T * cdata ( ) const
inlinenoexcept

Definition at line 162 of file FixedListI.H.

◆ data()

T * data ( )
inlinenoexcept

Definition at line 170 of file FixedListI.H.

◆ cdata_bytes()

const char * cdata_bytes ( ) const
inlinenoexcept

Definition at line 178 of file FixedListI.H.

Referenced by FixedList< Type, 3 >::writeList().

Here is the caller graph for this function:

◆ data_bytes()

char * data_bytes ( )
inlinenoexcept

Definition at line 186 of file FixedListI.H.

Referenced by FixedList< Type, 3 >::readList().

Here is the caller graph for this function:

◆ first() [1/2]

T& first ( )
inlinenoexcept

◆ first() [2/2]

const T& first ( ) const
inlinenoexcept

◆ last() [1/2]

T& last ( )
inlinenoexcept

◆ last() [2/2]

const T& last ( ) const
inlinenoexcept

◆ size_bytes()

std::streamsize size_bytes ( )
inlinestaticnoexcept

Definition at line 193 of file FixedListI.H.

Referenced by FixedList< Type, 3 >::readList(), and FixedList< Type, 3 >::writeList().

Here is the caller graph for this function:

◆ byteSize()

std::streamsize byteSize ( )
static

Definition at line 28 of file FixedList.C.

◆ fcIndex()

Foam::label fcIndex ( const label  i) const
inline

Definition at line 228 of file FixedListI.H.

Referenced by wallBoundedParticle::isTriAlongTrack(), and wallBoundedParticle::trackFaceTri().

Here is the caller graph for this function:

◆ fcValue() [1/2]

const T & fcValue ( const label  i) const
inline

Definition at line 235 of file FixedListI.H.

◆ fcValue() [2/2]

T & fcValue ( const label  i)
inline

Definition at line 242 of file FixedListI.H.

◆ rcIndex()

Foam::label rcIndex ( const label  i) const
inline

Definition at line 249 of file FixedListI.H.

◆ rcValue() [1/2]

const T & rcValue ( const label  i) const
inline

Definition at line 256 of file FixedListI.H.

◆ rcValue() [2/2]

T & rcValue ( const label  i)
inline

Definition at line 263 of file FixedListI.H.

◆ checkStart()

void checkStart ( const label  start) const
inline

Definition at line 270 of file FixedListI.H.

◆ checkSize()

void checkSize ( const label  size) const
inline

Definition at line 283 of file FixedListI.H.

Referenced by FixedList< Type, 3 >::readList().

Here is the caller graph for this function:

◆ checkIndex()

void checkIndex ( const label  i) const
inline

Definition at line 295 of file FixedListI.H.

◆ uniform()

bool uniform ( ) const
inline

Definition at line 307 of file FixedListI.H.

◆ find()

Foam::label find ( const T val,
label  pos = 0 
) const

Definition at line 43 of file FixedList.C.

Referenced by triFace::which().

Here is the caller graph for this function:

◆ rfind()

Foam::label rfind ( const T val,
label  pos = -1 
) const

Definition at line 65 of file FixedList.C.

◆ found()

bool found ( const T val,
label  pos = 0 
) const
inline

Definition at line 325 of file FixedListI.H.

Referenced by wallBoundedParticle::isTriAlongTrack().

Here is the caller graph for this function:

◆ resize()

void resize ( const label  n)
inline

Definition at line 335 of file FixedListI.H.

Referenced by FixedList< Type, 3 >::setSize().

Here is the caller graph for this function:

◆ resize_nocopy()

void resize_nocopy ( const label  n)
inline

Definition at line 344 of file FixedListI.H.

◆ setSize()

void setSize ( const label  n)
inline

Definition at line 300 of file FixedList.H.

Referenced by blockDescriptor::facePoints(), refinementHistory::refinementHistory(), refinementSurfaces::refinementSurfaces(), and shellSurfaces::shellSurfaces().

Here is the caller graph for this function:

◆ fill() [1/2]

void fill ( const T val)
inline

Definition at line 353 of file FixedListI.H.

◆ fill() [2/2]

void fill ( const Foam::zero  )
inline

Definition at line 363 of file FixedListI.H.

◆ moveFirst()

void moveFirst ( const label  i)

Definition at line 90 of file FixedList.C.

◆ moveLast()

void moveLast ( const label  i)

Definition at line 102 of file FixedList.C.

◆ swapFirst()

void swapFirst ( const label  i)

Definition at line 114 of file FixedList.C.

◆ swapLast()

void swapLast ( const label  i)

Definition at line 126 of file FixedList.C.

◆ transfer()

void transfer ( FixedList< T, N > &  list)
inline

Definition at line 388 of file FixedListI.H.

◆ operator[]() [1/2]

T & operator[] ( const label  i)
inline

Definition at line 405 of file FixedListI.H.

◆ operator[]() [2/2]

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

Definition at line 415 of file FixedListI.H.

◆ operator=() [1/8]

void operator= ( const T  list[N])
inline

Definition at line 425 of file FixedListI.H.

Referenced by boolVector::operator=().

Here is the caller graph for this function:

◆ operator=() [2/8]

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

Definition at line 434 of file FixedListI.H.

◆ operator=() [3/8]

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

Definition at line 445 of file FixedListI.H.

◆ operator=() [4/8]

void operator= ( std::initializer_list< T list)
inline

Definition at line 458 of file FixedListI.H.

◆ operator=() [5/8]

void operator= ( const T val)
inline

Definition at line 471 of file FixedListI.H.

◆ operator=() [6/8]

void operator= ( const Foam::zero  )
inline

Definition at line 478 of file FixedListI.H.

◆ operator=() [7/8]

void operator= ( const FixedList< T, N > &  list)
inline

Definition at line 485 of file FixedListI.H.

◆ operator=() [8/8]

void operator= ( FixedList< T, N > &&  list)
inline

Definition at line 499 of file FixedListI.H.

◆ begin() [1/2]

iterator begin ( )
inlinenoexcept

◆ end() [1/2]

iterator end ( )
inlinenoexcept

◆ cbegin()

Foam::FixedList< T, N >::const_iterator cbegin ( ) const
inlinenoexcept

Definition at line 533 of file FixedListI.H.

Referenced by HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::erase().

Here is the caller graph for this function:

◆ cend()

Foam::FixedList< T, N >::const_iterator cend ( ) const
inlinenoexcept

Definition at line 557 of file FixedListI.H.

Referenced by HashTable< Foam::autoPtr< Foam::interfaceCompositionModel > >::erase().

Here is the caller graph for this function:

◆ begin() [2/2]

const_iterator begin ( ) const
inlinenoexcept

◆ end() [2/2]

const_iterator end ( ) const
inlinenoexcept

◆ rbegin() [1/2]

Foam::FixedList< T, N >::reverse_iterator rbegin ( )
inline

Definition at line 565 of file FixedListI.H.

◆ rend() [1/2]

Foam::FixedList< T, N >::reverse_iterator rend ( )
inline

Definition at line 589 of file FixedListI.H.

◆ crbegin()

Foam::FixedList< T, N >::const_reverse_iterator crbegin ( ) const
inline

Definition at line 581 of file FixedListI.H.

◆ crend()

Foam::FixedList< T, N >::const_reverse_iterator crend ( ) const
inline

Definition at line 605 of file FixedListI.H.

◆ rbegin() [2/2]

Foam::FixedList< T, N >::const_reverse_iterator rbegin ( ) const
inline

Definition at line 573 of file FixedListI.H.

◆ rend() [2/2]

Foam::FixedList< T, N >::const_reverse_iterator rend ( ) const
inline

Definition at line 597 of file FixedListI.H.

◆ empty()

static constexpr bool empty ( )
inlinestaticconstexprnoexcept

Definition at line 409 of file FixedList.H.

◆ size()

static constexpr label size ( )
inlinestaticconstexprnoexcept

◆ max_size()

static constexpr unsigned max_size ( )
inlinestaticconstexprnoexcept

Definition at line 415 of file FixedList.H.

◆ swap()

void swap ( FixedList< T, N > &  other)
inline

Definition at line 373 of file FixedListI.H.

◆ operator==()

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

Definition at line 142 of file FixedList.C.

◆ operator!=()

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

Definition at line 186 of file FixedList.C.

◆ operator<()

bool operator< ( const FixedList< T, N > &  list) const

Definition at line 162 of file FixedList.C.

◆ operator>()

bool operator> ( const FixedList< T, N > &  list) const

Definition at line 193 of file FixedList.C.

◆ operator<=()

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

Definition at line 200 of file FixedList.C.

◆ operator>=()

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

Definition at line 207 of file FixedList.C.

◆ readList()

Foam::Istream & readList ( Istream is)

Definition at line 141 of file FixedListIO.C.

◆ writeEntry() [2/2]

void writeEntry ( const word keyword,
Ostream os 
) const

Definition at line 54 of file FixedListIO.C.

◆ writeList()

Foam::Ostream & writeList ( Ostream os,
const label  shortLen = 0 
) const

Definition at line 70 of file FixedListIO.C.

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream is,
FixedList< T, N > &  list 
)
friend

Definition at line 549 of file FixedList.H.

Member Data Documentation

◆ const_pointer

const typedef T* const_pointer

Definition at line 109 of file FixedList.H.

◆ const_reference

const typedef T& const_reference

Definition at line 115 of file FixedList.H.

◆ const_iterator

const typedef T* const_iterator

Definition at line 121 of file FixedList.H.


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