Commit 3b43ab0c authored by Andrew Heather's avatar Andrew Heather
Browse files

added new construct with size

parent b01210e5
......@@ -63,6 +63,21 @@ Foam::IOPtrList<T>::IOPtrList(const IOobject& io)
}
template<class T>
Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const label s)
:
regIOobject(io),
PtrList<T>(s)
{
if (io.readOpt() != IOobject::NO_READ)
{
FatalErrorIn("IOPtrList<T>::IOPtrList(const IOobject&, const label)")
<< "NO_READ must be set if specifying size" << nl
<< exit(FatalError);
}
}
template<class T>
Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const PtrList<T>& list)
:
......
......@@ -70,6 +70,9 @@ public:
//- Construct from IOobject
IOPtrList(const IOobject&);
//- Construct from IOobject with given size
IOPtrList(const IOobject&, const label);
//- Construct from IOobject and a PtrList
IOPtrList(const IOobject&, const PtrList<T>&);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment