mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
reactingEulerFoam/phaseSystem: Create an ordered container for phaseModels
The previous method using a HashTable required a separate ordered list of names which is hard to work with and maintain.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -146,6 +146,7 @@ public:
|
||||
// and annul the argument.
|
||||
void transfer(DictionaryBase<IDLListType, T>&);
|
||||
|
||||
|
||||
// Member operators
|
||||
|
||||
void operator=(const DictionaryBase&);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -73,6 +73,21 @@ public:
|
||||
|
||||
//- Construct from Istream
|
||||
PtrDictionary(Istream&);
|
||||
|
||||
|
||||
// Member operators
|
||||
|
||||
//- Find and return entry
|
||||
const T& operator[](const word& key) const
|
||||
{
|
||||
return *DictionaryBase<DLPtrList<T>, T>::operator[](key);
|
||||
}
|
||||
|
||||
//- Find and return entry
|
||||
T& operator[](const word& key)
|
||||
{
|
||||
return *DictionaryBase<DLPtrList<T>, T>::operator[](key);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -203,6 +203,7 @@ public:
|
||||
// and annul the argument list.
|
||||
void transfer(LList<LListBase, T>&);
|
||||
|
||||
|
||||
// Member operators
|
||||
|
||||
void operator=(const LList<LListBase, T>&);
|
||||
@ -265,6 +266,16 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
inline iterator begin()
|
||||
{
|
||||
return LListBase::begin();
|
||||
}
|
||||
|
||||
inline const iterator& end()
|
||||
{
|
||||
return static_cast<const iterator&>(LListBase::end());
|
||||
}
|
||||
|
||||
|
||||
// STL const_iterator
|
||||
|
||||
@ -313,6 +324,26 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
inline const_iterator cbegin() const
|
||||
{
|
||||
return LListBase::cbegin();
|
||||
}
|
||||
|
||||
inline const const_iterator& cend() const
|
||||
{
|
||||
return static_cast<const const_iterator&>(LListBase::cend());
|
||||
}
|
||||
|
||||
inline const_iterator begin() const
|
||||
{
|
||||
return LListBase::begin();
|
||||
}
|
||||
|
||||
inline const const_iterator& end() const
|
||||
{
|
||||
return static_cast<const const_iterator&>(LListBase::end());
|
||||
}
|
||||
|
||||
|
||||
// IOstream operators
|
||||
|
||||
|
||||
@ -209,6 +209,16 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
inline iterator begin()
|
||||
{
|
||||
return LListBase::begin();
|
||||
}
|
||||
|
||||
inline const iterator& end()
|
||||
{
|
||||
return static_cast<const iterator&>(LListBase::end());
|
||||
}
|
||||
|
||||
|
||||
// STL const_iterator
|
||||
|
||||
@ -256,6 +266,26 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
inline const_iterator cbegin() const
|
||||
{
|
||||
return LListBase::cbegin();
|
||||
}
|
||||
|
||||
inline const const_iterator& cend() const
|
||||
{
|
||||
return static_cast<const const_iterator&>(LListBase::cend());
|
||||
}
|
||||
|
||||
inline const_iterator begin() const
|
||||
{
|
||||
return LListBase::begin();
|
||||
}
|
||||
|
||||
inline const const_iterator& end() const
|
||||
{
|
||||
return static_cast<const const_iterator&>(LListBase::end());
|
||||
}
|
||||
|
||||
|
||||
// STL const_reverse_iterator
|
||||
|
||||
@ -298,6 +328,29 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
inline const_reverse_iterator crbegin() const
|
||||
{
|
||||
return LListBase::crbegin();
|
||||
}
|
||||
|
||||
inline const const_reverse_iterator& crend() const
|
||||
{
|
||||
return
|
||||
static_cast<const const_reverse_iterator&>(LListBase::crend());
|
||||
}
|
||||
|
||||
|
||||
inline const_reverse_iterator rbegin() const
|
||||
{
|
||||
return LListBase::rbegin();
|
||||
}
|
||||
|
||||
inline const const_reverse_iterator& rend() const
|
||||
{
|
||||
return
|
||||
static_cast<const const_reverse_iterator&>(LListBase::rend());
|
||||
}
|
||||
|
||||
|
||||
// STL member operators
|
||||
|
||||
|
||||
@ -263,6 +263,7 @@ public:
|
||||
inline const_iterator begin() const;
|
||||
inline const const_iterator& end() const;
|
||||
|
||||
|
||||
// STL const_reverse_iterator
|
||||
|
||||
//- An STL-conforming const_reverse_iterator
|
||||
@ -300,6 +301,7 @@ public:
|
||||
inline const_reverse_iterator rbegin() const;
|
||||
inline const const_reverse_iterator& rend() const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
//- Iterator returned by end()
|
||||
@ -310,7 +312,6 @@ private:
|
||||
|
||||
//- const_reverse_iterator returned by end()
|
||||
static const_reverse_iterator endConstRevIter_;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -58,12 +58,6 @@ public:
|
||||
DLPtrList()
|
||||
{}
|
||||
|
||||
//- Construct given initial T
|
||||
DLPtrList(T a)
|
||||
:
|
||||
LPtrList<DLListBase, T>(a)
|
||||
{}
|
||||
|
||||
//- Construct from Istream using given Istream constructor class
|
||||
template<class INew>
|
||||
DLPtrList(Istream& is, const INew& inewt)
|
||||
|
||||
Reference in New Issue
Block a user