mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: expose HashTable iterator object() methods
- to the referenced object via a method name, which may be clearer
than deferencing the iterator
[key, value] => iter.key(), *iter
[key, value] => iter.key(), iter()
[key, value] => iter.key(), iter.object()
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -144,10 +144,10 @@ class HashTable
|
||||
|
||||
private:
|
||||
//- Disallow default bitwise copy construct
|
||||
hashedEntry(const hashedEntry&);
|
||||
hashedEntry(const hashedEntry&) = delete;
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const hashedEntry&);
|
||||
void operator=(const hashedEntry&) = delete;
|
||||
};
|
||||
|
||||
|
||||
@ -400,10 +400,6 @@ public:
|
||||
//- Return non-const access to referenced object
|
||||
inline T& object();
|
||||
|
||||
//- Return const access to referenced object
|
||||
inline const T& cobject() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Member operators
|
||||
@ -413,6 +409,9 @@ public:
|
||||
//- Return the Key corresponding to the iterator
|
||||
inline const Key& key() const;
|
||||
|
||||
//- Return const access to referenced object
|
||||
inline const T& cobject() const;
|
||||
|
||||
//- Compare hashedEntry element pointers
|
||||
inline bool operator==(const iteratorBase&) const;
|
||||
inline bool operator!=(const iteratorBase&) const;
|
||||
@ -460,11 +459,14 @@ public:
|
||||
|
||||
// Member operators
|
||||
|
||||
//- Return referenced hash value
|
||||
//- Return non-const access to referenced object
|
||||
using iteratorBase::object;
|
||||
|
||||
//- Return non-const access to referenced object
|
||||
inline T& operator*();
|
||||
inline T& operator()();
|
||||
|
||||
//- Return referenced hash value
|
||||
//- Return const access to referenced object
|
||||
inline const T& operator*() const;
|
||||
inline const T& operator()() const;
|
||||
|
||||
@ -518,13 +520,12 @@ public:
|
||||
|
||||
// Member operators
|
||||
|
||||
//- Return referenced hash value
|
||||
//- Return const access to referenced object
|
||||
inline const T& operator*() const;
|
||||
inline const T& operator()() const;
|
||||
|
||||
inline const_iterator& operator++();
|
||||
inline const_iterator operator++(int);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user