mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Added xfer<T> constructors for the various list-types
This commit is contained in:
@ -92,6 +92,12 @@ CompactListList<T>::CompactListList(const UList<label>& rowSizes, const T& t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
CompactListList<T>::CompactListList(xfer<CompactListList<T> >& lst)
|
||||||
|
{
|
||||||
|
transfer(lst.ref());
|
||||||
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
CompactListList<T>::CompactListList(CompactListList<T>& cll, bool reUse)
|
CompactListList<T>::CompactListList(CompactListList<T>& cll, bool reUse)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -103,6 +103,9 @@ public:
|
|||||||
//- Construct given list of row-sizes
|
//- Construct given list of row-sizes
|
||||||
CompactListList(const UList<label>& rowSizes, const T&);
|
CompactListList(const UList<label>& rowSizes, const T&);
|
||||||
|
|
||||||
|
//- Construct by transferring the parameter contents
|
||||||
|
CompactListList(xfer<CompactListList<T> >&);
|
||||||
|
|
||||||
//- Construct as copy or re-use as specified.
|
//- Construct as copy or re-use as specified.
|
||||||
CompactListList(CompactListList<T>&, bool reUse);
|
CompactListList(CompactListList<T>&, bool reUse);
|
||||||
|
|
||||||
|
|||||||
@ -125,6 +125,14 @@ Foam::List<T>::List(const List<T>& a)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Construct by transferring the parameter contents
|
||||||
|
template<class T>
|
||||||
|
Foam::List<T>::List(xfer<List<T> >& lst)
|
||||||
|
{
|
||||||
|
transfer(lst.ref());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Construct as copy or re-use as specified.
|
// Construct as copy or re-use as specified.
|
||||||
template<class T>
|
template<class T>
|
||||||
Foam::List<T>::List(List<T>& a, bool reUse)
|
Foam::List<T>::List(List<T>& a, bool reUse)
|
||||||
|
|||||||
@ -43,6 +43,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "UList.H"
|
#include "UList.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
|
#include "xfer.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -93,6 +94,9 @@ public:
|
|||||||
//- Copy constructor.
|
//- Copy constructor.
|
||||||
List(const List<T>&);
|
List(const List<T>&);
|
||||||
|
|
||||||
|
//- Construct by transferring the parameter contents
|
||||||
|
List(xfer<List<T> >&);
|
||||||
|
|
||||||
//- Construct as copy or re-use as specified.
|
//- Construct as copy or re-use as specified.
|
||||||
List(List<T>&, bool reUse);
|
List(List<T>&, bool reUse);
|
||||||
|
|
||||||
|
|||||||
@ -44,6 +44,7 @@ PackedList<nBits>::PackedList(const label size, const unsigned int val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//- Copy constructor.
|
//- Copy constructor.
|
||||||
template<int nBits>
|
template<int nBits>
|
||||||
PackedList<nBits>::PackedList(const PackedList<nBits>& PList)
|
PackedList<nBits>::PackedList(const PackedList<nBits>& PList)
|
||||||
@ -53,6 +54,13 @@ PackedList<nBits>::PackedList(const PackedList<nBits>& PList)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<int nBits>
|
||||||
|
PackedList<nBits>::PackedList(xfer<PackedList<nBits> >& lst)
|
||||||
|
{
|
||||||
|
transfer(lst.ref());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Construct from labelList
|
//- Construct from labelList
|
||||||
template<int nBits>
|
template<int nBits>
|
||||||
PackedList<nBits>::PackedList(const labelList& lst)
|
PackedList<nBits>::PackedList(const labelList& lst)
|
||||||
|
|||||||
@ -134,6 +134,9 @@ public:
|
|||||||
//- Copy constructor.
|
//- Copy constructor.
|
||||||
PackedList(const PackedList<nBits>& PList);
|
PackedList(const PackedList<nBits>& PList);
|
||||||
|
|
||||||
|
//- Construct by transferring the parameter contents
|
||||||
|
PackedList(xfer<PackedList<nBits> >&);
|
||||||
|
|
||||||
//- Construct from labelList.
|
//- Construct from labelList.
|
||||||
PackedList(const labelList&);
|
PackedList(const labelList&);
|
||||||
|
|
||||||
|
|||||||
@ -71,6 +71,13 @@ Foam::PtrList<T>::PtrList(const PtrList<T>& a, const CloneArg& cloneArg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
Foam::PtrList<T>::PtrList(xfer<PtrList<T> >& lst)
|
||||||
|
{
|
||||||
|
transfer(lst.ref());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
Foam::PtrList<T>::PtrList(PtrList<T>& a, bool reUse)
|
Foam::PtrList<T>::PtrList(PtrList<T>& a, bool reUse)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -129,6 +129,9 @@ public:
|
|||||||
template<class CloneArg>
|
template<class CloneArg>
|
||||||
PtrList(const PtrList<T>&, const CloneArg&);
|
PtrList(const PtrList<T>&, const CloneArg&);
|
||||||
|
|
||||||
|
//- Construct by transferring the parameter contents
|
||||||
|
PtrList(xfer<PtrList<T> >&);
|
||||||
|
|
||||||
//- Construct as copy or re-use as specified.
|
//- Construct as copy or re-use as specified.
|
||||||
PtrList(PtrList<T>&, bool reUse);
|
PtrList(PtrList<T>&, bool reUse);
|
||||||
|
|
||||||
|
|||||||
@ -50,6 +50,13 @@ UPtrList<T>::UPtrList(const label s)
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
UPtrList<T>::UPtrList(xfer<UPtrList<T> >& lst)
|
||||||
|
{
|
||||||
|
transfer(lst.ref());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
UPtrList<T>::UPtrList(UPtrList<T>& a, bool reUse)
|
UPtrList<T>::UPtrList(UPtrList<T>& a, bool reUse)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -110,6 +110,9 @@ public:
|
|||||||
//- Construct with length specified.
|
//- Construct with length specified.
|
||||||
explicit UPtrList(const label);
|
explicit UPtrList(const label);
|
||||||
|
|
||||||
|
//- Construct by transferring the parameter contents
|
||||||
|
UPtrList(xfer<UPtrList<T> >&);
|
||||||
|
|
||||||
//- Construct as copy or re-use as specified.
|
//- Construct as copy or re-use as specified.
|
||||||
UPtrList(UPtrList<T>&, bool reUse);
|
UPtrList(UPtrList<T>&, bool reUse);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user