diff --git a/applications/test/DynamicList/DynamicListTest.C b/applications/test/DynamicList/DynamicListTest.C index 86282a598b658cff9fea63469ef5861e954cb554..7e72651294f9a33834af148583f55f75ffa3dcae 100644 --- a/applications/test/DynamicList/DynamicListTest.C +++ b/applications/test/DynamicList/DynamicListTest.C @@ -145,14 +145,22 @@ int main(int argc, char *argv[]) Info<< "<dlC>" << dlC << "</dlC>" << nl << "sizes: " << " " << dlC.size() << "/" << dlC.capacity() << endl; - List<label> lstB(dlC.transfer()); + List<label> lstB(dlC.xfer()); - Info<< "Transferred to normal list via the transfer() method" << endl; + Info<< "Transferred to normal list via the xfer() method" << endl; Info<< "<lstB>" << lstB << "</lstB>" << nl << "sizes: " << " " << lstB.size() << endl; Info<< "<dlC>" << dlC << "</dlC>" << nl << "sizes: " << " " << dlC.size() << "/" << dlC.capacity() << endl; + DynamicList<label> dlD(lstB.xfer()); + + Info<< "Transfer construct from normal list" << endl; + Info<< "<lstB>" << lstB << "</lstB>" << nl << "sizes: " + << " " << lstB.size() << endl; + Info<< "<dlD>" << dlD << "</dlD>" << nl << "sizes: " + << " " << dlD.size() << "/" << dlD.capacity() << endl; + return 0; } diff --git a/applications/test/HashTable/hashTableTest.C b/applications/test/HashTable/hashTableTest.C index 8c4e20cbfce02ad7b5ac242ddf4192dac10e90b0..633c0e1ba41d16bf1622e6100a5f6d5562829ff2 100644 --- a/applications/test/HashTable/hashTableTest.C +++ b/applications/test/HashTable/hashTableTest.C @@ -91,10 +91,10 @@ int main() HASHTABLE_CLASS<double> table2(table1); - HASHTABLE_CLASS<double> table3(table1.transfer()); + HASHTABLE_CLASS<double> table3(table1.xfer()); Info<< "\ncopy table1 -> table2" << nl - << "transfer table1 -> table3 via the transfer() method" << nl; + << "transfer table1 -> table3 via the xfer() method" << nl; Info<< "\ntable1" << table1 << nl << "\ntable2" << table1 << nl diff --git a/applications/test/HashTable2/hashTableTest2.C b/applications/test/HashTable2/hashTableTest2.C index f51be6984d171f08697f2a991a6837667803cc87..ce23b2401b9b49b674f6bfcf0d73fedeba47cc89 100644 --- a/applications/test/HashTable2/hashTableTest2.C +++ b/applications/test/HashTable2/hashTableTest2.C @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) Info<< "table3: " << table3 << nl << "toc: " << table3.toc() << endl; - Map<label> table4(table3.transfer()); + Map<label> table4(table3.xfer()); Info<< "table3: " << table3 << nl << "toc: " << table3.toc() << endl; diff --git a/applications/test/List/ListTest.C b/applications/test/List/ListTest.C index c7ca15aae2352ee67f6a70b708d06b96ee58ba84..3f6fcc734c824d21346c4dcf1ec7a022a8c2188c 100644 --- a/applications/test/List/ListTest.C +++ b/applications/test/List/ListTest.C @@ -54,10 +54,10 @@ int main(int argc, char *argv[]) list2.setSize(10, vector(1, 2, 3)); Info<< list2 << endl; - List<vector> list3(list2.transfer()); - Info<< "Transferred via the transfer() method" << endl; - Info<< list2 << endl; - Info<< list3 << endl; + List<vector> list3(list2.xfer()); + Info<< "Transferred via the xfer() method" << endl; + Info<< list2 << nl + << list3 << endl; return 0; } diff --git a/applications/test/PtrList/PtrListTest.C b/applications/test/PtrList/PtrListTest.C index 038cb2bb07eac95d89604744eb000b5d56a1aabf..5413a662b889fed52c2c8b6bc218a3315eee3446 100644 --- a/applications/test/PtrList/PtrListTest.C +++ b/applications/test/PtrList/PtrListTest.C @@ -104,8 +104,8 @@ int main(int argc, char *argv[]) Info<<"list1: " << list1 << endl; - PtrList<Scalar> list3(list1.transfer()); - Info<< "Transferred via the transfer() method" << endl; + PtrList<Scalar> list3(list1.xfer()); + Info<< "Transferred via the xfer() method" << endl; Info<<"list1: " << list1 << endl; Info<<"list2: " << list2 << endl; diff --git a/applications/test/StaticHashTable/staticHashTableTest.C b/applications/test/StaticHashTable/staticHashTableTest.C index 5b0829586d1387e9ca58154447f65a9d03b22656..da879d4d5e27269df9c738e00bdfbce0e4703e81 100644 --- a/applications/test/StaticHashTable/staticHashTableTest.C +++ b/applications/test/StaticHashTable/staticHashTableTest.C @@ -91,10 +91,10 @@ int main() HASHTABLE_CLASS<double> table2(table1); - HASHTABLE_CLASS<double> table3(table1.transfer()); + HASHTABLE_CLASS<double> table3(table1.xfer()); Info<< "\ncopy table1 -> table2" << nl - << "transfer table1 -> table3 via the transfer() method" << nl; + << "transfer table1 -> table3 via the xfer() method" << nl; Info<< "\ntable1" << table1 << nl << "\ntable2" << table1 << nl diff --git a/applications/test/dictionary/dictionaryTest.C b/applications/test/dictionary/dictionaryTest.C index 0ac4c225fa48f72af1b0528ed01053d42ce21cf6..611a4cc8f59ccbe9da447b2dfc345d4040ad5bf4 100644 --- a/applications/test/dictionary/dictionaryTest.C +++ b/applications/test/dictionary/dictionaryTest.C @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) << "keys: " << dict1.keys() << nl << "patterns: " << dict1.keys(true) << endl; - dictionary dict2(dict1.transfer()); + dictionary dict2(dict1.xfer()); Info<< "dict1.toc(): " << dict1.name() << " " << dict1.toc() << nl << "dict2.toc(): " << dict2.name() << " " << dict2.toc() << endl; diff --git a/applications/test/xfer/xferListTest.C b/applications/test/xfer/xferListTest.C index 3a4b10e7c3519bf48f7cef25059f7d973147b451..ae22519006b92c951506fc07b17492cb2fbb1ea0 100644 --- a/applications/test/xfer/xferListTest.C +++ b/applications/test/xfer/xferListTest.C @@ -56,8 +56,8 @@ int main(int argc, char *argv[]) Info<< "lstA: " << lstA << endl; Info<< "lstC: " << lstC << endl; - xfer<List<label> > xA = xferMove(lstA); - xfer<List<label> > xB; + Xfer<List<label> > xA = xferMove(lstA); + Xfer<List<label> > xB; List<label> lstB( xA ); @@ -112,8 +112,8 @@ int main(int argc, char *argv[]) Info<< "f1: " << f1 << endl; Info<< "f2: " << f2 << endl; - // note: using xferMoveTo to ensure the correct transfer() method is called - face f3( xferMoveTo<labelList>(dl) ); + // note: xfer() method returns a plain labelList + face f3( dl.xfer() ); Info<< "dl[" << dl.size() << "/" << dl.capacity() << "] " << dl << endl; Info<< "f3: " << f3 << endl; diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudedMesh/extrudedMesh.C b/applications/utilities/mesh/generation/extrudeMesh/extrudedMesh/extrudedMesh.C index 442b5e0485ced828f2da9f7a86aaab4941b8527b..bcbcb3ddb78c20a6ee0ca35055a13d5488945310 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudedMesh/extrudedMesh.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudedMesh/extrudedMesh.C @@ -48,7 +48,7 @@ template template<class> class FaceList, class PointField > -Foam::xfer<Foam::pointField> Foam::extrudedMesh::extrudedPoints +Foam::Xfer<Foam::pointField> Foam::extrudedMesh::extrudedPoints ( const PrimitivePatch<Face, FaceList, PointField>& extrudePatch, const extrudeModel& model @@ -82,7 +82,7 @@ Foam::xfer<Foam::pointField> Foam::extrudedMesh::extrudedPoints template<class Face, template<class> class FaceList, class PointField> -Foam::xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces +Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces ( const PrimitivePatch<Face, FaceList, PointField>& extrudePatch, const extrudeModel& model @@ -184,7 +184,7 @@ Foam::xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces template<class Face, template<class> class FaceList, class PointField> -Foam::xfer<Foam::cellList> Foam::extrudedMesh::extrudedCells +Foam::Xfer<Foam::cellList> Foam::extrudedMesh::extrudedCells ( const PrimitivePatch<Face, FaceList, PointField>& extrudePatch, const extrudeModel& model diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudedMesh/extrudedMesh.H b/applications/utilities/mesh/generation/extrudeMesh/extrudedMesh/extrudedMesh.H index 588a76fd8bac32583236a446cb89b4ef27add4b1..cf23ca40c21aa33fbf73e9cdf4f0c380283e5716 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudedMesh/extrudedMesh.H +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudedMesh/extrudedMesh.H @@ -63,7 +63,7 @@ class extrudedMesh //- Construct and return the extruded mesh points template<class Face, template<class> class FaceList, class PointField> - xfer<pointField> extrudedPoints + Xfer<pointField> extrudedPoints ( const PrimitivePatch<Face, FaceList, PointField>& extrudePatch, const extrudeModel& @@ -71,7 +71,7 @@ class extrudedMesh //- Construct and return the extruded mesh faces template<class Face, template<class> class FaceList, class PointField> - xfer<faceList> extrudedFaces + Xfer<faceList> extrudedFaces ( const PrimitivePatch<Face, FaceList, PointField>& extrudePatch, const extrudeModel& @@ -79,7 +79,7 @@ class extrudedMesh //- Construct and return the extruded mesh cells template<class Face, template<class> class FaceList, class PointField> - xfer<cellList> extrudedCells + Xfer<cellList> extrudedCells ( const PrimitivePatch<Face, FaceList, PointField>& extrudePatch, const extrudeModel& diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index f57cfa09730e55d4c68929ee28f03350dd0a53dc..d93663b78991a05c2ef80ee8eb8ff973872df68b 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -316,7 +316,7 @@ autoPtr<mapPolyMesh> reorderMesh mesh.resetPrimitives ( - xfer<pointField>::null(), + Xfer<pointField>::null(), xferMove(newFaces), xferMove(newOwner), xferMove(newNeighbour), diff --git a/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTableIO.C b/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTableIO.C index 18b41b3284e80b926da9df27bc102462d0a8c99c..d4f73125febc5f6f31dcb1047072c6df56b48d4e 100644 --- a/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTableIO.C +++ b/src/OpenFOAM/containers/HashTables/HashPtrTable/HashPtrTableIO.C @@ -175,13 +175,10 @@ Istream& operator>>(Istream& is, HashPtrTable<T, Key, Hash>& L) template<class T, class Key, class Hash> Ostream& operator<<(Ostream& os, const HashPtrTable<T, Key, Hash>& L) { - // Write size of HashPtrTable - os << nl << L.size(); + // Write size and start delimiter + os << nl << L.size() << nl << token::BEGIN_LIST << nl; - // Write beginning of contents - os << nl << token::BEGIN_LIST << nl; - - // Write HashPtrTable contents + // Write contents for ( typename HashPtrTable<T, Key, Hash>::const_iterator iter = L.begin(); @@ -192,7 +189,7 @@ Ostream& operator<<(Ostream& os, const HashPtrTable<T, Key, Hash>& L) os << iter.key() << token::SPACE << *iter() << nl; } - // Write end of contents + // Write end delimiter os << token::END_LIST; // Check state of IOstream diff --git a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H index bb1688d5e13357083358eef7645caf472102d7fa..889ede7a7da0390fa96cab92bdef48000458ee31 100644 --- a/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H +++ b/src/OpenFOAM/containers/HashTables/HashSet/HashSet.H @@ -101,13 +101,13 @@ public: {} //- Construct by transferring the parameter contents - HashSet(const xfer<HashSet<Key, Hash> >& hs) + HashSet(const Xfer<HashSet<Key, Hash> >& hs) : HashTable<empty, Key, Hash>(hs) {} //- Construct by transferring the parameter contents - HashSet(const xfer<HashTable<empty, Key, Hash> >& hs) + HashSet(const Xfer<HashTable<empty, Key, Hash> >& hs) : HashTable<empty, Key, Hash>(hs) {} diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C index 488c2402fce44c4a638695d31b9ce2b079449773..5daf0eb6fee9ed89b2f5cbc24eb37102bb798c41 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C @@ -81,7 +81,7 @@ Foam::HashTable<T, Key, Hash>::HashTable(const HashTable<T, Key, Hash>& ht) template<class T, class Key, class Hash> Foam::HashTable<T, Key, Hash>::HashTable ( - const xfer<HashTable<T, Key, Hash> >& ht + const Xfer<HashTable<T, Key, Hash> >& ht ) : HashTableName(), diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H index 56877246080451525411021c78ff441d180b2581..a7319c833fe11da5664fe5dcd6978fed21d7078d 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H @@ -41,7 +41,7 @@ SourceFiles #include "label.H" #include "word.H" #include "className.H" -#include "xfer.H" +#include "Xfer.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -156,7 +156,7 @@ public: HashTable(const HashTable<T, Key, Hash>&); //- Construct by transferring the parameter contents - HashTable(const xfer<HashTable<T, Key, Hash> >&); + HashTable(const Xfer<HashTable<T, Key, Hash> >&); // Destructor @@ -214,8 +214,8 @@ public: // and annull the argument table. void transfer(HashTable<T, Key, Hash>&); - //- Transfer the contents to the xfer container - inline xfer<HashTable<T, Key, Hash> > transfer(); + //- Transfer contents to the Xfer container + inline Xfer<HashTable<T, Key, Hash> > xfer(); // Member Operators diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H index abc390c32a238dac6284264a5e7c5d484a37a603..8762d12a9a207c91054857849fe772ab5c26db77 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTableI.H @@ -74,12 +74,10 @@ inline bool Foam::HashTable<T, Key, Hash>::set template<class T, class Key, class Hash> -inline Foam::xfer<Foam::HashTable<T, Key, Hash> > -Foam::HashTable<T, Key, Hash>::transfer() +inline Foam::Xfer<Foam::HashTable<T, Key, Hash> > +Foam::HashTable<T, Key, Hash>::xfer() { - Foam::xfer<HashTable<T, Key, Hash> > xf; - xf().transfer(*this); - return xf; + return xferMove(*this); } diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTableIO.C b/src/OpenFOAM/containers/HashTables/HashTable/HashTableIO.C index f717e5b31e88daf707d7b2aef76435438a6d6fae..d0251f5f21be78622d6c17bac0cffc8e489c5e5b 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTableIO.C +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTableIO.C @@ -168,7 +168,7 @@ Foam::Istream& Foam::operator>>(Istream& is, HashTable<T, Key, Hash>& L) template<class T, class Key, class Hash> Foam::Ostream& Foam::operator<<(Ostream& os, const HashTable<T, Key, Hash>& L) { - // Write size of HashTable and start contents delimiter + // Write size and start delimiter os << nl << L.size() << nl << token::BEGIN_LIST << nl; // Write contents @@ -182,7 +182,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const HashTable<T, Key, Hash>& L) os << iter.key() << token::SPACE << iter() << nl; } - // Write end of contents delimiter + // Write end delimiter os << token::END_LIST; // Check state of IOstream diff --git a/src/OpenFOAM/containers/HashTables/Map/Map.H b/src/OpenFOAM/containers/HashTables/Map/Map.H index 51afde88297e2fee1610050e66526d6e4eb735da..0119593ff1e4197710d0b29f3b734b2098a8f574 100644 --- a/src/OpenFOAM/containers/HashTables/Map/Map.H +++ b/src/OpenFOAM/containers/HashTables/Map/Map.H @@ -81,13 +81,13 @@ public: {} //- Construct by transferring the parameter contents - Map(const xfer<Map<T> >& map) + Map(const Xfer<Map<T> >& map) : HashTable<T, label, Hash<label> >(map) {} //- Construct by transferring the parameter contents - Map(const xfer<HashTable<T, label, Hash<label> > >& map) + Map(const Xfer<HashTable<T, label, Hash<label> > >& map) : HashTable<T, label, Hash<label> >(map) {} diff --git a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.C b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.C index 538f01cb6584ce1ce4280c427a7259d9948bc1c8..50d8ff57639c2db1ecab9ecaf296e9aa87421da9 100644 --- a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.C +++ b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.C @@ -75,7 +75,7 @@ Foam::StaticHashTable<T, Key, Hash>::StaticHashTable template<class T, class Key, class Hash> Foam::StaticHashTable<T, Key, Hash>::StaticHashTable ( - const xfer<StaticHashTable<T, Key, Hash> >& ht + const Xfer<StaticHashTable<T, Key, Hash> >& ht ) : StaticHashTableName(), diff --git a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.H b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.H index 39e9cd55cd7ca62c2d554ca9f377175fd0cf0181..95df9befce4b17740289e00b3998d6ee7f3d8991 100644 --- a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.H +++ b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.H @@ -47,7 +47,7 @@ SourceFiles #include "label.H" #include "word.H" #include "className.H" -#include "xfer.H" +#include "Xfer.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -150,7 +150,7 @@ public: StaticHashTable(const StaticHashTable<T, Key, Hash>&); //- Construct by transferring the parameter contents - StaticHashTable(const xfer<StaticHashTable<T, Key, Hash> >&); + StaticHashTable(const Xfer<StaticHashTable<T, Key, Hash> >&); // Destructor @@ -207,8 +207,8 @@ public: // and annull the argument table. void transfer(StaticHashTable<T, Key, Hash>&); - //- Transfer the contents to the xfer container - inline xfer<StaticHashTable<T, Key, Hash> > transfer(); + //- Transfer contents to the Xfer container + inline Xfer<StaticHashTable<T, Key, Hash> > xfer(); // Member Operators diff --git a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableI.H b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableI.H index f52e7002a459df10e5dca6b1d785acdbdbf79d94..104cbbf3feb8a31ec66a65791e225daa340d2150 100644 --- a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableI.H +++ b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableI.H @@ -61,12 +61,10 @@ inline bool Foam::StaticHashTable<T, Key, Hash>::set template<class T, class Key, class Hash> -inline Foam::xfer<Foam::StaticHashTable<T, Key, Hash> > -Foam::StaticHashTable<T, Key, Hash>::transfer() +inline Foam::Xfer<Foam::StaticHashTable<T, Key, Hash> > +Foam::StaticHashTable<T, Key, Hash>::xfer() { - Foam::xfer<StaticHashTable<T, Key, Hash> > xf; - xf().transfer(*this); - return xf; + return xferMove(*this); } diff --git a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableIO.C b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableIO.C index 4b217b2dd30e07d8633a2a9d919fed773a6f742b..064ce3c6198198464e0557044302181adc629d95 100644 --- a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableIO.C +++ b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTableIO.C @@ -180,7 +180,7 @@ Foam::Ostream& Foam::operator<< Ostream& os, const StaticHashTable<T, Key, Hash>& L) { - // Write size of HashTable and start contents delimiter + // Write size and start delimiter os << nl << L.size() << nl << token::BEGIN_LIST << nl; // Write contents @@ -194,7 +194,7 @@ Foam::Ostream& Foam::operator<< os << iter.key() << token::SPACE << iter() << nl; } - // Write end of contents delimiter + // Write end delimiter os << token::END_LIST; // Check state of IOstream diff --git a/src/OpenFOAM/containers/Identifiers/Keyed/Keyed.H b/src/OpenFOAM/containers/Identifiers/Keyed/Keyed.H index 161b4d19556fbcb2c70ea1f256d80cd5f472ac8c..0a5745cc8f6f280ef5a110a53151a6e5e93cb4b7 100644 --- a/src/OpenFOAM/containers/Identifiers/Keyed/Keyed.H +++ b/src/OpenFOAM/containers/Identifiers/Keyed/Keyed.H @@ -39,7 +39,6 @@ SourceFiles #define Keyed_H #include "List.H" -#include "xfer.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -49,7 +48,6 @@ namespace Foam // Forward declaration of friend functions and operators template<class T> class Keyed; -template<class T> class xfer; template<class T> Istream& operator>>(Istream&, Keyed<T>&); template<class T> Ostream& operator<<(Ostream&, const Keyed<T>&); @@ -95,7 +93,7 @@ public: inline Keyed(const T& item, const label key=0); //- Construct by transferring the item, with a key - inline Keyed(const xfer<T>& item, const label key=0); + inline Keyed(const Xfer<T>& item, const label key=0); //- Construct from Istream inline Keyed(Istream&); diff --git a/src/OpenFOAM/containers/Identifiers/Keyed/KeyedI.H b/src/OpenFOAM/containers/Identifiers/Keyed/KeyedI.H index f902f56da11bd9f24e221f28ac6ec8807491acf0..66af277d7826ef1720047f1c2bd8b0cc26fd295b 100644 --- a/src/OpenFOAM/containers/Identifiers/Keyed/KeyedI.H +++ b/src/OpenFOAM/containers/Identifiers/Keyed/KeyedI.H @@ -46,7 +46,7 @@ inline Foam::Keyed<T>::Keyed(const T& item, const label key) template<class T> -inline Foam::Keyed<T>::Keyed(const xfer<T>& item, const label key) +inline Foam::Keyed<T>::Keyed(const Xfer<T>& item, const label key) : T(item), key_(key) diff --git a/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectList.H b/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectList.H index e2a7ecef910b6c5629d551fd2d5262c49902aa86..6e60d13d8afdb41cb9eeffa41490c204e6cd9810 100644 --- a/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectList.H +++ b/src/OpenFOAM/containers/Lists/BiIndirectList/BiIndirectList.H @@ -26,8 +26,7 @@ Class Foam::BiIndirectList Description - Indexes into left list (negative index) or right list (zero or positive - index). + Indexes into negList (negative index) or posList (zero or positive index). SourceFiles BiIndirectListI.H @@ -82,8 +81,8 @@ public: inline List<label>& addressing(); //- Calculate index given whether index is into posList or negList - inline static label posIndex(const label i); - inline static label negIndex(const label i); + inline static label posIndex(const label); + inline static label negIndex(const label); // Member Operators diff --git a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C index c0ebedd6c82079d1ac4d77c637aa584b2a0ba624..88a908c74f65523592250581fb2bda05d4a7dab6 100644 --- a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C +++ b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.C @@ -97,7 +97,7 @@ Foam::CompactListList<T>::CompactListList template<class T> Foam::CompactListList<T>::CompactListList ( - const xfer<CompactListList<T> >& lst + const Xfer<CompactListList<T> >& lst ) { transfer(lst()); diff --git a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H index 5da6e0f2f9b4f5f49d37b230c1bb0ab926fb46e6..91a6729706ddb010ddf818f3a5d4046cdc380474 100644 --- a/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H +++ b/src/OpenFOAM/containers/Lists/CompactListList/CompactListList.H @@ -104,7 +104,7 @@ public: CompactListList(const UList<label>& rowSizes, const T&); //- Construct by transferring the parameter contents - CompactListList(const xfer<CompactListList<T> >&); + CompactListList(const Xfer<CompactListList<T> >&); //- Construct as copy or re-use as specified. CompactListList(CompactListList<T>&, bool reUse); @@ -164,8 +164,8 @@ public: // into this CompactListList and annull the argument list. void transfer(CompactListList<T>&); - //- Transfer the contents to the xfer container - inline xfer<CompactListList<T> > transfer(); + //- Transfer the contents to the Xfer container + inline Xfer<CompactListList<T> > xfer(); // Other diff --git a/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H b/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H index 34bbcc46691f4d3ca68e7e91a15bc68efeff7366..851609ba7c2369fad2f48c40a6b997ee693404d7 100644 --- a/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H +++ b/src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H @@ -82,7 +82,7 @@ inline const Foam::List<Foam::label>& Foam::CompactListList<T>::offsets() const template<class T> -inline Foam::List<label>& Foam::CompactListList<T>::offsets() +inline Foam::List<Foam::label>& Foam::CompactListList<T>::offsets() { return offsets_; } @@ -127,7 +127,7 @@ inline Foam::label Foam::CompactListList<T>::whichRow(const label i) const { FatalErrorIn ( - "CompactListList<T>::whichRow(const label i) const" + "CompactListList<T>::whichRow(const label) const" ) << "Index " << i << " outside 0.." << m_.size() << abort(FatalError); } @@ -156,12 +156,9 @@ inline Foam::label Foam::CompactListList<T>::whichColumn template<class T> -inline Foam::xfer<Foam::CompactListList<T> > -Foam::CompactListList<T>::transfer() +inline Foam::Xfer<Foam::CompactListList<T> > Foam::CompactListList<T>::xfer() { - Foam::xfer<CompactListList<T> > xf; - xf().transfer(*this); - return xf; + return xferMove(*this); } diff --git a/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H b/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H index bdf0bc4d43507a59767934794320ce410ccbd538..dbbcb82b80189e745400cfb5431030c7f1be5a23 100644 --- a/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H +++ b/src/OpenFOAM/containers/Lists/DynamicList/DynamicList.H @@ -104,6 +104,9 @@ public: //- Construct from UList. Size set to UList size. explicit inline DynamicList(const UList<T>&); + //- Construct by transferring the parameter contents + explicit inline DynamicList(const Xfer<List<T> >&); + //- Construct from Istream. Size set to size of read list. explicit DynamicList(Istream&); @@ -153,8 +156,8 @@ public: //- Transfer contents of the argument DynamicList into this DynamicList inline void transfer(DynamicList<T, SizeInc, SizeMult, SizeDiv>&); - //- Transfer the contents to the xfer container as a plain List - inline xfer<List<T> > transfer(); + //- Transfer contents to the Xfer container as a plain List + inline Xfer<List<T> > xfer(); // Member Operators diff --git a/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H b/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H index 61566c23b4d8cb266beace7b1808ffaecea89ea8..62301bb123516b0a8e2974aeb6f8c47b4d57ba9a 100644 --- a/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H +++ b/src/OpenFOAM/containers/Lists/DynamicList/DynamicListI.H @@ -60,6 +60,18 @@ inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList {} +template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv> +inline Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::DynamicList +( + const Xfer<List<T> >& lst +) +: + List<T>(lst), + capacity_(List<T>::size()) +{} + + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv> @@ -212,12 +224,10 @@ Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::transfer template<class T, unsigned SizeInc, unsigned SizeMult, unsigned SizeDiv> -inline Foam::xfer<Foam::List<T> > -Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::transfer() +inline Foam::Xfer<Foam::List<T> > +Foam::DynamicList<T, SizeInc, SizeMult, SizeDiv>::xfer() { - Foam::xfer<List<T> > xf; - xf().transfer(*this); - return xf; + return xferMoveTo<List<T> >(*this); } diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedList.H b/src/OpenFOAM/containers/Lists/FixedList/FixedList.H index 3d08f17981ba213199bf6f2e974f56f7ab95100b..9171c6253decd5715d03404d929d2f5ac584556b 100644 --- a/src/OpenFOAM/containers/Lists/FixedList/FixedList.H +++ b/src/OpenFOAM/containers/Lists/FixedList/FixedList.H @@ -77,19 +77,15 @@ class FixedList public: //- Hashing function class + // Rotating hash from http://burtleburtle.net/bob/hash/doobs.html template<class HashT=Hash<T> > class Hash : public Foam::Hash<FixedList<T, Size> > { - public: - inline Hash(); - - //- Rotating Hash. From http://burtleburtle.net/bob/hash/doobs.html. label operator()(const FixedList<T, Size>&) const; - label operator() ( const FixedList<T, Size>&, @@ -165,10 +161,10 @@ public: void transfer(const FixedList<T, Size>&); //- Write the FixedList as a dictionary entry - void writeEntry(Ostream& os) const; + void writeEntry(Ostream&) const; //- Write the FixedList as a dictionary entry with keyword - void writeEntry(const word& keyword, Ostream& os) const; + void writeEntry(const word& keyword, Ostream&) const; // Member operators diff --git a/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C b/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C index 9c0dc5b1771da3c1fa0463d49be018b0ed760b98..b76bf3be242f3485f5ee6dd9d77aa0c5b305f263 100644 --- a/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C +++ b/src/OpenFOAM/containers/Lists/FixedList/FixedListIO.C @@ -148,7 +148,7 @@ void Foam::FixedList<T, Size>::writeEntry(Ostream& os) const { os << word("List<" + word(pTraits<T>::typeName) + '>') << " "; } - + os << *this; } @@ -190,43 +190,42 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const FixedList<T, Size>& L) if (uniform) { - // Write size of list (so it is valid dictionary entry) and - // start contents delimiter + // Write size (so it is valid dictionary entry) and start delimiter os << L.size() << token::BEGIN_BLOCK; - // Write list contents + // Write contents os << L[0]; - // Write end of contents delimiter + // Write end delimiter os << token::END_BLOCK; } else if (Size < 11 && contiguous<T>()) { - // Write start of contents delimiter + // Write start delimiter os << token::BEGIN_LIST; - // Write list contents + // Write contents forAll(L, i) { if (i > 0) os << token::SPACE; os << L[i]; } - // Write end of contents delimiter + // Write end delimiter os << token::END_LIST; } else { - // Write start of contents delimiter + // Write start delimiter os << nl << token::BEGIN_LIST; - // Write list contents + // Write contents forAll(L, i) { os << nl << L[i]; } - // Write end of contents delimiter + // Write end delimiter os << nl << token::END_LIST << nl; } } diff --git a/src/OpenFOAM/containers/Lists/Histogram/Histogram.H b/src/OpenFOAM/containers/Lists/Histogram/Histogram.H index 9c883786e6499ee8c8645ffec633b2158ff32bdc..8010da7a63806bdd82ce228d2f5650f5cd89e4a4 100644 --- a/src/OpenFOAM/containers/Lists/Histogram/Histogram.H +++ b/src/OpenFOAM/containers/Lists/Histogram/Histogram.H @@ -45,7 +45,7 @@ namespace Foam /*---------------------------------------------------------------------------*\ - Class Histogram Declaration + Class Histogram Declaration \*---------------------------------------------------------------------------*/ template<class List> diff --git a/src/OpenFOAM/containers/Lists/List/List.C b/src/OpenFOAM/containers/Lists/List/List.C index 2dd08f3e56e9bbb3904b0bd2b8504fb92d29d499..601d41e440be01e73dbd661021a64685400d3fd7 100644 --- a/src/OpenFOAM/containers/Lists/List/List.C +++ b/src/OpenFOAM/containers/Lists/List/List.C @@ -72,7 +72,7 @@ Foam::List<T>::List(const label s, const T& a) { if (this->size_ < 0) { - FatalErrorIn("List<T>::List(const label size, const T a)") + FatalErrorIn("List<T>::List(const label size, const T&)") << "bad size " << this->size_ << abort(FatalError); } @@ -127,7 +127,7 @@ Foam::List<T>::List(const List<T>& a) // Construct by transferring the parameter contents template<class T> -Foam::List<T>::List(const xfer<List<T> >& lst) +Foam::List<T>::List(const Xfer<List<T> >& lst) { transfer(lst()); } diff --git a/src/OpenFOAM/containers/Lists/List/List.H b/src/OpenFOAM/containers/Lists/List/List.H index a153735a1d274d778809d54e0dcdbc28a8663ceb..f7df85a658ef4fcff3bd7d48c6f6691539a5047e 100644 --- a/src/OpenFOAM/containers/Lists/List/List.H +++ b/src/OpenFOAM/containers/Lists/List/List.H @@ -43,7 +43,7 @@ SourceFiles #include "UList.H" #include "autoPtr.H" -#include "xfer.H" +#include "Xfer.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -102,7 +102,7 @@ public: List(const List<T>&); //- Construct by transferring the parameter contents - List(const xfer<List<T> >&); + List(const Xfer<List<T> >&); //- Construct as copy or re-use as specified. List(List<T>&, bool reUse); @@ -178,8 +178,8 @@ public: // and annull the argument list. void transfer(SortableList<T>&); - //- Transfer the contents to the xfer container - inline xfer<List<T> > transfer(); + //- Transfer contents to the Xfer container + inline Xfer<List<T> > xfer(); //- Return subscript-checked element of UList. inline T& newElmt(const label); diff --git a/src/OpenFOAM/containers/Lists/List/ListI.H b/src/OpenFOAM/containers/Lists/List/ListI.H index 2b856c24dc2ce810f1e635f1bf65515903c09563..5a9287cf665bb4642503601068ff58ea492bf4cd 100644 --- a/src/OpenFOAM/containers/Lists/List/ListI.H +++ b/src/OpenFOAM/containers/Lists/List/ListI.H @@ -67,11 +67,9 @@ inline Foam::label Foam::List<T>::size() const template<class T> -inline Foam::xfer<Foam::List<T> > Foam::List<T>::transfer() +inline Foam::Xfer<Foam::List<T> > Foam::List<T>::xfer() { - Foam::xfer<List<T> > xf; - xf().transfer(*this); - return xf; + return xferMove(*this); } diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedList.C b/src/OpenFOAM/containers/Lists/PackedList/PackedList.C index de6d0938658e807c0900a4da504a55ac9337cf03..252b3690671a864d64eb269a80701414aad016a3 100644 --- a/src/OpenFOAM/containers/Lists/PackedList/PackedList.C +++ b/src/OpenFOAM/containers/Lists/PackedList/PackedList.C @@ -47,7 +47,7 @@ Foam::PackedList<nBits>::PackedList(const PackedList<nBits>& lst) template<int nBits> -Foam::PackedList<nBits>::PackedList(const xfer<PackedList<nBits> >& lst) +Foam::PackedList<nBits>::PackedList(const Xfer<PackedList<nBits> >& lst) { transfer(lst()); } diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedList.H b/src/OpenFOAM/containers/Lists/PackedList/PackedList.H index 4f1a745c8e377f937e859e0bc0bb8d03eeab3c09..ea75d13eda2be8ca64266f17cf5a7bfa6e4d188a 100644 --- a/src/OpenFOAM/containers/Lists/PackedList/PackedList.H +++ b/src/OpenFOAM/containers/Lists/PackedList/PackedList.H @@ -135,7 +135,7 @@ public: PackedList(const PackedList<nBits>& PList); //- Construct by transferring the parameter contents - PackedList(const xfer<PackedList<nBits> >&); + PackedList(const Xfer<PackedList<nBits> >&); //- Construct from a list of labels PackedList(const UList<label>&); @@ -157,8 +157,8 @@ public: // and annull the argument list. void transfer(PackedList<nBits>&); - //- Transfer the contents to the xfer container - inline xfer<PackedList<nBits> > transfer(); + //- Transfer contents to the Xfer container + inline Xfer<PackedList<nBits> > xfer(); // Access diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedListI.H b/src/OpenFOAM/containers/Lists/PackedList/PackedListI.H index dd8cf50ea3a9dd089dc062538c35c25141d8d0c0..809ae08ab5f24a66d2812e4b0766389ddba671be 100644 --- a/src/OpenFOAM/containers/Lists/PackedList/PackedListI.H +++ b/src/OpenFOAM/containers/Lists/PackedList/PackedListI.H @@ -187,12 +187,10 @@ inline Foam::List<unsigned int>& Foam::PackedList<nBits>::storage() template<int nBits> -inline Foam::xfer<Foam::PackedList<nBits> > -Foam::PackedList<nBits>::transfer() +inline Foam::Xfer<Foam::PackedList<nBits> > +Foam::PackedList<nBits>::xfer() { - Foam::xfer<PackedList<nBits> > xf; - xf().transfer(*this); - return xf; + return xferMove(*this); } diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrList.C b/src/OpenFOAM/containers/Lists/PtrList/PtrList.C index 591423dab1c07378f597a816ed87e0394c370477..ac251dc4ce66fe33d4a1089762eea4f8650852b0 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrList.C +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrList.C @@ -72,7 +72,7 @@ Foam::PtrList<T>::PtrList(const PtrList<T>& a, const CloneArg& cloneArg) template<class T> -Foam::PtrList<T>::PtrList(const xfer<PtrList<T> >& lst) +Foam::PtrList<T>::PtrList(const Xfer<PtrList<T> >& lst) { transfer(lst()); } diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrList.H b/src/OpenFOAM/containers/Lists/PtrList/PtrList.H index 410db85eca3c9ba6d38b586d79db1649fc97eba6..b90f0f0b6f8ff857d80dc1e18983507d9b178d67 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrList.H +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrList.H @@ -130,7 +130,7 @@ public: PtrList(const PtrList<T>&, const CloneArg&); //- Construct by transferring the parameter contents - PtrList(const xfer<PtrList<T> >&); + PtrList(const Xfer<PtrList<T> >&); //- Construct as copy or re-use as specified. PtrList(PtrList<T>&, bool reUse); @@ -175,8 +175,8 @@ public: // and annull the argument list. void transfer(PtrList<T>&); - //- Transfer the contents to the xfer container - inline xfer<PtrList<T> > transfer(); + //- Transfer contents to the Xfer container + inline Xfer<PtrList<T> > xfer(); //- Is element set inline bool set(const label) const; diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H b/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H index db6efa723a169910c02754164f16d014d228264b..fe983406cfa24fed1a0a8a677226a31c079cd73e 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H @@ -79,11 +79,9 @@ inline Foam::autoPtr<T> Foam::PtrList<T>::set template<class T> -inline Foam::xfer<Foam::PtrList<T> > Foam::PtrList<T>::transfer() +inline Foam::Xfer<Foam::PtrList<T> > Foam::PtrList<T>::xfer() { - Foam::xfer<PtrList<T> > xf; - xf().transfer(*this); - return xf; + return xferMove(*this); } diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrListIO.C b/src/OpenFOAM/containers/Lists/PtrList/PtrListIO.C index 0ad33253adbcb8bf964f3dd9927e7d15462a1ec7..e427f68d8d411f1a88e444836e4d603166c511fb 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrListIO.C +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrListIO.C @@ -36,13 +36,13 @@ template<class T> template<class INew> void Foam::PtrList<T>::read(Istream& is, const INew& inewt) { - is.fatalCheck("PtrList<T>::read(Istream& is, const INew& inewt)"); + is.fatalCheck("PtrList<T>::read(Istream&, const INew&)"); token firstToken(is); is.fatalCheck ( - "PtrList<T>::read(Istream& is, const INew& inewt) : " + "PtrList<T>::read(Istream&, const INew&) : " "reading first token" ); @@ -66,7 +66,7 @@ void Foam::PtrList<T>::read(Istream& is, const INew& inewt) is.fatalCheck ( - "PtrList<T>::read(Istream& is, const INew& inewt) : " + "PtrList<T>::read(Istream&, const INew&) : " "reading entry" ); } @@ -78,7 +78,7 @@ void Foam::PtrList<T>::read(Istream& is, const INew& inewt) is.fatalCheck ( - "PtrList<T>::read(Istream& is, const INew& inewt) : " + "PtrList<T>::read(Istream&, const INew&) : " "reading the single entry" ); @@ -98,7 +98,7 @@ void Foam::PtrList<T>::read(Istream& is, const INew& inewt) { FatalIOErrorIn ( - "PtrList<T>::read(Istream& is, const INew& inewt)", + "PtrList<T>::read(Istream&, const INew&)", is ) << "incorrect first token, '(', found " << firstToken.info() << exit(FatalIOError); @@ -137,7 +137,7 @@ void Foam::PtrList<T>::read(Istream& is, const INew& inewt) { FatalIOErrorIn ( - "PtrList<T>::read(Istream& is, const INew& inewt)", + "PtrList<T>::read(Istream&, const INew&)", is ) << "incorrect first token, expected <int> or '(', found " << firstToken.info() @@ -180,16 +180,16 @@ Foam::Istream& Foam::operator>>(Istream& is, PtrList<T>& L) template<class T> Foam::Ostream& Foam::operator<<(Ostream& os, const PtrList<T>& L) { - // Write size of list and start contents delimiter + // Write size and start delimiter os << nl << L.size() << nl << token::BEGIN_LIST; - // Write list contents + // Write contents forAll(L, i) { os << nl << L[i]; } - // Write end of contents delimiter + // Write end delimiter os << nl << token::END_LIST << nl; // Check state of IOstream diff --git a/src/OpenFOAM/containers/Lists/SortableList/SortableList.C b/src/OpenFOAM/containers/Lists/SortableList/SortableList.C index 3ac809c82416804ae0af581eaa55c532222011d7..cc0c52776d0569f59332ecc85fd6144f966f12c0 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/SortableList.C +++ b/src/OpenFOAM/containers/Lists/SortableList/SortableList.C @@ -26,8 +26,8 @@ License // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // -template <class Type> -void Foam::SortableList<Type>::sortIndices(List<label>& ind) const +template<class T> +void Foam::SortableList<T>::sortIndices(List<label>& ind) const { // list lengths must be identical ind.setSize(this->size()); @@ -37,53 +37,53 @@ void Foam::SortableList<Type>::sortIndices(List<label>& ind) const ind[i] = i; } - Foam::stableSort(ind, typename UList<Type>::less(*this)); + Foam::stableSort(ind, typename UList<T>::less(*this)); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template <class Type> -Foam::SortableList<Type>::SortableList() +template<class T> +Foam::SortableList<T>::SortableList() {} -template <class Type> -Foam::SortableList<Type>::SortableList(const UList<Type>& values) +template<class T> +Foam::SortableList<T>::SortableList(const UList<T>& values) : - List<Type>(values) + List<T>(values) { sort(); } -template <class Type> -Foam::SortableList<Type>::SortableList(const xfer<List<Type> >& values) +template<class T> +Foam::SortableList<T>::SortableList(const Xfer<List<T> >& values) : - List<Type>(values) + List<T>(values) { sort(); } -template <class Type> -Foam::SortableList<Type>::SortableList(const label size) +template<class T> +Foam::SortableList<T>::SortableList(const label size) : - List<Type>(size) + List<T>(size) {} -template <class Type> -Foam::SortableList<Type>::SortableList(const label size, const Type& val) +template<class T> +Foam::SortableList<T>::SortableList(const label size, const T& val) : - List<Type>(size, val) + List<T>(size, val) {} -template <class Type> -Foam::SortableList<Type>::SortableList(const SortableList<Type>& lst) +template<class T> +Foam::SortableList<T>::SortableList(const SortableList<T>& lst) : - List<Type>(lst), + List<T>(lst), indices_(lst.indices()) {} @@ -91,83 +91,81 @@ Foam::SortableList<Type>::SortableList(const SortableList<Type>& lst) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template <class Type> -void Foam::SortableList<Type>::clear() +template<class T> +void Foam::SortableList<T>::clear() { - List<Type>::clear(); + List<T>::clear(); indices_.clear(); } -template <class Type> -Foam::List<Type>& Foam::SortableList<Type>::shrink() +template<class T> +Foam::List<T>& Foam::SortableList<T>::shrink() { indices_.clear(); - return static_cast<List<Type>&>(*this); + return static_cast<List<T>&>(*this); } -template <class Type> -void Foam::SortableList<Type>::sort() +template<class T> +void Foam::SortableList<T>::sort() { sortIndices(indices_); - List<Type> lst(this->size()); + List<T> lst(this->size()); forAll(indices_, i) { lst[i] = this->operator[](indices_[i]); } - List<Type>::transfer(lst); + List<T>::transfer(lst); } -template <class Type> -void Foam::SortableList<Type>::reverseSort() +template<class T> +void Foam::SortableList<T>::reverseSort() { sortIndices(indices_); - List<Type> lst(this->size()); + List<T> lst(this->size()); label endI = indices_.size(); forAll(indices_, i) { lst[--endI] = this->operator[](indices_[i]); } - List<Type>::transfer(lst); + List<T>::transfer(lst); } -template <class Type> -Foam::xfer<Foam::List<Type> > Foam::SortableList<Type>::transfer() +template<class T> +Foam::Xfer<Foam::List<T> > Foam::SortableList<T>::xfer() { - Foam::xfer<List<T> > xf; - xf().transfer(*this); - return xf; + return xferMoveTo<List<T> >(*this); } // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template <class Type> -inline void Foam::SortableList<Type>::operator=(const Type& t) +template<class T> +inline void Foam::SortableList<T>::operator=(const T& t) { - UList<Type>::operator=(t); + UList<T>::operator=(t); } -template <class Type> -inline void Foam::SortableList<Type>::operator=(const UList<Type>& rhs) +template<class T> +inline void Foam::SortableList<T>::operator=(const UList<T>& rhs) { - List<Type>::operator=(rhs); + List<T>::operator=(rhs); indices_.clear(); } -template <class Type> -inline void Foam::SortableList<Type>::operator=(const SortableList<Type>& rhs) +template<class T> +inline void Foam::SortableList<T>::operator=(const SortableList<T>& rhs) { - List<Type>::operator=(rhs); + List<T>::operator=(rhs); indices_ = rhs.indices(); } diff --git a/src/OpenFOAM/containers/Lists/SortableList/SortableList.H b/src/OpenFOAM/containers/Lists/SortableList/SortableList.H index 43dcbc280f1edcdc9a8ffb4bc1270eb859d11cfe..0496f6f8a8531532377f8872aed8fab05cc6f569 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/SortableList.H +++ b/src/OpenFOAM/containers/Lists/SortableList/SortableList.H @@ -50,10 +50,10 @@ namespace Foam Class SortableList Declaration \*---------------------------------------------------------------------------*/ -template <class Type> +template<class T> class SortableList : - public List<Type> + public List<T> { // Private data @@ -71,10 +71,10 @@ public: SortableList(); //- Construct from UList, sorting immediately. - explicit SortableList(const UList<Type>&); + explicit SortableList(const UList<T>&); //- Construct from transferred List, sorting immediately. - explicit SortableList(const xfer<List<Type> >&); + explicit SortableList(const Xfer<List<T> >&); //- Construct given size. Sort later on. // The indices remain empty until the list is sorted @@ -82,10 +82,10 @@ public: //- Construct given size and initial value. Sort later on. // The indices remain empty until the list is sorted - SortableList(const label size, const Type&); + SortableList(const label size, const T&); //- Construct as copy. - SortableList(const SortableList<Type>&); + SortableList(const SortableList<T>&); // Member Functions @@ -106,7 +106,7 @@ public: void clear(); //- Clear the indices and return a reference to the underlying List - List<Type>& shrink(); + List<T>& shrink(); //- (stable) sort the list (if changed after construction time) // also resizes the indices as required @@ -114,20 +114,21 @@ public: //- Reverse (stable) sort the list void reverseSort(); - - //- Transfer the contents to the xfer container as a plain List - inline Foam::xfer<List<T> > transfer(); + + //- Transfer contents to the Xfer container as a plain List + inline Xfer<List<T> > xfer(); + // Member Operators //- Assignment of all entries to the given value - inline void operator=(const Type&); + inline void operator=(const T&); //- Assignment from UList operator. Takes linear time. - inline void operator=(const UList<Type>&); + inline void operator=(const UList<T>&); //- Assignment operator. Takes linear time. - inline void operator=(const SortableList<Type>&); + inline void operator=(const SortableList<T>&); }; diff --git a/src/OpenFOAM/containers/Lists/SubList/SubList.H b/src/OpenFOAM/containers/Lists/SubList/SubList.H index 24e445e69c81390cd69a7bcdf7da3709c1643241..c7ea84a26c835b9e45783fd93107ddb53e7981cb 100644 --- a/src/OpenFOAM/containers/Lists/SubList/SubList.H +++ b/src/OpenFOAM/containers/Lists/SubList/SubList.H @@ -61,14 +61,14 @@ public: // Constructors - //- Construct from UList and SubList size + //- Construct from UList and sub-list size inline SubList ( const UList<T>& list, const label subSize ); - //- Construct from UList, start and end indices + //- Construct from UList, sub-list size and start index inline SubList ( const UList<T>& list, diff --git a/src/OpenFOAM/containers/Lists/UList/UList.H b/src/OpenFOAM/containers/Lists/UList/UList.H index 01ec0fac05bbd7ecdd83595316dbe52e0a18cd89..688fba7dac571b8da38ce7a12daca6327ad1e7fc 100644 --- a/src/OpenFOAM/containers/Lists/UList/UList.H +++ b/src/OpenFOAM/containers/Lists/UList/UList.H @@ -51,18 +51,12 @@ SourceFiles namespace Foam { -//- Pre-declare related List type -template<class T> -class List; - -//- Pre-declare related SubList type -template<class T> -class SubList; +// Forward declaration of friend classes +template<class T> class List; +template<class T> class SubList; // Forward declaration of friend functions and operators - template<class T> class UList; - template<class T> Ostream& operator<<(Ostream&, const UList<T>&); @@ -157,10 +151,10 @@ public: //- Write the UList as a dictionary entry. - void writeEntry(Ostream& os) const; + void writeEntry(Ostream&) const; //- Write the UList as a dictionary entry with keyword. - void writeEntry(const word& keyword, Ostream& os) const; + void writeEntry(const word& keyword, Ostream&) const; //- Assign elements to those from UList. void assign(const UList<T>&); @@ -306,11 +300,11 @@ public: // Reverse the first n elements of the list template<class T> -inline void reverse(UList<T>& ul, const label n); +inline void reverse(UList<T>&, const label n); // Reverse all the elements of the list template<class T> -inline void reverse(UList<T>& ul); +inline void reverse(UList<T>&); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/containers/Lists/UList/UListIO.C b/src/OpenFOAM/containers/Lists/UList/UListIO.C index 2b0394738dbb0d1fdc237128077a394732de63b6..967462fb171fc91c511d2fbde76db74424b9329f 100644 --- a/src/OpenFOAM/containers/Lists/UList/UListIO.C +++ b/src/OpenFOAM/containers/Lists/UList/UListIO.C @@ -83,42 +83,42 @@ Foam::Ostream& Foam::operator<<(Foam::Ostream& os, const Foam::UList<T>& L) if (uniform) { - // Write size of list and start contents delimiter + // Write size and start delimiter os << L.size() << token::BEGIN_BLOCK; - // Write list contents + // Write contents os << L[0]; - // Write end of contents delimiter + // Write end delimiter os << token::END_BLOCK; } else if (L.size() < 11 && contiguous<T>()) { - // Write size of list and start contents delimiter + // Write size and start delimiter os << L.size() << token::BEGIN_LIST; - // Write list contents + // Write contents forAll(L, i) { if (i > 0) os << token::SPACE; os << L[i]; } - // Write end of contents delimiter + // Write end delimiter os << token::END_LIST; } else { - // Write size of list and start contents delimiter + // Write size and start delimiter os << nl << L.size() << nl << token::BEGIN_LIST; - // Write list contents + // Write contents forAll(L, i) { os << nl << L[i]; } - // Write end of contents delimiter + // Write end delimiter os << nl << token::END_LIST << nl; } } diff --git a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C index fa4e73ee26230b2f11e4d1fbe21f00c0cce9c57b..8209f53c6406c617c4fe0abd59975f68299cb5cd 100644 --- a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C +++ b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C @@ -29,36 +29,31 @@ License #include "UPtrList.H" #include "PtrListLoopM.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * // template<class T> -UPtrList<T>::UPtrList() +Foam::UPtrList<T>::UPtrList() : ptrs_() {} template<class T> -UPtrList<T>::UPtrList(const label s) +Foam::UPtrList<T>::UPtrList(const label s) : ptrs_(s, reinterpret_cast<T*>(NULL)) {} template<class T> -UPtrList<T>::UPtrList(const xfer<UPtrList<T> >& lst) +Foam::UPtrList<T>::UPtrList(const Xfer<UPtrList<T> >& lst) { transfer(lst()); } template<class T> -UPtrList<T>::UPtrList(UPtrList<T>& a, bool reUse) +Foam::UPtrList<T>::UPtrList(UPtrList<T>& a, bool reUse) : ptrs_(a.ptrs_, reUse) {} @@ -67,11 +62,11 @@ UPtrList<T>::UPtrList(UPtrList<T>& a, bool reUse) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class T> -void UPtrList<T>::setSize(const label newSize) +void Foam::UPtrList<T>::setSize(const label newSize) { label oldSize = size(); - if (newSize == 0) + if (newSize <= 0) { clear(); } @@ -83,8 +78,8 @@ void UPtrList<T>::setSize(const label newSize) { ptrs_.setSize(newSize); - register label i; - for (i=oldSize; i<newSize; i++) + // set new elements to NULL + for (register label i=oldSize; i<newSize; i++) { ptrs_[i] = NULL; } @@ -93,7 +88,7 @@ void UPtrList<T>::setSize(const label newSize) template<class T> -void UPtrList<T>::clear() +void Foam::UPtrList<T>::clear() { ptrs_.clear(); } @@ -102,14 +97,14 @@ void UPtrList<T>::clear() // Transfer the contents of the argument List into this List // and anull the argument list template<class T> -void UPtrList<T>::transfer(UPtrList<T>& a) +void Foam::UPtrList<T>::transfer(UPtrList<T>& a) { ptrs_.transfer(a.ptrs_); } template<class T> -void UPtrList<T>::reorder(const UList<label>& oldToNew) +void Foam::UPtrList<T>::reorder(const UList<label>& oldToNew) { if (oldToNew.size() != size()) { @@ -156,10 +151,6 @@ void UPtrList<T>::reorder(const UList<label>& oldToNew) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "UPtrListIO.C" diff --git a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H index 51940caf5aa09ebb8c7b17cba881b0bf0f24dade..05e0078701d3714112cbb0ca99eda8d4d72f3e66 100644 --- a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H +++ b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.H @@ -111,7 +111,7 @@ public: explicit UPtrList(const label); //- Construct by transferring the parameter contents - UPtrList(const xfer<UPtrList<T> >&); + UPtrList(const Xfer<UPtrList<T> >&); //- Construct as copy or re-use as specified. UPtrList(UPtrList<T>&, bool reUse); @@ -139,8 +139,8 @@ public: // UPtrList and annull the argument list. void transfer(UPtrList<T>&); - //- Transfer the contents to the xfer container - inline xfer<UPtrList<T> > transfer(); + //- Transfer contents to the Xfer container + inline Xfer<UPtrList<T> > xfer(); //- Is element set inline bool set(const label) const; diff --git a/src/OpenFOAM/containers/Lists/UPtrList/UPtrListI.H b/src/OpenFOAM/containers/Lists/UPtrList/UPtrListI.H index 837d2d6d9a4ccf502f9f15a683264795c4fbc795..73663843d8631c69049856fc1d93a022e0c7c78d 100644 --- a/src/OpenFOAM/containers/Lists/UPtrList/UPtrListI.H +++ b/src/OpenFOAM/containers/Lists/UPtrList/UPtrListI.H @@ -51,11 +51,9 @@ inline T* Foam::UPtrList<T>::set(const label i, T* ptr) } template<class T> -inline Foam::xfer<Foam::UPtrList<T> > Foam::UPtrList<T>::transfer() +inline Foam::Xfer<Foam::UPtrList<T> > Foam::UPtrList<T>::xfer() { - Foam::xfer<UPtrList<T> > xf; - xf().transfer(*this); - return xf; + return xferMove(*this); } diff --git a/src/OpenFOAM/containers/Lists/UPtrList/UPtrListIO.C b/src/OpenFOAM/containers/Lists/UPtrList/UPtrListIO.C index 891e936d252d54e0c87c50e4f1070fa880a33ea6..f7d4c174f0ba25608df594380656a2cd91b904f5 100644 --- a/src/OpenFOAM/containers/Lists/UPtrList/UPtrListIO.C +++ b/src/OpenFOAM/containers/Lists/UPtrList/UPtrListIO.C @@ -32,16 +32,16 @@ License template<class T> Foam::Ostream& Foam::operator<<(Ostream& os, const UPtrList<T>& L) { - // Write size of list and start contents delimiter + // Write size and start delimiter os << nl << L.size() << nl << token::BEGIN_LIST; - // Write list contents + // Write contents forAll(L, i) { os << nl << L[i]; } - // Write end of contents delimiter + // Write end delimiter os << nl << token::END_LIST << nl; // Check state of IOstream diff --git a/src/OpenFOAM/containers/NamedEnum/NamedEnum.C b/src/OpenFOAM/containers/NamedEnum/NamedEnum.C index 5503f6dda4adc3a5d9f6bceffefec68a8a6fc6d9..d6e157ea3d53908aafb777c3175b0364cad54b90 100644 --- a/src/OpenFOAM/containers/NamedEnum/NamedEnum.C +++ b/src/OpenFOAM/containers/NamedEnum/NamedEnum.C @@ -40,7 +40,7 @@ Foam::NamedEnum<Enum, nEnum>::NamedEnum() { stringList goodNames(i); - for (label j = 0; j < i; j++) + for (int j = 0; j < i; j++) { goodNames[j] = names[j]; } @@ -70,10 +70,9 @@ Enum Foam::NamedEnum<Enum, nEnum>::read(Istream& is) const { FatalIOErrorIn ( - "NamedEnum<Enum, nEnum>::read(Istream& is) const", - is - ) << name << " is not in enumeration " << toc() - << exit(FatalIOError); + "NamedEnum<Enum, nEnum>::read(Istream&) const", is + ) << name << " is not in enumeration: " + << toc() << exit(FatalIOError); } return Enum(iter()); @@ -83,7 +82,7 @@ Enum Foam::NamedEnum<Enum, nEnum>::read(Istream& is) const template<class Enum, int nEnum> void Foam::NamedEnum<Enum, nEnum>::write(const Enum e, Ostream& os) const { - os << operator[](e); + os << operator[](e); } diff --git a/src/OpenFOAM/containers/NamedEnum/NamedEnum.H b/src/OpenFOAM/containers/NamedEnum/NamedEnum.H index 23a4bfbb20b0d6ec03f95fad6b318c6d16d67158..faacbaff9b5b22d18df2316c61aa36d5adce9946 100644 --- a/src/OpenFOAM/containers/NamedEnum/NamedEnum.H +++ b/src/OpenFOAM/containers/NamedEnum/NamedEnum.H @@ -44,7 +44,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class NamedEnum Declaration + Class NamedEnum Declaration \*---------------------------------------------------------------------------*/ template<class Enum, int nEnum> @@ -79,10 +79,10 @@ public: //- Read a word from Istream and return the corresponding // enumeration element - Enum read(Istream& is) const; + Enum read(Istream&) const; //- Write the name representation of the enumeration to an Ostream - void write(const Enum e, Ostream& os) const; + void write(const Enum e, Ostream&) const; // Member Operators diff --git a/src/OpenFOAM/db/IOobjects/IOField/IOField.C b/src/OpenFOAM/db/IOobjects/IOField/IOField.C index e64cc05663b4f124c1e121273456ddaba89244e9..abf0e546db78eaf7be09d316d73b8b30726b7d5c 100644 --- a/src/OpenFOAM/db/IOobjects/IOField/IOField.C +++ b/src/OpenFOAM/db/IOobjects/IOField/IOField.C @@ -88,7 +88,7 @@ Foam::IOField<Type>::IOField(const IOobject& io, const Field<Type>& f) template<class Type> -Foam::IOField<Type>::IOField(const IOobject& io, const xfer<Field<Type> >& f) +Foam::IOField<Type>::IOField(const IOobject& io, const Xfer<Field<Type> >& f) : regIOobject(io) { diff --git a/src/OpenFOAM/db/IOobjects/IOField/IOField.H b/src/OpenFOAM/db/IOobjects/IOField/IOField.H index 5ee01d1f54a9c981e7a146e6e62dbb740baa1baf..32d3c77a748c142cd74c10187a0e626cad6f42a6 100644 --- a/src/OpenFOAM/db/IOobjects/IOField/IOField.H +++ b/src/OpenFOAM/db/IOobjects/IOField/IOField.H @@ -72,7 +72,7 @@ public: IOField(const IOobject&, const Field<Type>&); //- Construct by transferring the Field contents - IOField(const IOobject&, const xfer<Field<Type> >&); + IOField(const IOobject&, const Xfer<Field<Type> >&); // Destructor diff --git a/src/OpenFOAM/db/IOobjects/IOList/IOList.C b/src/OpenFOAM/db/IOobjects/IOList/IOList.C index 45b6d4741d469e1f6988392e838d4e2d43be4552..3022c70541b355afd4b51a725c81ce07313df8c3 100644 --- a/src/OpenFOAM/db/IOobjects/IOList/IOList.C +++ b/src/OpenFOAM/db/IOobjects/IOList/IOList.C @@ -88,7 +88,7 @@ Foam::IOList<T>::IOList(const IOobject& io, const List<T>& list) template<class T> -Foam::IOList<T>::IOList(const IOobject& io, const xfer<List<T> >& list) +Foam::IOList<T>::IOList(const IOobject& io, const Xfer<List<T> >& list) : regIOobject(io) { diff --git a/src/OpenFOAM/db/IOobjects/IOList/IOList.H b/src/OpenFOAM/db/IOobjects/IOList/IOList.H index f7ebffb767149f3405bec2dd99b4239656bdb257..9ed205ef799909dce1e54524986275209ce66783 100644 --- a/src/OpenFOAM/db/IOobjects/IOList/IOList.H +++ b/src/OpenFOAM/db/IOobjects/IOList/IOList.H @@ -73,7 +73,7 @@ public: IOList(const IOobject&, const List<T>&); //- Construct by transferring the List contents - IOList(const IOobject&, const xfer<List<T> >&); + IOList(const IOobject&, const Xfer<List<T> >&); // Destructor diff --git a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C index ff1da0e80ec2e1befaef9955928219b17ee95b23..42b1d1134792396e2cc75fd8cb4cbc512d4e6459 100644 --- a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C +++ b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C @@ -87,7 +87,7 @@ Foam::IOMap<T>::IOMap(const IOobject& io, const Map<T>& map) template<class T> -Foam::IOMap<T>::IOMap(const IOobject& io, const xfer<Map<T> >& map) +Foam::IOMap<T>::IOMap(const IOobject& io, const Xfer<Map<T> >& map) : regIOobject(io) { diff --git a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.H b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.H index a571b25eefa4097a47cd23c5d2e2113feee3c0b9..c08e2e92bc642cc183cc044df43037278efb8e0b 100644 --- a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.H +++ b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.H @@ -73,7 +73,7 @@ public: IOMap(const IOobject&, const Map<T>&); //- Construct by transferring the Map contents - IOMap(const IOobject&, const xfer<Map<T> >&); + IOMap(const IOobject&, const Xfer<Map<T> >&); // Destructor diff --git a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C index f6d481dbfaa2ead6943a14ce2eeebc1e14ef4dfe..8fcc3bd982ece6f33764891971d3d4e67bbc5cfe 100644 --- a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C +++ b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C @@ -85,7 +85,7 @@ Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const PtrList<T>& list) template<class T> -Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const xfer<PtrList<T> >& list) +Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const Xfer<PtrList<T> >& list) : regIOobject(io) { diff --git a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H index d88e1e73284cf51ce22b654d19e0acde179b9d4c..9a2e8ce5afe2ad9462d45ac02dd911a84d2728fa 100644 --- a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H +++ b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.H @@ -74,7 +74,7 @@ public: IOPtrList(const IOobject&, const PtrList<T>&); //- Construct by transferring the PtrList contents - IOPtrList(const IOobject&, const xfer<PtrList<T> >&); + IOPtrList(const IOobject&, const Xfer<PtrList<T> >&); // Destructor diff --git a/src/OpenFOAM/db/dictionary/dictionary.C b/src/OpenFOAM/db/dictionary/dictionary.C index 4f7da54361fdee57a3babd3f75fafdb9bab1e4c5..27a4dcc1bb1f0bb67ace4833d6009b2ce13ff201 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.C +++ b/src/OpenFOAM/db/dictionary/dictionary.C @@ -170,7 +170,7 @@ Foam::dictionary::dictionary Foam::dictionary::dictionary ( const dictionary& parentDict, - const xfer<dictionary>& dict + const Xfer<dictionary>& dict ) : parent_(parentDict) @@ -181,7 +181,7 @@ Foam::dictionary::dictionary Foam::dictionary::dictionary ( - const xfer<dictionary>& dict + const Xfer<dictionary>& dict ) : parent_(dictionary::null) @@ -832,11 +832,9 @@ void Foam::dictionary::transfer(dictionary& dict) } -Foam::xfer<Foam::dictionary> Foam::dictionary::transfer() +Foam::Xfer<Foam::dictionary> Foam::dictionary::xfer() { - Foam::xfer<dictionary> xf; - xf().transfer(*this); - return xf; + return xferMove(*this); } @@ -866,8 +864,8 @@ void Foam::dictionary::operator=(const dictionary& rhs) for ( - IDLList<entry>::const_iterator iter = rhs.begin(); - iter != rhs.end(); + IDLList<entry>::const_iterator iter = rhs.begin(); + iter != rhs.end(); ++iter ) { diff --git a/src/OpenFOAM/db/dictionary/dictionary.H b/src/OpenFOAM/db/dictionary/dictionary.H index 5cdbfb56f3449dd279c5eca8fca2984cb696fcde..5316f053653781dd85b6fb27f4f42c6bba80df84 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.H +++ b/src/OpenFOAM/db/dictionary/dictionary.H @@ -167,10 +167,10 @@ public: dictionary(const dictionary&); //- Construct by transferring parameter contents given parent dictionary - dictionary(const dictionary& parentDict, const xfer<dictionary>&); + dictionary(const dictionary& parentDict, const Xfer<dictionary>&); //- Construct top-level dictionary by transferring parameter contents - dictionary(const xfer<dictionary>&); + dictionary(const Xfer<dictionary>&); //- Construct and return clone autoPtr<dictionary> clone() const; @@ -394,8 +394,8 @@ public: //- Transfer the contents of the argument and annull the argument. void transfer(dictionary&); - //- Transfer the contents to the xfer container - xfer<dictionary> transfer(); + //- Transfer contents to the Xfer container + Xfer<dictionary> xfer(); // Write diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.C b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.C index ae9eb5dd83b62ee49dd0f6bf3d2da385f4710d83..5f2889ad06387b7655c3b0874b0acec3878ec8ec 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.C +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.C @@ -141,7 +141,7 @@ DimensionedField<Type, GeoMesh>::DimensionedField template<class Type, class GeoMesh> DimensionedField<Type, GeoMesh>::DimensionedField ( - const xfer<DimensionedField<Type, GeoMesh> >& df + const Xfer<DimensionedField<Type, GeoMesh> >& df ) : regIOobject(df(), true), @@ -219,7 +219,7 @@ template<class Type, class GeoMesh> DimensionedField<Type, GeoMesh>::DimensionedField ( const word& newName, - const xfer<DimensionedField<Type, GeoMesh> >& df + const Xfer<DimensionedField<Type, GeoMesh> >& df ) : regIOobject(IOobject(newName, df->time().timeName(), df->db())), diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H index cc0caff3f07745f09f24383d2b733955e80f265d..8e5daadeff25649a7b9d144ac07b97d175e01393 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H @@ -159,7 +159,7 @@ public: //- Construct by transferring the DimensionedField DimensionedField ( - const xfer<DimensionedField<Type, GeoMesh> >& + const Xfer<DimensionedField<Type, GeoMesh> >& ); //- Construct as copy of tmp<DimensionedField> deleting argument @@ -196,7 +196,7 @@ public: DimensionedField ( const word& newName, - const xfer<DimensionedField<Type, GeoMesh> >& + const Xfer<DimensionedField<Type, GeoMesh> >& ); //- Construct as copy resetting name diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H index fffa1de6b9cd6d6c921952e454a4888b3b6ea0ff..4d1d66be28e9f1d1955e8d6fc197d075369a80b0 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H @@ -37,7 +37,6 @@ SourceFiles #define FieldField_H #include "tmp.H" -#include "xfer.H" #include "PtrList.H" #include "scalar.H" #include "direction.H" diff --git a/src/OpenFOAM/fields/Fields/Field/Field.C b/src/OpenFOAM/fields/Fields/Field/Field.C index e4576af3975d3dae4722ffede5bd5af6360131b8..1336bc9eff36921e4bb7aee68e67aa35a2c0c46f 100644 --- a/src/OpenFOAM/fields/Fields/Field/Field.C +++ b/src/OpenFOAM/fields/Fields/Field/Field.C @@ -156,7 +156,7 @@ Field<Type>::Field(Field<Type>& f, bool reUse) template<class Type> -Field<Type>::Field(const xfer<Field<Type> >& f) +Field<Type>::Field(const Xfer<Field<Type> >& f) : List<Type>(f) {} diff --git a/src/OpenFOAM/fields/Fields/Field/Field.H b/src/OpenFOAM/fields/Fields/Field/Field.H index a82fe0c37fd854908655db1d352e81a9a8328c22..ee4529d75e1f642b9a8978cc60302374c6eb9819 100644 --- a/src/OpenFOAM/fields/Fields/Field/Field.H +++ b/src/OpenFOAM/fields/Fields/Field/Field.H @@ -43,7 +43,6 @@ SourceFiles #define Field_H #include "tmp.H" -#include "xfer.H" #include "direction.H" #include "VectorSpace.H" #include "scalarList.H" @@ -166,7 +165,7 @@ public: Field(Field<Type>&, bool reUse); //- Construct by transferring the Field contents - Field(const xfer<Field<Type> >&); + Field(const Xfer<Field<Type> >&); //- Construct as copy of subField Field(const typename Field<Type>::subField&); diff --git a/src/OpenFOAM/memory/xfer/xfer.H b/src/OpenFOAM/memory/Xfer/Xfer.H similarity index 80% rename from src/OpenFOAM/memory/xfer/xfer.H rename to src/OpenFOAM/memory/Xfer/Xfer.H index fb986ae6d4dfa32d46587b32981eb04706e621aa..19a67c7af30719211ab9514f8030bf0ddfca51e8 100644 --- a/src/OpenFOAM/memory/xfer/xfer.H +++ b/src/OpenFOAM/memory/Xfer/Xfer.H @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Class - Foam::xfer + Foam::Xfer Description A simple container for copying or transferring objects of type \<T\>. @@ -31,9 +31,9 @@ Description The wrapped object of type \<T\> must implement a transfer() method and an operator=() copy method. - Since it is decided upon construction of the xfer object whether the + Since it is decided upon construction of the Xfer object whether the parameter is to be copied or transferred, the contents of the resulting - xfer object can be transferred unconditionally. This greatly simplifies + Xfer object can be transferred unconditionally. This greatly simplifies defining constructors or methods in other classes with mixed transfer/copy semantics without requiring 2^N different versions. @@ -54,12 +54,12 @@ SeeAlso xferCopy, xferCopyTo, xferMove, xferMoveTo, xferTmp SourceFiles - xferI.H + XferI.H \*---------------------------------------------------------------------------*/ -#ifndef xfer_H -#define xfer_H +#ifndef Xfer_H +#define Xfer_H // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -70,11 +70,11 @@ namespace Foam template<class T> class tmp; /*---------------------------------------------------------------------------*\ - Class xfer Declaration + Class Xfer Declaration \*---------------------------------------------------------------------------*/ template<class T> -class xfer +class Xfer { // Private data @@ -87,25 +87,25 @@ public: //- Store object pointer and manage its deletion // Can also be used later to transfer by assignment - inline explicit xfer(T* = 0); + inline explicit Xfer(T* = 0); //- Construct by copying or by transferring the parameter contents - inline explicit xfer(T&, bool allowTransfer=false); + inline explicit Xfer(T&, bool allowTransfer=false); //- Construct by copying the parameter contents - inline explicit xfer(const T&); + inline explicit Xfer(const T&); //- Construct by transferring the contents - inline xfer(const xfer<T>&); + inline Xfer(const Xfer<T>&); // Destructor - inline ~xfer(); + inline ~Xfer(); // Member Functions //- Return a null object reference - inline static const xfer<T>& null(); + inline static const Xfer<T>& null(); // Member Operators @@ -113,7 +113,7 @@ public: inline void operator=(T&); //- Transfer the contents into the object - inline void operator=(const xfer<T>&); + inline void operator=(const Xfer<T>&); //- Reference to the underlying datatype inline T& operator()() const; @@ -129,37 +129,37 @@ public: /** * Construct by copying the contents of the @a arg * - * @sa xferCopyTo, xferMove, xferMoveTo, xferTmp and Foam::xfer + * @sa xferCopyTo, xferMove, xferMoveTo, xferTmp and Foam::Xfer */ template<class T> -inline xfer<T> xferCopy(const T&); +inline Xfer<T> xferCopy(const T&); /** * Construct by transferring the contents of the @a arg * - * @sa xferCopy, xferCopyTo, xferMoveTo, xferTmp and Foam::xfer + * @sa xferCopy, xferCopyTo, xferMoveTo, xferTmp and Foam::Xfer */ template<class T> -inline xfer<T> xferMove(T&); +inline Xfer<T> xferMove(T&); /** * Construct by transferring the contents of the @a arg * - * @sa xferCopy, xferCopyTo, xferMove, xferMoveTo and Foam::xfer + * @sa xferCopy, xferCopyTo, xferMove, xferMoveTo and Foam::Xfer */ template<class T> -inline xfer<T> xferTmp(Foam::tmp<T>&); +inline Xfer<T> xferTmp(Foam::tmp<T>&); /** * Construct by copying the contents of the @a arg * between dissimilar types * - * @sa xferCopy, xferMove, xferMoveTo, xferTmp and Foam::xfer + * @sa xferCopy, xferMove, xferMoveTo, xferTmp and Foam::Xfer */ template<class To, class From> -inline xfer<To> xferCopyTo(const From&); +inline Xfer<To> xferCopyTo(const From&); /** @@ -173,10 +173,10 @@ inline xfer<To> xferCopyTo(const From&); * labelList plainLst( xferMoveTo<labelList>(dynLst) ); * @endcode * - * @sa xferCopy, xferCopyTo, xferMove, xferTmp and Foam::xfer + * @sa xferCopy, xferCopyTo, xferMove, xferTmp and Foam::Xfer */ template<class To, class From> -inline xfer<To> xferMoveTo(From&); +inline Xfer<To> xferMoveTo(From&); } // End namespace Foam @@ -184,7 +184,7 @@ inline xfer<To> xferMoveTo(From&); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "xferI.H" +#include "XferI.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/memory/xfer/xferI.H b/src/OpenFOAM/memory/Xfer/XferI.H similarity index 74% rename from src/OpenFOAM/memory/xfer/xferI.H rename to src/OpenFOAM/memory/Xfer/XferI.H index 00cd136623bca88ce8858b048092e20de38a1466..dc008bce9bb562a3826044a21a893722666122c3 100644 --- a/src/OpenFOAM/memory/xfer/xferI.H +++ b/src/OpenFOAM/memory/Xfer/XferI.H @@ -27,14 +27,14 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class T> -inline Foam::xfer<T>::xfer(T* p) +inline Foam::Xfer<T>::Xfer(T* p) : ptr_(p ? p : new T) {} template<class T> -inline Foam::xfer<T>::xfer(T& t, bool allowTransfer) +inline Foam::Xfer<T>::Xfer(T& t, bool allowTransfer) : ptr_(new T) { @@ -50,7 +50,7 @@ inline Foam::xfer<T>::xfer(T& t, bool allowTransfer) template<class T> -inline Foam::xfer<T>::xfer(const T& t) +inline Foam::Xfer<T>::Xfer(const T& t) : ptr_(new T) { @@ -59,7 +59,7 @@ inline Foam::xfer<T>::xfer(const T& t) template<class T> -inline Foam::xfer<T>::xfer(const xfer<T>& t) +inline Foam::Xfer<T>::Xfer(const Xfer<T>& t) : ptr_(new T) { @@ -70,7 +70,7 @@ inline Foam::xfer<T>::xfer(const xfer<T>& t) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template<class T> -inline Foam::xfer<T>::~xfer() +inline Foam::Xfer<T>::~Xfer() { delete ptr_; ptr_ = 0; @@ -80,9 +80,9 @@ inline Foam::xfer<T>::~xfer() // * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * * // template<class T> -inline const Foam::xfer<T>& Foam::xfer<T>::null() +inline const Foam::Xfer<T>& Foam::Xfer<T>::null() { - xfer<T>* nullPtr = reinterpret_cast<xfer<T>*>(0); + Xfer<T>* nullPtr = reinterpret_cast<Xfer<T>*>(0); return *nullPtr; } @@ -90,14 +90,14 @@ inline const Foam::xfer<T>& Foam::xfer<T>::null() // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // template<class T> -inline void Foam::xfer<T>::operator=(T& t) +inline void Foam::Xfer<T>::operator=(T& t) { ptr_->transfer(t); } template<class T> -inline void Foam::xfer<T>::operator=(const xfer<T>& t) +inline void Foam::Xfer<T>::operator=(const Xfer<T>& t) { // silently ignore attempted copy to self if (this != &t) @@ -108,14 +108,14 @@ inline void Foam::xfer<T>::operator=(const xfer<T>& t) template<class T> -inline T& Foam::xfer<T>::operator()() const +inline T& Foam::Xfer<T>::operator()() const { return *ptr_; } template<class T> -inline T* Foam::xfer<T>::operator->() const +inline T* Foam::Xfer<T>::operator->() const { return ptr_; } @@ -125,38 +125,39 @@ inline T* Foam::xfer<T>::operator->() const template<class T> -inline Foam::xfer<T> Foam::xferCopy(const T& t) +inline Foam::Xfer<T> Foam::xferCopy(const T& t) { - return Foam::xfer<T>(t); + return Foam::Xfer<T>(t); } + template<class T> -inline Foam::xfer<T> Foam::xferMove(T& t) +inline Foam::Xfer<T> Foam::xferMove(T& t) { - return Foam::xfer<T>(t, true); + return Foam::Xfer<T>(t, true); } template<class T> -inline Foam::xfer<T> Foam::xferTmp(Foam::tmp<T>& tt) +inline Foam::Xfer<T> Foam::xferTmp(Foam::tmp<T>& tt) { - return Foam::xfer<T>(tt(), tt.isTmp()); + return Foam::Xfer<T>(tt(), tt.isTmp()); } template<class To, class From> -inline Foam::xfer<To> Foam::xferCopyTo(const From& t) +inline Foam::Xfer<To> Foam::xferCopyTo(const From& t) { - Foam::xfer<To> xf; + Foam::Xfer<To> xf; xf() = t; return xf; } template<class To, class From> -inline Foam::xfer<To> Foam::xferMoveTo(From& t) +inline Foam::Xfer<To> Foam::xferMoveTo(From& t) { - Foam::xfer<To> xf; + Foam::Xfer<To> xf; xf().transfer(t); return xf; } diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cell.H b/src/OpenFOAM/meshes/meshShapes/cell/cell.H index 876dc4d95936221376c5364270c5ef84a72d7f2a..81ea127994292e718dc978f29021b91c28d6f04a 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cell.H +++ b/src/OpenFOAM/meshes/meshShapes/cell/cell.H @@ -79,7 +79,7 @@ public: explicit inline cell(const UList<label>&); //- Construct by transferring the parameter contents - explicit inline cell(const xfer<labelList>&); + explicit inline cell(const Xfer<labelList>&); //- Construct from Istream inline cell(Istream&); diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cellI.H b/src/OpenFOAM/meshes/meshShapes/cell/cellI.H index c8cb4a728f98689ec16e5debba846d0032f01725..40dc430be95fb610bdba83a2199e15079791fad7 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cellI.H +++ b/src/OpenFOAM/meshes/meshShapes/cell/cellI.H @@ -47,7 +47,7 @@ inline Foam::cell::cell(const UList<label>& lst) {} -inline Foam::cell::cell(const xfer<labelList>& lst) +inline Foam::cell::cell(const Xfer<labelList>& lst) : labelList(lst) {} diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.H b/src/OpenFOAM/meshes/meshShapes/face/face.H index 0d35fabc7573213acf24fcd3554c4a4532647dcf..07dd39f93fc2cfad8fe3225e0704ecd54e737f1f 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.H +++ b/src/OpenFOAM/meshes/meshShapes/face/face.H @@ -147,7 +147,7 @@ public: explicit inline face(const labelList&); //- Construct by transferring the parameter contents - explicit inline face(const xfer<labelList>&); + explicit inline face(const Xfer<labelList>&); //- Copy construct from triFace face(const triFace&); diff --git a/src/OpenFOAM/meshes/meshShapes/face/faceI.H b/src/OpenFOAM/meshes/meshShapes/face/faceI.H index b1281947800e2bd9c16779752a464889ff25af5a..500798e532a14f9e6683d3292efc353bb308bb1c 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/faceI.H +++ b/src/OpenFOAM/meshes/meshShapes/face/faceI.H @@ -64,7 +64,7 @@ inline Foam::face::face(const labelList& lst) {} -inline Foam::face::face(const xfer<labelList>& lst) +inline Foam::face::face(const Xfer<labelList>& lst) : labelList(lst) {} diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index f3a7594bac7b33704241656307ce23a59567ee46..65b9ec641267bcf87bf212732299de5c8608e182 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -273,10 +273,10 @@ Foam::polyMesh::polyMesh(const IOobject& io) Foam::polyMesh::polyMesh ( const IOobject& io, - const xfer<pointField>& points, - const xfer<faceList>& faces, - const xfer<labelList>& owner, - const xfer<labelList>& neighbour, + const Xfer<pointField>& points, + const Xfer<faceList>& faces, + const Xfer<labelList>& owner, + const Xfer<labelList>& neighbour, const bool syncPar ) : @@ -429,9 +429,9 @@ Foam::polyMesh::polyMesh Foam::polyMesh::polyMesh ( const IOobject& io, - const xfer<pointField>& points, - const xfer<faceList>& faces, - const xfer<cellList>& cells, + const Xfer<pointField>& points, + const Xfer<faceList>& faces, + const Xfer<cellList>& cells, const bool syncPar ) : @@ -566,9 +566,9 @@ Foam::polyMesh::polyMesh "polyMesh::polyMesh\n" "(\n" " const IOobject&,\n" - " const xfer<pointField>&,\n" - " const xfer<faceList>&,\n" - " const xfer<cellList>&\n" + " const Xfer<pointField>&,\n" + " const Xfer<faceList>&,\n" + " const Xfer<cellList>&\n" ")\n" ) << "Face " << faceI << "contains vertex labels out of range: " << curFace << " Max point index = " << points_.size() @@ -591,9 +591,9 @@ Foam::polyMesh::polyMesh "polyMesh::polyMesh\n" "(\n" " const IOobject&,\n" - " const xfer<pointField>&,\n" - " const xfer<faceList>&,\n" - " const xfer<cellList>&\n" + " const Xfer<pointField>&,\n" + " const Xfer<faceList>&,\n" + " const Xfer<cellList>&\n" ")\n" ) << "Cell " << cellI << "contains face labels out of range: " << curCell << " Max face index = " << faces_.size() @@ -608,10 +608,10 @@ Foam::polyMesh::polyMesh void Foam::polyMesh::resetPrimitives ( - const xfer<pointField>& points, - const xfer<faceList>& faces, - const xfer<labelList>& owner, - const xfer<labelList>& neighbour, + const Xfer<pointField>& points, + const Xfer<faceList>& faces, + const Xfer<labelList>& owner, + const Xfer<labelList>& neighbour, const labelList& patchSizes, const labelList& patchStarts, const bool validBoundary @@ -672,10 +672,10 @@ void Foam::polyMesh::resetPrimitives ( "polyMesh::polyMesh::resetPrimitives\n" "(\n" - " const xfer<pointField>&,\n" - " const xfer<faceList>&,\n" - " const xfer<labelList>& owner,\n" - " const xfer<labelList>& neighbour,\n" + " const Xfer<pointField>&,\n" + " const Xfer<faceList>&,\n" + " const Xfer<labelList>& owner,\n" + " const Xfer<labelList>& neighbour,\n" " const labelList& patchSizes,\n" " const labelList& patchStarts\n" ")\n" @@ -710,10 +710,10 @@ void Foam::polyMesh::resetPrimitives ( "polyMesh::polyMesh::resetPrimitives\n" "(\n" - " const xfer<pointField>&,\n" - " const xfer<faceList>&,\n" - " const xfer<labelList>& owner,\n" - " const xfer<labelList>& neighbour,\n" + " const Xfer<pointField>&,\n" + " const Xfer<faceList>&,\n" + " const Xfer<labelList>& owner,\n" + " const Xfer<labelList>& neighbour,\n" " const labelList& patchSizes,\n" " const labelList& patchStarts\n" ")\n" diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.H b/src/OpenFOAM/meshes/polyMesh/polyMesh.H index acbd89b3fdf6ed225d46f277b3975f96df71ecc1..0dfd7685c84548c6728809d570950666652b16b6 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.H @@ -219,10 +219,10 @@ public: polyMesh ( const IOobject& io, - const xfer<pointField>& points, - const xfer<faceList>& faces, - const xfer<labelList>& owner, - const xfer<labelList>& neighbour, + const Xfer<pointField>& points, + const Xfer<faceList>& faces, + const Xfer<labelList>& owner, + const Xfer<labelList>& neighbour, const bool syncPar = true ); @@ -231,9 +231,9 @@ public: polyMesh ( const IOobject& io, - const xfer<pointField>& points, - const xfer<faceList>& faces, - const xfer<cellList>& cells, + const Xfer<pointField>& points, + const Xfer<faceList>& faces, + const Xfer<cellList>& cells, const bool syncPar = true ); @@ -241,7 +241,7 @@ public: polyMesh ( const IOobject& io, - const xfer<pointField>& points, + const Xfer<pointField>& points, const cellShapeList& shapes, const faceListList& boundaryFaces, const wordList& boundaryPatchNames, @@ -434,10 +434,10 @@ public: // patch ends at nActiveFaces) and change patches with addPatches. void resetPrimitives ( - const xfer<pointField>& points, - const xfer<faceList>& faces, - const xfer<labelList>& owner, - const xfer<labelList>& neighbour, + const Xfer<pointField>& points, + const Xfer<faceList>& faces, + const Xfer<labelList>& owner, + const Xfer<labelList>& neighbour, const labelList& patchSizes, const labelList& patchStarts, const bool validBoundary = true diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C index 3be2b16f5d33ee50c03feafb17734c296531c312..d12dffff62be220a1016e6ac59eedafeba6018ba 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C @@ -136,7 +136,7 @@ Foam::labelList Foam::polyMesh::facePatchFaceCells Foam::polyMesh::polyMesh ( const IOobject& io, - const xfer<pointField>& points, + const Xfer<pointField>& points, const cellShapeList& cellsAsShapes, const faceListList& boundaryFaces, const wordList& boundaryPatchNames, @@ -415,7 +415,7 @@ Foam::polyMesh::polyMesh "polyMesh::polyMesh\n" "(\n" " const IOobject&,\n" - " const xfer<pointField>&,\n" + " const Xfer<pointField>&,\n" " const cellShapeList& cellsAsShapes,\n" " const faceListList& boundaryFaces,\n" " const wordList& boundaryPatchTypes,\n" @@ -473,7 +473,7 @@ Foam::polyMesh::polyMesh "polyMesh::polyMesh\n" "(\n" " const IOobject&,\n" - " const xfer<pointField>&,\n" + " const Xfer<pointField>&,\n" " const cellShapeList& cellsAsShapes,\n" " const faceListList& boundaryFaces,\n" " const wordList& boundaryPatchTypes,\n" diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.C b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.C index c479d8bf1a973af96c47d5f264a47ee89d95e774..ff8041fc602e4d7d24fdeed6d2a70c310aa52cd9 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.C @@ -117,7 +117,7 @@ Foam::cellZone::cellZone Foam::cellZone::cellZone ( const word& name, - const xfer<labelList>& addr, + const Xfer<labelList>& addr, const label index, const cellZoneMesh& zm ) @@ -167,7 +167,7 @@ Foam::cellZone::cellZone Foam::cellZone::cellZone ( const cellZone& cz, - const xfer<labelList>& addr, + const Xfer<labelList>& addr, const label index, const cellZoneMesh& zm ) diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H index 2e30e4e8da4e066b3377635b91e28b7c3bcca5ed..b133eee4361ff19fb46d25071176286087604358 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H @@ -135,7 +135,7 @@ public: cellZone ( const word& name, - const xfer<labelList>& addr, + const Xfer<labelList>& addr, const label index, const cellZoneMesh& ); @@ -164,7 +164,7 @@ public: cellZone ( const cellZone&, - const xfer<labelList>& addr, + const Xfer<labelList>& addr, const label index, const cellZoneMesh& ); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C index 717f437c73cab1be8e5411710970d01fe8a08c7a..5b688c64000f37ec36d79c6016e5d0abc0ae9a4d 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C @@ -245,8 +245,8 @@ Foam::faceZone::faceZone Foam::faceZone::faceZone ( const word& name, - const xfer<labelList>& addr, - const xfer<boolList>& fm, + const Xfer<labelList>& addr, + const Xfer<boolList>& fm, const label index, const faceZoneMesh& zm ) @@ -319,8 +319,8 @@ Foam::faceZone::faceZone Foam::faceZone::faceZone ( const faceZone& fz, - const xfer<labelList>& addr, - const xfer<boolList>& fm, + const Xfer<labelList>& addr, + const Xfer<boolList>& fm, const label index, const faceZoneMesh& zm ) diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H index a5f9f0b137b3727fdb454e0246616c9606c02fb2..f96c1dc189fb884bbe8e1d9ba34136dbb8e30003 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H @@ -167,8 +167,8 @@ public: faceZone ( const word& name, - const xfer<labelList>& addr, - const xfer<boolList>& fm, + const Xfer<labelList>& addr, + const Xfer<boolList>& fm, const label index, const faceZoneMesh& ); @@ -198,8 +198,8 @@ public: faceZone ( const faceZone&, - const xfer<labelList>& addr, - const xfer<boolList>& fm, + const Xfer<labelList>& addr, + const Xfer<boolList>& fm, const label index, const faceZoneMesh& ); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.C b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.C index e4fdbb456e4045a0e2c7e0c61e14a67147cfa836..d1c450691f13dbb565184d95687edc5d4c46ca62 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.C @@ -115,7 +115,7 @@ Foam::pointZone::pointZone Foam::pointZone::pointZone ( const word& name, - const xfer<labelList>& addr, + const Xfer<labelList>& addr, const label index, const pointZoneMesh& zm ) @@ -166,7 +166,7 @@ Foam::pointZone::pointZone Foam::pointZone::pointZone ( const pointZone& pz, - const xfer<labelList>& addr, + const Xfer<labelList>& addr, const label index, const pointZoneMesh& zm ) diff --git a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.H b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.H index f217bbcff31ac610ff1230f084a9ad2c33f095ce..66719530f524fb183e529eca8da1c3ec6f31c60e 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.H @@ -137,7 +137,7 @@ public: pointZone ( const word& name, - const xfer<labelList>& addr, + const Xfer<labelList>& addr, const label index, const pointZoneMesh& ); @@ -166,7 +166,7 @@ public: pointZone ( const pointZone&, - const xfer<labelList>& addr, + const Xfer<labelList>& addr, const label index, const pointZoneMesh& ); diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C index 09486b3d85aeb7a24c4035947e7e216b6ea8665b..28d03a710c73fa4f7bf0a0181633a7a4013a8d4a 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C @@ -288,7 +288,7 @@ void Foam::primitiveMesh::reset const label nInternalFaces, const label nFaces, const label nCells, - const xfer<cellList>& clst + const Xfer<cellList>& clst ) { reset diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H index f55ddb9953706bd9c45d06accaae47c6edce2fe5..61eff8ff03b91539208bf97ef4f286fcee6271e8 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H @@ -382,7 +382,7 @@ public: const label nInternalFaces, const label nFaces, const label nCells, - const xfer<cellList>& cells + const Xfer<cellList>& cells ); diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index 3d07e81ff460b60e8ef850a6a142591921fec857..8d47225f6ca7ec234b0a07b9f442e84006143e4a 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -228,10 +228,10 @@ Foam::fvMesh::fvMesh(const IOobject& io) Foam::fvMesh::fvMesh ( const IOobject& io, - const xfer<pointField>& points, - const xfer<faceList>& faces, - const xfer<labelList>& allOwner, - const xfer<labelList>& allNeighbour, + const Xfer<pointField>& points, + const Xfer<faceList>& faces, + const Xfer<labelList>& allOwner, + const Xfer<labelList>& allNeighbour, const bool syncPar ) : @@ -259,9 +259,9 @@ Foam::fvMesh::fvMesh Foam::fvMesh::fvMesh ( const IOobject& io, - const xfer<pointField>& points, - const xfer<faceList>& faces, - const xfer<cellList>& cells, + const Xfer<pointField>& points, + const Xfer<faceList>& faces, + const Xfer<cellList>& cells, const bool syncPar ) : diff --git a/src/finiteVolume/fvMesh/fvMesh.H b/src/finiteVolume/fvMesh/fvMesh.H index ba250003f6001bce8bfc8744881a3ef2009260a2..819dd3051479ce3df411a444706d62f8c8202534 100644 --- a/src/finiteVolume/fvMesh/fvMesh.H +++ b/src/finiteVolume/fvMesh/fvMesh.H @@ -173,10 +173,10 @@ public: fvMesh ( const IOobject& io, - const xfer<pointField>& points, - const xfer<faceList>& faces, - const xfer<labelList>& allOwner, - const xfer<labelList>& allNeighbour, + const Xfer<pointField>& points, + const Xfer<faceList>& faces, + const Xfer<labelList>& allOwner, + const Xfer<labelList>& allNeighbour, const bool syncPar = true ); @@ -185,9 +185,9 @@ public: fvMesh ( const IOobject& io, - const xfer<pointField>& points, - const xfer<faceList>& faces, - const xfer<cellList>& cells, + const Xfer<pointField>& points, + const Xfer<faceList>& faces, + const Xfer<cellList>& cells, const bool syncPar = true ); diff --git a/src/meshTools/coordinateSystems/coordinateSystems.C b/src/meshTools/coordinateSystems/coordinateSystems.C index 74a730b8e8b69304029e6f7e07c76d515208c0e7..548f45667219764dbd0d92cb62bcf9e5d4bf766e 100644 --- a/src/meshTools/coordinateSystems/coordinateSystems.C +++ b/src/meshTools/coordinateSystems/coordinateSystems.C @@ -57,7 +57,7 @@ Foam::coordinateSystems::coordinateSystems Foam::coordinateSystems::coordinateSystems ( const IOobject& io, - const xfer<PtrList<coordinateSystem> >& lst + const Xfer<PtrList<coordinateSystem> >& lst ) : IOPtrList<coordinateSystem>(io, lst) diff --git a/src/meshTools/coordinateSystems/coordinateSystems.H b/src/meshTools/coordinateSystems/coordinateSystems.H index 5aa734d6b7f663bd705d9d36d3e7e3542fef2cd4..f9fdc012e08cca734c532d3cf3dd693c1949ed28 100644 --- a/src/meshTools/coordinateSystems/coordinateSystems.H +++ b/src/meshTools/coordinateSystems/coordinateSystems.H @@ -85,7 +85,7 @@ public: coordinateSystems ( const IOobject&, - const xfer<PtrList<coordinateSystem> >& + const Xfer<PtrList<coordinateSystem> >& ); // Selectors diff --git a/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C b/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C index 2a5b7a5461969484a9b28f2e709092be56baea94..ec18bbeeb0700fba5eb8a7b3abab5b1c8ba9e5d3 100644 --- a/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C +++ b/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C @@ -756,10 +756,10 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh) // (patches guaranteed to be in increasing order) mesh.resetPrimitives ( - xfer<pointField>::null(), + Xfer<pointField>::null(), xferMove(newFaces), - xfer<labelList>::null(), - xfer<labelList>::null(), + Xfer<labelList>::null(), + Xfer<labelList>::null(), patchSizes, patchStarts, true // boundary forms valid boundary mesh. diff --git a/src/surfMesh/BasicMeshedSurface/BasicMeshedSurface.C b/src/surfMesh/BasicMeshedSurface/BasicMeshedSurface.C index d4e69d8aa3145a157da63dc5ccd9fc32f6365fc1..1df3b917d15aae9138b42eeb023f643d1a4f1da2 100644 --- a/src/surfMesh/BasicMeshedSurface/BasicMeshedSurface.C +++ b/src/surfMesh/BasicMeshedSurface/BasicMeshedSurface.C @@ -48,8 +48,8 @@ Foam::BasicMeshedSurface<Face>::BasicMeshedSurface() template<class Face> Foam::BasicMeshedSurface<Face>::BasicMeshedSurface ( - const xfer<pointField>& pointLst, - const xfer<List<Face> >& faceLst + const Xfer<pointField>& pointLst, + const Xfer<List<Face> >& faceLst ) : ParentType(List<Face>(), pointField()) @@ -111,8 +111,8 @@ void Foam::BasicMeshedSurface<Face>::scalePoints(const scalar& scaleFactor) template<class Face> void Foam::BasicMeshedSurface<Face>::reset ( - const xfer<pointField>& pointLst, - const xfer<List<Face> >& faceLst + const Xfer<pointField>& pointLst, + const Xfer<List<Face> >& faceLst ) { ParentType::clearOut(); diff --git a/src/surfMesh/BasicMeshedSurface/BasicMeshedSurface.H b/src/surfMesh/BasicMeshedSurface/BasicMeshedSurface.H index 472d5a32c6f3d06974fb95161643310588ab0282..b807b72f564fa2c471b03671adeb8a123b29d1fe 100644 --- a/src/surfMesh/BasicMeshedSurface/BasicMeshedSurface.H +++ b/src/surfMesh/BasicMeshedSurface/BasicMeshedSurface.H @@ -38,7 +38,6 @@ SourceFiles #include "PrimitivePatchExtra.H" #include "pointField.H" -#include "xfer.H" #include "face.H" #include "triFace.H" @@ -103,8 +102,8 @@ public: //- Construct by transferring components (points, faces). BasicMeshedSurface ( - const xfer<pointField>&, - const xfer<List<Face> >& + const Xfer<pointField>&, + const Xfer<List<Face> >& ); // Destructor @@ -135,8 +134,8 @@ public: //- Transfer components (points, faces). virtual void reset ( - const xfer<pointField>&, - const xfer<List<Face> >& + const Xfer<pointField>&, + const Xfer<List<Face> >& ); //- Remove invalid faces diff --git a/src/surfMesh/MeshedSurface/MeshedSurface.C b/src/surfMesh/MeshedSurface/MeshedSurface.C index 26ffb51da3499494e9fd2e68c700c4de058286d0..c260f5765b7126c6ec6ab19f1b59103fa13805e7 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurface.C +++ b/src/surfMesh/MeshedSurface/MeshedSurface.C @@ -164,9 +164,9 @@ Foam::MeshedSurface<Face>::MeshedSurface() template<class Face> Foam::MeshedSurface<Face>::MeshedSurface ( - const xfer<pointField>& pointLst, - const xfer<List<Face> >& faceLst, - const xfer<surfGroupList>& patchLst + const Xfer<pointField>& pointLst, + const Xfer<List<Face> >& faceLst, + const Xfer<surfGroupList>& patchLst ) : ParentType(pointLst, faceLst), @@ -177,8 +177,8 @@ Foam::MeshedSurface<Face>::MeshedSurface template<class Face> Foam::MeshedSurface<Face>::MeshedSurface ( - const xfer<pointField>& pointLst, - const xfer<List<Face> >& faceLst, + const Xfer<pointField>& pointLst, + const Xfer<List<Face> >& faceLst, const UList<label>& patchSizes, const UList<word>& patchNames ) @@ -395,7 +395,7 @@ Foam::MeshedSurface<Face>::MeshedSurface(const MeshedSurface& surf) template<class Face> Foam::MeshedSurface<Face>::MeshedSurface ( - const xfer<UnsortedMeshedSurface<Face> >& surf + const Xfer<UnsortedMeshedSurface<Face> >& surf ) { transfer(surf()); @@ -403,7 +403,7 @@ Foam::MeshedSurface<Face>::MeshedSurface template<class Face> -Foam::MeshedSurface<Face>::MeshedSurface(const xfer<MeshedSurface>& surf) +Foam::MeshedSurface<Face>::MeshedSurface(const Xfer<MeshedSurface>& surf) { transfer(surf()); } @@ -493,8 +493,8 @@ void Foam::MeshedSurface<Face>::checkPatches() template<class Face> void Foam::MeshedSurface<Face>::sortFacesAndStore ( - const xfer<List<Face> >& unsortedFaces, - const xfer<List<label> >& regionIds, + const Xfer<List<Face> >& unsortedFaces, + const Xfer<List<label> >& regionIds, const bool sorted ) { diff --git a/src/surfMesh/MeshedSurface/MeshedSurface.H b/src/surfMesh/MeshedSurface/MeshedSurface.H index 08d6ec22cbd8245842a27a5255a7628a1c53a596..e2a1c008fa517cfcfe8b104c422338e7241461ab 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurface.H +++ b/src/surfMesh/MeshedSurface/MeshedSurface.H @@ -107,8 +107,8 @@ protected: //- sort faces by regions and store sorted faces void sortFacesAndStore ( - const xfer<List<Face> >& unsortedFaces, - const xfer<List<label> >& regionIds, + const Xfer<List<Face> >& unsortedFaces, + const Xfer<List<label> >& regionIds, const bool sorted ); @@ -142,17 +142,17 @@ public: //- Construct by transferring components (points, faces, patches). MeshedSurface ( - const xfer<pointField>&, - const xfer<List<Face> >&, - const xfer<surfGroupList>& + const Xfer<pointField>&, + const Xfer<List<Face> >&, + const Xfer<surfGroupList>& ); //- Construct by transferring points, faces. // Use patch information, or set single default patch. MeshedSurface ( - const xfer<pointField>&, - const xfer<List<Face> >&, + const Xfer<pointField>&, + const Xfer<List<Face> >&, const UList<label>& patchSizes = UList<label>::null(), const UList<word>& patchNames = UList<word>::null() ); @@ -171,10 +171,10 @@ public: MeshedSurface(const surfMesh&); //- Construct by transferring the contents from a UnsortedMeshedSurface - MeshedSurface(const xfer<UnsortedMeshedSurface<Face> >&); + MeshedSurface(const Xfer<UnsortedMeshedSurface<Face> >&); //- Construct by transferring the contents from a MeshedSurface - MeshedSurface(const xfer<MeshedSurface<Face> >&); + MeshedSurface(const Xfer<MeshedSurface<Face> >&); //- Construct from file name (uses extension to determine type) MeshedSurface(const fileName&); diff --git a/src/surfMesh/MeshedSurface/MeshedSurfaceIO.C b/src/surfMesh/MeshedSurface/MeshedSurfaceIO.C index 3c3484bcae6016e86322b426f33d407648304dd5..c49ea825a09744bc2ca3edb4680f5177c678dd1d 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurfaceIO.C +++ b/src/surfMesh/MeshedSurface/MeshedSurfaceIO.C @@ -61,7 +61,7 @@ bool Foam::MeshedSurface<Face>::read(Istream& is) MeshedSurface<face> surf; surf.reset ( - xfer<pointField>::null(), + Xfer<pointField>::null(), xferMove(faceLst) ); surf.addPatches(patches_); diff --git a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C index b8de5f620cee9c7cf3dd464c85e5de48dbd07c7d..7cd2c6d1baba8c7542a6ea9c774b2227e29c92ed 100644 --- a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C +++ b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C @@ -161,10 +161,10 @@ Foam::UnsortedMeshedSurface<Face>::UnsortedMeshedSurface() template<class Face> Foam::UnsortedMeshedSurface<Face>::UnsortedMeshedSurface ( - const xfer<pointField>& pointLst, - const xfer<List<Face> >& faceLst, - const xfer<List<label> >& regionIds, - const xfer<surfPatchIdentifierList>& patchLst + const Xfer<pointField>& pointLst, + const Xfer<List<Face> >& faceLst, + const Xfer<List<label> >& regionIds, + const Xfer<surfPatchIdentifierList>& patchLst ) : ParentType(pointLst, faceLst), @@ -176,8 +176,8 @@ Foam::UnsortedMeshedSurface<Face>::UnsortedMeshedSurface template<class Face> Foam::UnsortedMeshedSurface<Face>::UnsortedMeshedSurface ( - const xfer<pointField>& pointLst, - const xfer<List<Face> >& faceLst, + const Xfer<pointField>& pointLst, + const Xfer<List<Face> >& faceLst, const UList<label>& patchSizes, const UList<word>& patchNames ) @@ -274,7 +274,7 @@ Foam::UnsortedMeshedSurface<Face>::UnsortedMeshedSurface template<class Face> Foam::UnsortedMeshedSurface<Face>::UnsortedMeshedSurface ( - const xfer<UnsortedMeshedSurface<Face> >& surf + const Xfer<UnsortedMeshedSurface<Face> >& surf ) { transfer(surf()); @@ -284,7 +284,7 @@ Foam::UnsortedMeshedSurface<Face>::UnsortedMeshedSurface template<class Face> Foam::UnsortedMeshedSurface<Face>::UnsortedMeshedSurface ( - const xfer<MeshedSurface<Face> >& surf + const Xfer<MeshedSurface<Face> >& surf ) { transfer(surf()); @@ -532,9 +532,9 @@ Foam::UnsortedMeshedSurface<Face> Foam::UnsortedMeshedSurface<Face>::subsetMesh template<class Face> void Foam::UnsortedMeshedSurface<Face>::reset ( - const xfer<pointField>& pointLst, - const xfer<List<Face> >& faceLst, - const xfer<List<label> >& regionIds + const Xfer<pointField>& pointLst, + const Xfer<List<Face> >& faceLst, + const Xfer<List<label> >& regionIds ) { ParentType::reset(pointLst, faceLst); diff --git a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.H b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.H index 66237ac940afb2fb6388b0d8e7ca142a605ceccc..a2fb0c7d1f250e7d55c370b6185da8303010033c 100644 --- a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.H +++ b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.H @@ -155,18 +155,18 @@ public: // (points, faces, region ids, patches). UnsortedMeshedSurface ( - const xfer<pointField>&, - const xfer<List<Face> >&, - const xfer<List<label> >& regionIds, - const xfer<surfPatchIdentifierList>& + const Xfer<pointField>&, + const Xfer<List<Face> >&, + const Xfer<List<label> >& regionIds, + const Xfer<surfPatchIdentifierList>& ); //- Construct by transferring points, faces. // Use patch information, or set single default patch UnsortedMeshedSurface ( - const xfer<pointField>&, - const xfer<List<Face> >&, + const Xfer<pointField>&, + const Xfer<List<Face> >&, const UList<label>& patchSizes = UList<label>::null(), const UList<word>& patchNames = UList<word>::null() ); @@ -182,10 +182,10 @@ public: UnsortedMeshedSurface(const MeshedSurface<Face>&); //- Construct by transferring the contents from a UnsortedMeshedSurface - UnsortedMeshedSurface(const xfer<UnsortedMeshedSurface<Face> >&); + UnsortedMeshedSurface(const Xfer<UnsortedMeshedSurface<Face> >&); //- Construct by transferring the contents from a meshedSurface - UnsortedMeshedSurface(const xfer<MeshedSurface<Face> >&); + UnsortedMeshedSurface(const Xfer<MeshedSurface<Face> >&); //- Construct from file name (uses extension to determine type) UnsortedMeshedSurface(const fileName&); @@ -317,9 +317,9 @@ public: //- Transfer components (points, faces, region ids). virtual void reset ( - const xfer<pointField>&, - const xfer<List<Face> >&, - const xfer<List<label> >& regionIds = xfer<List<label> >::null() + const Xfer<pointField>&, + const Xfer<List<Face> >&, + const Xfer<List<label> >& regionIds = Xfer<List<label> >::null() ); //- Transfer the contents of the argument and annull the argument