Lars Gullik Bjønnes wrote:
Abdelrazak Younes <[EMAIL PROTECTED]> writes:
|
| Do you mean this one:
|
| > - Long variables are named like thisLongVariableName.
|
| So without the trailing underscore then?
No.
Private class member variables get a _ at the end.
Where is that written? And what about protected member? In any case I
never use public member variables.
| For me variables are temporary variables inside a function or variable
| passed to a function. We are talking here about class members. Note
| that this "thisLongVariableName" notation is used almost exclusively
| for class methods and general functions. If we use that for members
| and variables this would be misleading.
Then it is misleading. We use the same naming scheme for member
functions and member variables.
This is really not the case in current frontends/* source code.
| Really if you look at current source code it is mostly this style:
|
| class ThisIsOneClass
| {
| void thisIsOneMethod(OneType one_type);
|
| OneType one_type_;
| }
Eh.. no. you have to look at more code.
For frontend/[qt3,qt4] I am quite sure I am right. But most code in the
kernel is C-ish... So it is difficult to extract a rule there. But for
your pleasure, let's look at some:
BufferView:
Pimpl * pimpl_; // should be Pimpl_
BufferView_pimpl:
Timeout cursor_timeout; // should be cursorTimeout_
bool multiparsel_cache_; // should be multiparselCache_
lyx::pit_type anchor_ref_; // should be anchorRef_
int offset_ref_; // should be offsetRef_
mutable bool refresh_inside_; // should be RefreshInside_
encoding:
std::string Name_; // name_
std::string LatexName_; // latexName_
Uchar encoding_table[256]; // encodingTable_
EncodingList encodinglist; // encodingList_
Encoding symbol_encoding_; // symbolEncoding_
So you see it's difficult to extract a clear figure from this code and I
would say that the "one_type_" style is used quite often...
Abdel.