mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Added write(Ostream&) function to HashPtrTable
This commit is contained in:
@ -121,6 +121,9 @@ public:
|
|||||||
//- Clear all entries from table
|
//- Clear all entries from table
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
|
//- Write
|
||||||
|
void write(Ostream& os) const;
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
|
|||||||
@ -153,6 +153,24 @@ void Foam::HashPtrTable<T, Key, Hash>::read
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T, class Key, class Hash>
|
||||||
|
void Foam::HashPtrTable<T, Key, Hash>::write(Ostream& os) const
|
||||||
|
{
|
||||||
|
|
||||||
|
for
|
||||||
|
(
|
||||||
|
typename HashPtrTable<T, Key, Hash>::const_iterator
|
||||||
|
iter = this->begin();
|
||||||
|
iter != this->end();
|
||||||
|
++iter
|
||||||
|
)
|
||||||
|
{
|
||||||
|
const T* ptr = iter();
|
||||||
|
ptr->write(os);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T, class Key, class Hash>
|
template<class T, class Key, class Hash>
|
||||||
|
|||||||
Reference in New Issue
Block a user