Re: Are underscores significant to THtml?

From: Nick West (n.west1@physics.oxford.ac.uk)
Date: Tue Dec 01 1998 - 11:50:52 MET


Hi Rene,

thanks for explaining:-

> The THtml class is currently looking for underscores in the file name
> corresponding to a given class name.  
> ...
> There are certainly better ways of associating automatically
> a class to a given folder.

I guess we (MINOS)  should rethink either our class or our file names in this
respect.

> In short, if your data members are named fXXXX or m_XXXX
> or your Getters/Setters are named GetXXXX/SetXXXX, Root will be able
> to do a bit better in the GUI.

It would be good if the Coding Conventions could point out the advantages
of adhering to this convention, and I am glad to see the pluralist approach
to member names.

Many thanks,

Nick West.

Rene Brun wrote:

Hi Nick,
The THtml class is currently looking for underscores in the file name
corresponding to a given class name. If a file name has the
form XXX_yyy.cxx, THtml adds this class to the folder/index XXX.
This is independent of the class name having itself underscores.
There are certainly better ways of associating automatically
a class to a given folder. We selected this algorithm because
it matches nicely our development environment.
You cannot disable this feature in the existing version.
Ideas are welcome for better algorithms.

Concerning your points about "other assumptions"
Root does not make assumptions about naming conventions in general.
We must support all possible programming styles.
There is one small place, however, where we make an assumption:
If a class member function is declared with a comment field // *MENU*,
this function will be inserted in the list of items of the
context menu when you click on an object with the right mouse button.
If this function has parameters (mandatory and/or optional), a
dialog box is shown. To pick the current and default argument values
Root looks for data members of the style fXXXX or m_XXXX for
arguments named XXXX (upper/lower case supported). If no-match is found
Root looks for a possible GetXXXX function returning the current
value of XXXX. If no-match is found, no luck, the dialog box
will not show a default/current value for the parameter.
In short, if your data members are named fXXXX or m_XXXX
or your Getters/Setters are named GetXXXX/SetXXXX, Root will be able
to do a bit better in the GUI.
It is my "personal view" that one should avoid underscores in
the names (classes, functions or data members).

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:40 MET