|
[Sponsors] |
February 1, 2008, 13:00 |
Hi all,
I know that maybe
|
#1 |
Member
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17 |
Hi all,
I know that maybe it could be a silly question, but I'm a beginner and somewhere I need to start in the file inletOutletFvPatchField.C there is this expressions: template<class> inletOutletFvPatchField<type>::inletOutletFvPatchF ield ( const fvPatch& p, const DimensionedField<type,>& iF ) : mixedFvPatchField<type>(p, iF), phiName_("phi") { this->refValue() = pTraits<type>::zero; this->refGrad() = pTraits<type>::zero; this->valueFraction() = 0.0; } What is the meaning of the ":"? Is it only a way to say that the line goes on through next line? Thanks in advance Francesco |
|
February 1, 2008, 16:37 |
Francesco,
This confused me
|
#2 |
New Member
C.E.M.
Join Date: Mar 2009
Posts: 16
Rep Power: 17 |
Francesco,
This confused me too. Check here: http://www.cs.huji.ac.il/labs/parall...e/tic0143.html with operator overload I think you can also use it with an access specifier. Evan |
|
February 1, 2008, 18:05 |
It's an initialization list fo
|
#3 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
It's an initialization list for member data. For classes that don't provide a default null-constructor, this is the only way to go, since the object (in this case: mixedFvPatchField<type>(p, iF),etc ) needs some initial parameters for the constructor.
Other situations in which this happens: When you have references as member data. Something like - label& myData_; When the object is created, myData_ MUST have a reference to something, otherwise, it's invalid. Hope this helps |
|
February 4, 2008, 05:54 |
Hi Evan and Sandeep,
Thanks
|
#4 |
Member
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 17 |
Hi Evan and Sandeep,
Thanks for your help, now it is clear Regards, Francesco |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What is the meaning.. ??? | lopez | FLUENT | 6 | November 2, 2016 04:48 |
want to know meaning | Sangamesh | Siemens | 0 | May 15, 2007 06:15 |
what is the meaning of this | dpshaka | Main CFD Forum | 0 | December 15, 2005 22:24 |
what's the meaning | arwang | FLUENT | 4 | May 3, 2005 08:34 |
meaning | id | Main CFD Forum | 0 | September 18, 2003 05:01 |