First of all, for people who want to vote this down, note that the member variables were not shown in the class reference and the link to the header file was broken!
I have the following constructor:
Foam::IOobject::IOobject
143 (
144 const word& name,
145 const fileName& instance,
146 const objectRegistry& registry,
147 readOption ro,
148 writeOption wo,
149 bool registerObject
150 )
151 :
152 name_(name),
153 headerClassName_(typeName),
154 note_(),
155 instance_(instance),
156 local_(),
157 db_(registry),
158 rOpt_(ro),
159 wOpt_(wo),
160 registerObject_(registerObject),
161 objState_(GOOD)
162 {
163 if (objectRegistry::debug)
164 {
165 Info<< "Constructing IOobject called " << name_
166 << " of type " << headerClassName_
167 << endl;
168 }
169 }
As far as I have read initializer are used to:
- Invoke base class constructors from a derived class
- Initialize member variables of the class
See: https://stackoverflow.com/questions/2445330/importance-of-a-singlecolon-in-c
I just can't figure out what the elements in the examples constructors initializer are for since they are no member variables of the class IOobject
and aren't constructors of derived classes. Can someone tell me what these initializer elements are for?
greetings streight