|
[Sponsors] |
July 14, 2021, 16:18 |
IOdictionary
|
#1 |
New Member
Join Date: May 2019
Posts: 6
Rep Power: 7 |
Dear all,
Supposing I want to construct an object belonging to the IOdictionary class by calling this constructor: IOdictionary(const IOobject&); This routine constructs the baseIOdictionary through the object io: Foam::baseIOdictionary::baseIOdictionary(const IOobject& io) : regIOobject(io) { dictionary::name() = IOobject:: objectPath(); } Well, but I do not understand how dictionary has been instantiated. When was it constructed? I first thought baseIOdictionary would call a dictionary constructor when it's being instantiated. Can anyone give me a help? |
|
July 15, 2021, 17:36 |
|
#2 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
Pretty simple. IOdictionary derives from both dictionary (which has a null constructor) and regIOobject (which cannot be null-constructed). The initializer list forwards "io" to the regIOobject, and dictionary is simply null-constructed.
P.S: Which version of OpenFOAM is this? I don't see a "baseIOdictionary" anywhere. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Writing IOdictionary to user-defined folder | Arnoldinho | OpenFOAM Programming & Development | 3 | June 16, 2021 05:04 |
Add to a list in IOdictionary | stosse | OpenFOAM Programming & Development | 3 | March 17, 2021 06:11 |
writing values to IOdictionary subDict not generating expected output? | massive_turbulence | OpenFOAM Programming & Development | 2 | January 21, 2019 09:48 |
IOdictionary with READ_IF_PRESENT, default option | CFDUser_ | OpenFOAM Programming & Development | 14 | May 22, 2014 18:43 |
Read IOdictionary entries from within turbulence model | Arnoldinho | OpenFOAM Programming & Development | 9 | August 11, 2012 08:15 |