DictionaryBase gets transfer() method

This commit is contained in:
Mark Olesen
2008-12-17 12:36:55 +01:00
parent 84f9fc5c26
commit 239c31f30f
7 changed files with 97 additions and 18 deletions

View File

@ -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;
}