ENH: Dictionary: pass in initial size

This commit is contained in:
mattijs
2013-01-02 11:09:36 +00:00
parent 509041b704
commit 94f935c8fd
6 changed files with 21 additions and 15 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,7 +45,9 @@ void Foam::DictionaryBase<IDLListType, T>::addEntries()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class IDLListType, class T>
Foam::DictionaryBase<IDLListType, T>::DictionaryBase()
Foam::DictionaryBase<IDLListType, T>::DictionaryBase(const label size)
:
hashedTs_(size)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -90,8 +90,8 @@ public:
// Constructors
//- Null constructor
DictionaryBase();
//- Construct given initial table size
DictionaryBase(const label size = 128);
//- Copy construct
DictionaryBase(const DictionaryBase&);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,7 +28,9 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class T>
Foam::PtrDictionary<T>::PtrDictionary()
Foam::PtrDictionary<T>::PtrDictionary(const label size)
:
DictionaryBase<DLPtrList<T>, T>(size)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -61,8 +61,8 @@ public:
// Constructors
//- Null constructor
PtrDictionary();
//- Construct given initial table size
PtrDictionary(const label size = 128);
//- Copy construct
PtrDictionary(const PtrDictionary&);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,7 +28,9 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class T>
Foam::UPtrDictionary<T>::UPtrDictionary()
Foam::UPtrDictionary<T>::UPtrDictionary(const label size)
:
DictionaryBase<DLList<T*>, T>(size)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -61,8 +61,8 @@ public:
// Constructors
//- Null constructor
UPtrDictionary();
//- Construct given initial table size
UPtrDictionary(const label size = 128);
//- Copy construct
UPtrDictionary(const UPtrDictionary&);