mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: declare generated methods for containers
This commit is contained in:
committed by
Andrew Heather
parent
b2713d2324
commit
6953760460
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -105,7 +105,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declarations
|
// Forward Declarations
|
||||||
template<unsigned Width> class PackedList;
|
template<unsigned Width> class PackedList;
|
||||||
class labelRange;
|
class labelRange;
|
||||||
|
|
||||||
@ -230,7 +230,7 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Null constructor
|
//- Default construct, zero-sized and no allocation
|
||||||
inline constexpr PackedList() noexcept;
|
inline constexpr PackedList() noexcept;
|
||||||
|
|
||||||
//- Construct for given number of elements, initializes values to 0
|
//- Construct for given number of elements, initializes values to 0
|
||||||
@ -451,6 +451,7 @@ public:
|
|||||||
class reference
|
class reference
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
friend class PackedList; // Access for parent
|
friend class PackedList; // Access for parent
|
||||||
void operator&() = delete; // Refuse to provide its address
|
void operator&() = delete; // Refuse to provide its address
|
||||||
|
|
||||||
@ -472,10 +473,16 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Copy construct
|
||||||
|
reference(const reference&) = default;
|
||||||
|
|
||||||
|
//- Move construct
|
||||||
|
reference(reference&&) = default;
|
||||||
|
|
||||||
//- Value assignment
|
//- Value assignment
|
||||||
inline void operator=(const reference& other);
|
inline void operator=(const reference& other);
|
||||||
|
|
||||||
//- Value assignment.
|
//- Value assignment
|
||||||
inline void operator=(const unsigned int val);
|
inline void operator=(const unsigned int val);
|
||||||
|
|
||||||
//- Conversion operator.
|
//- Conversion operator.
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2018-2019 OpenCFD Ltd.
|
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -54,7 +54,7 @@ See also
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declarations
|
// Forward Declarations
|
||||||
class bitSet;
|
class bitSet;
|
||||||
class labelRange;
|
class labelRange;
|
||||||
|
|
||||||
@ -131,13 +131,14 @@ public:
|
|||||||
class const_iterator;
|
class const_iterator;
|
||||||
typedef unsigned int const_reference;
|
typedef unsigned int const_reference;
|
||||||
|
|
||||||
//- Define class name and debug
|
|
||||||
|
//- Declare type-name (with debug switch)
|
||||||
ClassName("bitSet");
|
ClassName("bitSet");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct an empty, zero-sized set
|
//- Default construct an empty, zero-sized set
|
||||||
inline bitSet() noexcept;
|
inline bitSet() noexcept;
|
||||||
|
|
||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
@ -438,6 +439,7 @@ public:
|
|||||||
public PackedList<1>::reference
|
public PackedList<1>::reference
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
friend class bitSet; // Access for parent
|
friend class bitSet; // Access for parent
|
||||||
void operator&() = delete; // Refuse to provide its address
|
void operator&() = delete; // Refuse to provide its address
|
||||||
|
|
||||||
@ -447,6 +449,12 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Copy construct
|
||||||
|
reference(const reference&) = default;
|
||||||
|
|
||||||
|
//- Move construct
|
||||||
|
reference(reference&&) = default;
|
||||||
|
|
||||||
//- Flip the bit at the position, no range-checking
|
//- Flip the bit at the position, no range-checking
|
||||||
inline void flip();
|
inline void flip();
|
||||||
|
|
||||||
@ -474,7 +482,7 @@ public:
|
|||||||
//- Global position of the current \a on bit
|
//- Global position of the current \a on bit
|
||||||
label pos_;
|
label pos_;
|
||||||
|
|
||||||
//- Construct null - an end iterator
|
//- Default construct - an end iterator
|
||||||
inline const_iterator() noexcept;
|
inline const_iterator() noexcept;
|
||||||
|
|
||||||
//- Construct begin iterator
|
//- Construct begin iterator
|
||||||
|
|||||||
@ -206,7 +206,7 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null with default (128) table capacity
|
//- Default construct with default (128) table capacity
|
||||||
HashTable();
|
HashTable();
|
||||||
|
|
||||||
//- Construct given initial table capacity
|
//- Construct given initial table capacity
|
||||||
@ -550,6 +550,7 @@ protected:
|
|||||||
class Iterator
|
class Iterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Typedefs
|
// Typedefs
|
||||||
using iterator_category = std::forward_iterator_tag;
|
using iterator_category = std::forward_iterator_tag;
|
||||||
using difference_type = this_type::difference_type;
|
using difference_type = this_type::difference_type;
|
||||||
@ -671,6 +672,7 @@ public:
|
|||||||
public Iterator<false>
|
public Iterator<false>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Typedefs
|
// Typedefs
|
||||||
using iterator_category = std::forward_iterator_tag;
|
using iterator_category = std::forward_iterator_tag;
|
||||||
using difference_type = this_type::difference_type;
|
using difference_type = this_type::difference_type;
|
||||||
@ -684,8 +686,8 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null (end iterator)
|
//- Default construct (end iterator)
|
||||||
inline iterator() = default;
|
iterator() = default;
|
||||||
|
|
||||||
//- Copy construct from similar access type
|
//- Copy construct from similar access type
|
||||||
inline explicit iterator(const Iterator<false>& iter)
|
inline explicit iterator(const Iterator<false>& iter)
|
||||||
@ -729,6 +731,7 @@ public:
|
|||||||
public Iterator<true>
|
public Iterator<true>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Typedefs
|
// Typedefs
|
||||||
using iterator_category = std::forward_iterator_tag;
|
using iterator_category = std::forward_iterator_tag;
|
||||||
using difference_type = this_type::difference_type;
|
using difference_type = this_type::difference_type;
|
||||||
@ -741,8 +744,11 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null (end iterator)
|
//- Default construct (end iterator)
|
||||||
inline const_iterator() = default;
|
const_iterator() = default;
|
||||||
|
|
||||||
|
//- Copy construct
|
||||||
|
const_iterator(const const_iterator&) = default;
|
||||||
|
|
||||||
//- Copy construct from similar access type
|
//- Copy construct from similar access type
|
||||||
inline explicit const_iterator(const Iterator<true>& iter)
|
inline explicit const_iterator(const Iterator<true>& iter)
|
||||||
@ -781,8 +787,10 @@ public:
|
|||||||
inline const_iterator& operator++();
|
inline const_iterator& operator++();
|
||||||
inline const_iterator operator++(int);
|
inline const_iterator operator++(int);
|
||||||
|
|
||||||
|
|
||||||
// Assignment
|
// Assignment
|
||||||
|
|
||||||
|
//- Copy assignment
|
||||||
const_iterator& operator=(const const_iterator&) = default;
|
const_iterator& operator=(const const_iterator&) = default;
|
||||||
|
|
||||||
// Allow assign from iterator to const_iterator
|
// Allow assign from iterator to const_iterator
|
||||||
@ -805,6 +813,7 @@ public:
|
|||||||
public Iter
|
public Iter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
using value_type = this_type::key_type;
|
using value_type = this_type::key_type;
|
||||||
using reference = const Key&;
|
using reference = const Key&;
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -72,7 +72,7 @@ public:
|
|||||||
//- Pointer to next entry in list
|
//- Pointer to next entry in list
|
||||||
link* next_ = nullptr;
|
link* next_ = nullptr;
|
||||||
|
|
||||||
//- Null construct
|
//- Default construct
|
||||||
link() = default;
|
link() = default;
|
||||||
|
|
||||||
//- Check if the node is registered with the list
|
//- Check if the node is registered with the list
|
||||||
@ -85,7 +85,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private Member Data
|
// Private Data
|
||||||
|
|
||||||
//- Pointer to first element
|
//- Pointer to first element
|
||||||
link *first_ = nullptr;
|
link *first_ = nullptr;
|
||||||
@ -97,15 +97,6 @@ private:
|
|||||||
label size_ = 0;
|
label size_ = 0;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- No copy construct
|
|
||||||
DLListBase(const DLListBase&) = delete;
|
|
||||||
|
|
||||||
//- No copy assignment
|
|
||||||
void operator=(const DLListBase&) = delete;
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
@ -142,14 +133,19 @@ public:
|
|||||||
friend class const_iterator;
|
friend class const_iterator;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Generated Methods
|
||||||
|
|
||||||
//- Null construct
|
//- Default construct
|
||||||
DLListBase() = default;
|
DLListBase() = default;
|
||||||
|
|
||||||
|
//- No copy construct
|
||||||
|
DLListBase(const DLListBase&) = delete;
|
||||||
|
|
||||||
//- Destructor
|
//- No copy assignment
|
||||||
~DLListBase() = default;
|
void operator=(const DLListBase&) = delete;
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
~DLListBase() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -233,6 +229,9 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Copy construct
|
||||||
|
iterator(const iterator&) = default;
|
||||||
|
|
||||||
//- Construct for a node on a list
|
//- Construct for a node on a list
|
||||||
inline iterator(DLListBase* list, link* item);
|
inline iterator(DLListBase* list, link* item);
|
||||||
|
|
||||||
@ -280,15 +279,15 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Copy construct
|
||||||
|
const_iterator(const const_iterator&) = default;
|
||||||
|
|
||||||
//- Construct for a node on a list
|
//- Construct for a node on a list
|
||||||
inline const_iterator(const DLListBase* list, const link* item);
|
inline const_iterator(const DLListBase* list, const link* item);
|
||||||
|
|
||||||
//- Copy construct from a non-const iterator
|
//- Copy construct from a non-const iterator
|
||||||
inline const_iterator(const DLListBase::iterator& iter);
|
inline const_iterator(const DLListBase::iterator& iter);
|
||||||
|
|
||||||
//- Copy construct
|
|
||||||
const_iterator(const const_iterator&) = default;
|
|
||||||
|
|
||||||
//- The storage node
|
//- The storage node
|
||||||
inline const link* get_node() const;
|
inline const link* get_node() const;
|
||||||
|
|
||||||
@ -308,6 +307,7 @@ public:
|
|||||||
//- Move forward through list
|
//- Move forward through list
|
||||||
inline void next();
|
inline void next();
|
||||||
|
|
||||||
|
//- Copy assignment
|
||||||
const_iterator& operator=(const const_iterator&) = default;
|
const_iterator& operator=(const const_iterator&) = default;
|
||||||
|
|
||||||
inline bool operator==(const const_iterator&) const;
|
inline bool operator==(const const_iterator&) const;
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -69,14 +69,14 @@ public:
|
|||||||
//- Pointer to next entry in list
|
//- Pointer to next entry in list
|
||||||
link* next_ = nullptr;
|
link* next_ = nullptr;
|
||||||
|
|
||||||
//- Null construct
|
//- Default construct
|
||||||
link() = default;
|
link() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private Member Data
|
// Private Data
|
||||||
|
|
||||||
//- A pointer to the last element.
|
//- A pointer to the last element.
|
||||||
// last_->next_ points to first element, i.e. circular storage
|
// last_->next_ points to first element, i.e. circular storage
|
||||||
@ -86,15 +86,6 @@ private:
|
|||||||
label size_ = 0;
|
label size_ = 0;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- No copy construct
|
|
||||||
SLListBase(const SLListBase&) = delete;
|
|
||||||
|
|
||||||
//- No copy assignment
|
|
||||||
void operator=(const SLListBase&) = delete;
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
@ -130,14 +121,19 @@ public:
|
|||||||
friend class const_iterator;
|
friend class const_iterator;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Generated Methods
|
||||||
|
|
||||||
//- Null construct
|
//- Default construct
|
||||||
SLListBase() = default;
|
SLListBase() = default;
|
||||||
|
|
||||||
|
//- No copy construct
|
||||||
|
SLListBase(const SLListBase&) = delete;
|
||||||
|
|
||||||
//- Destructor
|
//- No copy assignment
|
||||||
~SLListBase() = default;
|
void operator=(const SLListBase&) = delete;
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
~SLListBase() = default;
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -209,6 +205,9 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Copy construct
|
||||||
|
iterator(const iterator&) = default;
|
||||||
|
|
||||||
//- Construct for a node on the list
|
//- Construct for a node on the list
|
||||||
inline iterator(SLListBase* list, link* item);
|
inline iterator(SLListBase* list, link* item);
|
||||||
|
|
||||||
@ -231,6 +230,7 @@ public:
|
|||||||
//- Move forward through list
|
//- Move forward through list
|
||||||
inline void next();
|
inline void next();
|
||||||
|
|
||||||
|
//- Copy assignment
|
||||||
inline void operator=(const iterator& iter);
|
inline void operator=(const iterator& iter);
|
||||||
|
|
||||||
inline bool operator==(const iterator& iter) const;
|
inline bool operator==(const iterator& iter) const;
|
||||||
@ -254,15 +254,15 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
//- Copy construct
|
||||||
|
const_iterator(const const_iterator&) = default;
|
||||||
|
|
||||||
//- Construct for a node on the list
|
//- Construct for a node on the list
|
||||||
inline const_iterator(const SLListBase* list, const link* item);
|
inline const_iterator(const SLListBase* list, const link* item);
|
||||||
|
|
||||||
//- Construct from a non-const iterator
|
//- Construct from a non-const iterator
|
||||||
inline const_iterator(const SLListBase::iterator& iter);
|
inline const_iterator(const SLListBase::iterator& iter);
|
||||||
|
|
||||||
//- Copy construct
|
|
||||||
const_iterator(const const_iterator&) = default;
|
|
||||||
|
|
||||||
//- The storage node
|
//- The storage node
|
||||||
inline const link* get_node() const;
|
inline const link* get_node() const;
|
||||||
|
|
||||||
@ -282,6 +282,7 @@ public:
|
|||||||
//- Move forward through list
|
//- Move forward through list
|
||||||
inline void next();
|
inline void next();
|
||||||
|
|
||||||
|
//- Copy assignment
|
||||||
const_iterator& operator=(const const_iterator&) = default;
|
const_iterator& operator=(const const_iterator&) = default;
|
||||||
|
|
||||||
inline bool operator==(const const_iterator& iter) const;
|
inline bool operator==(const const_iterator& iter) const;
|
||||||
@ -306,7 +307,6 @@ public:
|
|||||||
|
|
||||||
//- No reverse iteration
|
//- No reverse iteration
|
||||||
const const_iterator& crend() const = delete;
|
const const_iterator& crend() const = delete;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -135,7 +135,7 @@ public:
|
|||||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||||
|
|
||||||
|
|
||||||
// Static Member Functions
|
// Static Functions
|
||||||
|
|
||||||
//- Return a null FixedList
|
//- Return a null FixedList
|
||||||
inline static const FixedList<T, N>& null();
|
inline static const FixedList<T, N>& null();
|
||||||
@ -143,8 +143,8 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Null constructor
|
//- Default construct
|
||||||
inline FixedList() = default;
|
FixedList() = default;
|
||||||
|
|
||||||
//- Construct and initialize all entries to given value
|
//- Construct and initialize all entries to given value
|
||||||
inline explicit FixedList(const T& val);
|
inline explicit FixedList(const T& val);
|
||||||
@ -155,7 +155,7 @@ public:
|
|||||||
//- Copy construct from C-array
|
//- Copy construct from C-array
|
||||||
inline explicit FixedList(const T list[N]);
|
inline explicit FixedList(const T list[N]);
|
||||||
|
|
||||||
//- Copy constructor
|
//- Copy construct
|
||||||
inline FixedList(const FixedList<T, N>& list);
|
inline FixedList(const FixedList<T, N>& list);
|
||||||
|
|
||||||
//- Move construct by using move assignment for the individual
|
//- Move construct by using move assignment for the individual
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -50,7 +50,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declarations
|
// Forward Declarations
|
||||||
template<class T> class SubList;
|
template<class T> class SubList;
|
||||||
|
|
||||||
// Common list types
|
// Common list types
|
||||||
@ -70,12 +70,18 @@ class SubList
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Static Member Functions
|
// Static Functions
|
||||||
|
|
||||||
//- Return a null SubList
|
//- Return a null SubList
|
||||||
inline static const SubList<T>& null();
|
inline static const SubList<T>& null();
|
||||||
|
|
||||||
|
|
||||||
|
// Generated Methods
|
||||||
|
|
||||||
|
//- Copy construct
|
||||||
|
SubList(const SubList&) = default;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from UList, the entire size
|
//- Construct from UList, the entire size
|
||||||
@ -122,7 +128,7 @@ public:
|
|||||||
//- Copy assign entries from given sub-list
|
//- Copy assign entries from given sub-list
|
||||||
inline void operator=(const SubList<T>& list);
|
inline void operator=(const SubList<T>& list);
|
||||||
|
|
||||||
//- Copy assign entries to the given list
|
//- Copy assign entries from given list
|
||||||
inline void operator=(const UList<T>& list);
|
inline void operator=(const UList<T>& list);
|
||||||
|
|
||||||
//- Assign all entries to the given value
|
//- Assign all entries to the given value
|
||||||
|
|||||||
@ -66,7 +66,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
// Forward declarations
|
// Forward Declarations
|
||||||
class labelRange;
|
class labelRange;
|
||||||
template<class T> class List;
|
template<class T> class List;
|
||||||
template<class T> class SubList;
|
template<class T> class SubList;
|
||||||
@ -87,7 +87,7 @@ typedef UList<label> labelUList; //!< A UList of labels
|
|||||||
template<class T>
|
template<class T>
|
||||||
class UList
|
class UList
|
||||||
{
|
{
|
||||||
// Private data
|
// Private Data
|
||||||
|
|
||||||
//- Number of elements in UList
|
//- Number of elements in UList
|
||||||
label size_;
|
label size_;
|
||||||
@ -167,13 +167,13 @@ public:
|
|||||||
friend class SubList<T>;
|
friend class SubList<T>;
|
||||||
|
|
||||||
|
|
||||||
// Static Member Functions
|
// Static Functions
|
||||||
|
|
||||||
//- Return a UList reference to a nullObject
|
//- Return a UList reference to a nullObject
|
||||||
inline static const UList<T>& null();
|
inline static const UList<T>& null();
|
||||||
|
|
||||||
|
|
||||||
// Public classes
|
// Public Classes
|
||||||
|
|
||||||
//- A list compare binary predicate for normal sort
|
//- A list compare binary predicate for normal sort
|
||||||
struct less
|
struct less
|
||||||
@ -208,9 +208,15 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Generated Methods
|
||||||
|
|
||||||
|
//- Copy construct
|
||||||
|
UList(const UList<T>&) = default;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Null constructor
|
//- Default construct, zero-sized and nullptr
|
||||||
inline constexpr UList() noexcept;
|
inline constexpr UList() noexcept;
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
@ -331,7 +337,7 @@ public:
|
|||||||
void deepCopy(const UList<T>& list);
|
void deepCopy(const UList<T>& list);
|
||||||
|
|
||||||
|
|
||||||
// Member operators
|
// Member Operators
|
||||||
|
|
||||||
//- Return element of UList
|
//- Return element of UList
|
||||||
inline T& operator[](const label i);
|
inline T& operator[](const label i);
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -75,8 +75,8 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct null
|
//- Default construct
|
||||||
inline Tuple2() = default;
|
Tuple2() = default;
|
||||||
|
|
||||||
//- Copy construct from components
|
//- Copy construct from components
|
||||||
inline Tuple2(const T1& f, const T2& s)
|
inline Tuple2(const T1& f, const T2& s)
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -65,8 +65,8 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct an empty list
|
//- Default construct an empty list
|
||||||
inline hashedWordList() = default;
|
hashedWordList() = default;
|
||||||
|
|
||||||
//- Copy construct.
|
//- Copy construct.
|
||||||
inline hashedWordList(const hashedWordList& list);
|
inline hashedWordList(const hashedWordList& list);
|
||||||
|
|||||||
Reference in New Issue
Block a user