www.cemf.ir
anyList Class Reference
+ Collaboration diagram for anyList:

Public Types

using anyListType = List< std::any >
 
using reference = typename anyListType::reference
 
using iterator = typename anyListType::iterator
 
using const_iterator = typename anyListType::const_iterator
 

Public Member Functions

 TypeInfoNV ("anyList")
 
size_t size () const
 Size of container. More...
 
bool empty () const
 Is container empty. More...
 
bool contains (const word &name) const
 Does container contain this variable name? More...
 
const wordListnames () const
 List of varibales names. More...
 
template<typename T , typename... Args>
reference emplaceBack (const word &name, Args &&... args)
 Create variable using constructor in-place. More...
 
template<typename T >
reference emplaceBack (const word &name, const T &other)
 Create variable using copy constructor. More...
 
template<typename T >
reference emplaceBack (const word &name, T &&other)
 Create variable using move constructor. More...
 
template<typename T >
T & getObject (size_t i)
 Get the reference to variable by index. More...
 
template<typename T >
T & getObject (const word &name)
 Get the reference to variable by name. More...
 
template<typename T >
const T & getObject (const word &name) const
 Get the const reference to variable by name. More...
 
template<typename T >
const T & getObject (size_t i) const
 Get the const reference to object by index. More...
 
template<typename T >
T * getObjectPtr (size_t i)
 Get the pointer to variable by index. More...
 
template<typename T >
const T * getObjectPtr (size_t i) const
 Get the const pointer to variable by index. More...
 

Private Attributes

anyListType anyList_
 Contains a list of variables with any type. More...
 
wordList names_
 List of variable names in anyList_. More...
 
wordList types_
 

Detailed Description

Definition at line 35 of file anyList.hpp.

Member Typedef Documentation

◆ anyListType

using anyListType = List<std::any>

Definition at line 40 of file anyList.hpp.

◆ reference

Definition at line 42 of file anyList.hpp.

◆ iterator

using iterator = typename anyListType::iterator

Definition at line 44 of file anyList.hpp.

◆ const_iterator

Definition at line 46 of file anyList.hpp.

Member Function Documentation

◆ TypeInfoNV()

TypeInfoNV ( "anyList"  )

◆ size()

size_t size ( ) const

Size of container.

Definition at line 25 of file anyList.cpp.

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

Referenced by anyList::getObjectPtr().

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

◆ empty()

bool empty ( ) const

Is container empty.

Definition at line 30 of file anyList.cpp.

◆ contains()

bool contains ( const word name) const

Does container contain this variable name?

Definition at line 35 of file anyList.cpp.

Referenced by anyList::emplaceBack(), and internalField< realx3, void >::insert().

+ Here is the caller graph for this function:

◆ names()

const pFlow::wordList & names ( ) const

List of varibales names.

Definition at line 40 of file anyList.cpp.

◆ emplaceBack() [1/3]

◆ emplaceBack() [2/3]

reference emplaceBack ( const word name,
const T &  other 
)
inline

Create variable using copy constructor.

Definition at line 102 of file anyList.hpp.

References anyList::anyList_, anyList::contains(), pFlow::endl(), fatalErrorInFunction, fatalExit, pFlow::getTypeName(), anyList::names_, and anyList::types_.

+ Here is the call graph for this function:

◆ emplaceBack() [3/3]

reference emplaceBack ( const word name,
T &&  other 
)
inline

Create variable using move constructor.

Definition at line 118 of file anyList.hpp.

References anyList::anyList_, anyList::contains(), pFlow::endl(), fatalErrorInFunction, fatalExit, pFlow::getTypeName(), anyList::names_, and anyList::types_.

+ Here is the call graph for this function:

◆ getObject() [1/4]

T& getObject ( size_t  i)
inline

◆ getObject() [2/4]

T& getObject ( const word name)
inline

Get the reference to variable by name.

Definition at line 158 of file anyList.hpp.

References pFlow::endl(), fatalErrorInFunction, fatalExit, List< T >::findi(), and anyList::names_.

+ Here is the call graph for this function:

◆ getObject() [3/4]

const T& getObject ( const word name) const
inline

Get the const reference to variable by name.

Definition at line 173 of file anyList.hpp.

References pFlow::endl(), fatalErrorInFunction, fatalExit, List< T >::findi(), and anyList::names_.

+ Here is the call graph for this function:

◆ getObject() [4/4]

const T& getObject ( size_t  i) const
inline

Get the const reference to object by index.

Definition at line 188 of file anyList.hpp.

References anyList::anyList_, pFlow::endl(), fatalErrorInFunction, fatalExit, anyList::names_, List< T >::pos(), and anyList::types_.

+ Here is the call graph for this function:

◆ getObjectPtr() [1/2]

T* getObjectPtr ( size_t  i)
inline

Get the pointer to variable by index.

Definition at line 212 of file anyList.hpp.

References anyList::anyList_, pFlow::endl(), anyList::names_, List< T >::pos(), anyList::size(), anyList::types_, and warningInFunction.

+ Here is the call graph for this function:

◆ getObjectPtr() [2/2]

const T* getObjectPtr ( size_t  i) const
inline

Get the const pointer to variable by index.

Definition at line 238 of file anyList.hpp.

References anyList::anyList_, pFlow::endl(), anyList::names_, List< T >::pos(), anyList::size(), anyList::types_, and warningInFunction.

+ Here is the call graph for this function:

Member Data Documentation

◆ anyList_

anyListType anyList_
private

Contains a list of variables with any type.

Definition at line 51 of file anyList.hpp.

Referenced by anyList::emplaceBack(), anyList::getObject(), anyList::getObjectPtr(), and anyList::size().

◆ names_

wordList names_
private

List of variable names in anyList_.

Definition at line 54 of file anyList.hpp.

Referenced by anyList::emplaceBack(), anyList::getObject(), and anyList::getObjectPtr().

◆ types_

wordList types_
private

Definition at line 56 of file anyList.hpp.

Referenced by anyList::emplaceBack(), anyList::getObject(), and anyList::getObjectPtr().


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