mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
dictionary gets xfer constructor and transfer() method(s)
This commit is contained in:
@ -42,11 +42,20 @@ using namespace Foam;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
{
|
||||
dictionary dict(IFstream("testDict")());
|
||||
Info<< "dict: " << dict << nl
|
||||
<< "toc: " << dict.toc() << nl
|
||||
<< "keys: " << dict.keys() << nl
|
||||
<< "patterns: " << dict.keys(true) << endl;
|
||||
dictionary dict1(IFstream("testDict")());
|
||||
Info<< "dict1: " << dict1 << nl
|
||||
<< "toc: " << dict1.toc() << nl
|
||||
<< "keys: " << dict1.keys() << nl
|
||||
<< "patterns: " << dict1.keys(true) << endl;
|
||||
|
||||
dictionary dict2(dict1.transfer());
|
||||
|
||||
Info<< "dict1.toc(): " << dict1.name() << " " << dict1.toc() << nl
|
||||
<< "dict2.toc(): " << dict2.name() << " " << dict2.toc() << endl;
|
||||
|
||||
// copy back
|
||||
dict1 = dict2;
|
||||
Info<< "dict1.toc(): " << dict1.name() << " " << dict1.toc() << endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -89,6 +89,12 @@ baz
|
||||
}
|
||||
|
||||
|
||||
"anynumber.*"
|
||||
{
|
||||
$active
|
||||
}
|
||||
|
||||
|
||||
// this should work
|
||||
#remove active
|
||||
|
||||
|
||||
Reference in New Issue
Block a user