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 wordList & | names () 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_ |
Definition at line 35 of file anyList.hpp.
using anyListType = List<std::any> |
Definition at line 40 of file anyList.hpp.
using reference = typename anyListType::reference |
Definition at line 42 of file anyList.hpp.
using iterator = typename anyListType::iterator |
Definition at line 44 of file anyList.hpp.
using const_iterator = typename anyListType::const_iterator |
Definition at line 46 of file anyList.hpp.
TypeInfoNV | ( | "anyList" | ) |
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().
bool empty | ( | ) | const |
Is container empty.
Definition at line 30 of file anyList.cpp.
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().
const pFlow::wordList & names | ( | ) | const |
List of varibales names.
Definition at line 40 of file anyList.cpp.
Create variable using constructor in-place.
Definition at line 84 of file anyList.hpp.
References anyList::anyList_, anyList::contains(), pFlow::endl(), fatalErrorInFunction, fatalExit, anyList::names_, and anyList::types_.
Referenced by boundaryBase::appendNewIndices(), pointStructure::beforeIteration(), internalPoints::changePointsFlagPosition(), internalPoints::deletePoints(), sphereParticles::insertParticles(), grainParticles::insertParticles(), internalPoints::insertPoints(), internalPoints::insertPointsOnly(), boundaryBase::removeIndices(), and pFlow::setOneEntry().
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_.
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_.
|
inline |
Get the reference to variable by index.
Definition at line 134 of file anyList.hpp.
References anyList::anyList_, pFlow::endl(), fatalErrorInFunction, fatalExit, anyList::names_, List< T >::pos(), and anyList::types_.
Referenced by particleIdHandler::hearChanges(), internalField< realx3, void >::hearChanges(), internalField< realx3, void >::insert(), internalPoints::insertPoints(), internalPoints::insertPointsOnly(), and internalField< realx3, void >::rearrange().
|
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_.
|
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_.
|
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_.
|
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.
|
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.
|
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().
|
private |
List of variable names in anyList_.
Definition at line 54 of file anyList.hpp.
Referenced by anyList::emplaceBack(), anyList::getObject(), and anyList::getObjectPtr().
|
private |
Definition at line 56 of file anyList.hpp.
Referenced by anyList::emplaceBack(), anyList::getObject(), and anyList::getObjectPtr().