mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
DictionaryBase gets transfer() method
This commit is contained in:
@ -23,7 +23,7 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Application
|
||||
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -52,6 +52,13 @@ public:
|
||||
:
|
||||
data_(s)
|
||||
{}
|
||||
|
||||
friend Ostream& operator<<(Ostream& os, const Scalar& s)
|
||||
{
|
||||
os << s.data_;
|
||||
return os;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -68,10 +75,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
myList.append(new Scalar(100.3));
|
||||
|
||||
myList.append(new Scalar(500.3));
|
||||
|
||||
|
||||
Info<< nl << "And again using STL iterator: " << nl << endl;
|
||||
|
||||
for
|
||||
@ -99,6 +104,15 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
Info<< nl << "Testing transfer: " << nl << endl;
|
||||
Info<< "original: " << myList << endl;
|
||||
|
||||
ISLList<Scalar> newList;
|
||||
newList.transfer(myList);
|
||||
|
||||
Info<< nl << "source: " << myList << nl
|
||||
<< nl << "target: " << newList << endl;
|
||||
|
||||
Info<< nl << "Bye." << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user