IOdictionary
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? |
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. |
All times are GMT -4. The time now is 17:05. |