Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
IndirectListBase< T, Addr > Class Template Reference

Base for lists with indirect addressing, templated on the list contents type and the addressing type. Storage for both values and addressing is held outside of the class. More...

Classes

class  const_iterator
 
class  iterator
 

Public Types

typedef T value_type
 
typedef Tpointer
 
typedef Treference
 
typedef label size_type
 
typedef label difference_type
 
typedef Addr addressing_type
 

Public Member Functions

 IndirectListBase ()=delete
 
 IndirectListBase (const UList< T > &values, const Addr &addr)
 
label size () const noexcept
 
bool empty () const noexcept
 
const UList< T > & values () const noexcept
 
UList< T > & values () noexcept
 
const Addr & addressing () const noexcept
 
bool uniform () const
 
const Tfirst () const
 
Tfirst ()
 
const Tlast () const
 
Tlast ()
 
label fcIndex (const label i) const
 
label rcIndex (const label i) const
 
const TfcValue (const label i) const
 
TfcValue (const label i)
 
const TrcValue (const label i) const
 
TrcValue (const label i)
 
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
 
List< Toperator() () const
 
Toperator[] (const label i)
 
const Toperator[] (const label i) const
 
void operator= (const T &val)
 
void operator= (const Foam::zero)
 
void operator= (const UList< T > &rhs)
 
void operator= (const IndirectListBase< T, Addr > &rhs)
 
template<class AnyAddr >
void operator= (const IndirectListBase< T, AnyAddr > &rhs)
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_iterator begin () const
 
const_iterator end () const
 
OstreamwriteList (Ostream &os, const label shortLen=0) const
 

Public Attributes

const typedef Tconst_pointer
 
const typedef Tconst_reference
 

Protected Member Functions

template<class ListType >
void copyList (const ListType &rhs)
 

Detailed Description

template<class T, class Addr>
class Foam::IndirectListBase< T, Addr >

Base for lists with indirect addressing, templated on the list contents type and the addressing type. Storage for both values and addressing is held outside of the class.

Source files

Definition at line 52 of file IndirectListBase.H.

Member Typedef Documentation

◆ value_type

typedef T value_type

Definition at line 77 of file IndirectListBase.H.

◆ pointer

typedef T* pointer

Definition at line 80 of file IndirectListBase.H.

◆ reference

typedef T& reference

Definition at line 86 of file IndirectListBase.H.

◆ size_type

typedef label size_type

Definition at line 92 of file IndirectListBase.H.

◆ difference_type

typedef label difference_type

Definition at line 95 of file IndirectListBase.H.

◆ addressing_type

typedef Addr addressing_type

Definition at line 101 of file IndirectListBase.H.

Constructor & Destructor Documentation

◆ IndirectListBase() [1/2]

IndirectListBase ( )
delete

◆ IndirectListBase() [2/2]

IndirectListBase ( const UList< T > &  values,
const Addr &  addr 
)
inline

Definition at line 58 of file IndirectListBaseI.H.

Member Function Documentation

◆ copyList()

void copyList ( const ListType &  rhs)
inlineprotected

Definition at line 25 of file IndirectListBaseI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ size()

label size ( ) const
inlinenoexcept

◆ empty()

bool empty ( ) const
inlinenoexcept

Definition at line 127 of file IndirectListBase.H.

◆ values() [1/2]

const UList<T>& values ( ) const
inlinenoexcept

Definition at line 133 of file IndirectListBase.H.

◆ values() [2/2]

UList<T>& values ( )
inlinenoexcept

Definition at line 139 of file IndirectListBase.H.

◆ addressing()

const Addr& addressing ( ) const
inlinenoexcept

Definition at line 145 of file IndirectListBase.H.

◆ uniform()

bool uniform
inline

Definition at line 71 of file IndirectListBaseI.H.

References T.

Referenced by IndirectListBase< T, Addr >::writeList().

Here is the caller graph for this function:

◆ first() [1/2]

T & first
inline

Definition at line 120 of file IndirectListBaseI.H.

◆ first() [2/2]

T& first ( )
inline

◆ last() [1/2]

T & last
inline

Definition at line 133 of file IndirectListBaseI.H.

◆ last() [2/2]

T& last ( )
inline

◆ fcIndex()

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

Definition at line 106 of file IndirectListBaseI.H.

◆ rcIndex()

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

Definition at line 113 of file IndirectListBaseI.H.

◆ fcValue() [1/2]

const T & fcValue ( const label  i) const
inline

Definition at line 146 of file IndirectListBaseI.H.

◆ fcValue() [2/2]

T & fcValue ( const label  i)
inline

Definition at line 153 of file IndirectListBaseI.H.

◆ rcValue() [1/2]

const T & rcValue ( const label  i) const
inline

Definition at line 160 of file IndirectListBaseI.H.

◆ rcValue() [2/2]

T & rcValue ( const label  i)
inline

Definition at line 167 of file IndirectListBaseI.H.

◆ find()

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

Definition at line 25 of file IndirectListBase.C.

References List_CONST_ACCESS, Foam::pos(), and T.

Here is the call graph for this function:

◆ rfind()

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

Definition at line 53 of file IndirectListBase.C.

References List_CONST_ACCESS, Foam::pos(), and T.

Here is the call graph for this function:

◆ found()

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

Definition at line 96 of file IndirectListBaseI.H.

References Foam::ListOps::find(), and Foam::pos().

Here is the call graph for this function:

◆ operator()()

Foam::List< T > operator()
inline

Definition at line 177 of file IndirectListBaseI.H.

◆ operator[]() [1/2]

T & operator[] ( const label  i)
inline

Definition at line 194 of file IndirectListBaseI.H.

◆ operator[]() [2/2]

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

Definition at line 202 of file IndirectListBaseI.H.

◆ operator=() [1/5]

void operator= ( const T val)
inline

Definition at line 209 of file IndirectListBaseI.H.

◆ operator=() [2/5]

void operator= ( const Foam::zero  )
inline

Definition at line 220 of file IndirectListBaseI.H.

References Foam::Zero.

◆ operator=() [3/5]

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

Definition at line 232 of file IndirectListBaseI.H.

◆ operator=() [4/5]

void operator= ( const IndirectListBase< T, Addr > &  rhs)
inline

Definition at line 242 of file IndirectListBaseI.H.

◆ operator=() [5/5]

void operator= ( const IndirectListBase< T, AnyAddr > &  rhs)
inline

Definition at line 253 of file IndirectListBaseI.H.

◆ begin() [1/2]

iterator begin ( )
inline

Definition at line 336 of file IndirectListBase.H.

References UList::cbegin().

Referenced by bitSet::bitSet(), HashSet< word, Hash< word > >::HashSet(), HashSet< word, Hash< word > >::insert(), bitSet::set(), HashSet< word, Hash< word > >::unset(), and bitSet::unset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ end() [1/2]

iterator end ( )
inline

Definition at line 342 of file IndirectListBase.H.

References UList::cend().

Referenced by bitSet::bitSet(), HashSet< word, Hash< word > >::HashSet(), HashSet< word, Hash< word > >::insert(), bitSet::set(), HashSet< word, Hash< word > >::unset(), and bitSet::unset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cbegin()

const_iterator cbegin ( ) const
inline

Definition at line 351 of file IndirectListBase.H.

References UList::cbegin().

Referenced by IndirectListBase< T, Addr >::begin().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cend()

const_iterator cend ( ) const
inline

Definition at line 357 of file IndirectListBase.H.

References UList::cend().

Referenced by IndirectListBase< T, Addr >::end().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ begin() [2/2]

const_iterator begin ( ) const
inline

Definition at line 363 of file IndirectListBase.H.

References IndirectListBase< T, Addr >::cbegin().

Here is the call graph for this function:

◆ end() [2/2]

const_iterator end ( ) const
inline

Definition at line 369 of file IndirectListBase.H.

References IndirectListBase< T, Addr >::cend().

Here is the call graph for this function:

◆ writeList()

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

Definition at line 31 of file IndirectListBaseIO.C.

References FUNCTION_NAME, Foam::nl, os(), IndirectListBase< T, Addr >::size(), T, and IndirectListBase< T, Addr >::uniform().

Referenced by Foam::operator<<().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ const_pointer

const typedef T* const_pointer

Definition at line 83 of file IndirectListBase.H.

◆ const_reference

const typedef T& const_reference

Definition at line 89 of file IndirectListBase.H.


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