From: Upinder S. B. <bh...@nc...> - 2006-08-23 15:19:11
|
Dear Hugo, I'm following http://geosoft.no/development/cppstyle.html See item 11. -- Upi On Wed, August 23, 2006 8:04 pm, Hugo Cornelis said: > I thought that private variable are normally _prefixed_ with an > underscore ? Is there a specific reason to deviate from the common > convention ? > > > Hugo > > > On 8/22/06, Upinder S. Bhalla <bh...@nc...> wrote: >> Hi, Greg, >> Yes, this is a bit confusing. I haven't really prioritized it, but = it >> should be possible to massage the preprocessor to deal with these >> cases. The reasoning goes like this: All private variables have an >> appended underscore. Public field names (which may be associated with = a >> private variable) do not. However, in the preprocessor .mh file we >> sometimes need to define operations on private variables. At this poin= t >> the preprocessor just lets those lines through into the generated >> files, so we end up using a mix of Vm and Vm_ variable names. It is >> easy to keep track of if you remember when you are writing a function >> that talks to the private fields. >> >> Hope this helps, >> Upi >> >> -- >> Upinder S. Bhalla National Centre for Biological Sciences, >> bh...@nc... Tata Institute of Fundamental Research, >> +91-80-2363-6420X3230 Bellary Road, >> Fax: +91-80-23636662 Bangalore 560065, INDIA >> Web: http://www.ncbs.res.in/~bhalla/index.html >> >> On Wed, August 23, 2006 4:37 am, Greg Hood said: >> > Upi, >> > In the Moose developers guide the MyClass example has several >> variables >> > with an underscore appended (e.g., Vm_), but these are not declared >> > anywhere >> > that I can see. I see similar occurrences in the CaConc.mh and >> > Compartment.mh files. Are these variables somehow automatically >> declared? >> > In Compartment.mh, some of these (A_, B_) are declared in the >> "private:" >> > section, but others (Im_, Ra_) are not, so this is very confusing. >> > --Greg >> > >> > --------------------------------------------------------------------= ----- >> > Using Tomcat but need to do more? Need to support web services, >> security? >> > Get stuff done quickly with pre-integrated technology to make your j= ob >> > easier >> > Download IBM WebSphere Application Server v.1.0.1 based on Apache >> Geronimo >> > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&= dat=3D121642 >> > _______________________________________________ >> > Moose-g3-devel mailing list >> > Moo...@li... >> > https://lists.sourceforge.net/lists/listinfo/moose-g3-devel >> > >> >> >> >> ----------------------------------------------------------------------= --- >> Using Tomcat but need to do more? Need to support web services, >> security? >> Get stuff done quickly with pre-integrated technology to make your job >> easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache >> Geronimo >> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&da= t=3D121642 >> _______________________________________________ >> Moose-g3-devel mailing list >> Moo...@li... >> https://lists.sourceforge.net/lists/listinfo/moose-g3-devel >> > > > -- > Hugo Cornelis Ph.D. > > Research Imaging Center > University of Texas Health Science Center at San Antonio > 7703 Floyd Curl Drive > San Antonio, TX 78284-6240 > > Phone: 210 567 8112 > Fax: 210 567 8152 > > -----------------------------------------------------------------------= -- > Using Tomcat but need to do more? Need to support web services, securit= y? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geron= imo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > Moose-g3-devel mailing list > Moo...@li... > https://lists.sourceforge.net/lists/listinfo/moose-g3-devel > |