Skip to content
Snippets Groups Projects
Commit 3b43ab0c authored by Andrew Heather's avatar Andrew Heather
Browse files

added new construct with size

parent b01210e5
No related branches found
No related tags found
No related merge requests found
......@@ -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>&);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment