Home » Developing U++ » U++ Developers corner » is there U++ coding style reference?
Re: is there U++ coding style reference? [message #27635 is a reply to message #27632] |
Tue, 27 July 2010 11:06   |
|
kohait00 wrote on Tue, 27 July 2010 08:19 | thanls dolik
what about indention, tabs / spaces?
brackets on new line?
class definition style, ctor/dtor position (often seen at bottom of cpp or h file, why?)
slight programming guide on when and how to properly design class (virtual dtor etc..) i know this depends on one's own skills as well, but a checklist would help for starters.
cheers
|
You really want a lot of details I usually don't even think about 
Prefered indentation is using tabs (better recognized in theide).
Brackets are mostly on the same line. The only exception I can think of is in function definitions.
One important thing is putting spaces around operators etc. It increases the readability a lot.
I'm not sure if there is anything specific about classes, only the fact that U++ mostly uses single header per package and one cpp for each class (or group of closely related classes). I don't know about the ctor/dtor positions, but I strongly prefer having them on top of file, because they ussually contain important info (e.g. callback bindings to widgets).
The programming style is even harder to descrribe The main point would be probably that new and delete should be hidden in implementation, not exposed used in user interface and pointers are used just to point to things. The rest are ussual things, like effective but readable code, reusable classes etc.
Any other ideas? Anybody? 
Honza
|
|
|
 |
|
is there U++ coding style reference?
|
 |
|
Re: is there U++ coding style reference?
|
 |
|
Re: is there U++ coding style reference?
|
 |
|
Re: is there U++ coding style reference?
|
 |
|
Re: is there U++ coding style reference?
|
 |
|
Re: is there U++ coding style reference?
By: mrjt on Tue, 27 July 2010 12:02
|
 |
|
Re: is there U++ coding style reference?
|
 |
|
Re: is there U++ coding style reference?
|
 |
|
Re: is there U++ coding style reference?
|
 |
|
Re: is there U++ coding style reference?
By: koldo on Thu, 29 July 2010 10:10
|
 |
|
Re: is there U++ coding style reference?
|
 |
|
Re: is there U++ coding style reference?
By: mrjt on Thu, 29 July 2010 14:10
|
 |
|
Re: is there U++ coding style reference?
|
 |
|
Re: is there U++ coding style reference?
|
 |
|
Re: is there U++ coding style reference?
|
 |
|
Re: is there U++ coding style reference?
By: kohait00 on Mon, 02 August 2010 09:06
|
 |
|
Re: is there U++ coding style reference?
By: mrjt on Mon, 02 August 2010 11:21
|
 |
|
Re: is there U++ coding style reference?
By: kohait00 on Mon, 02 August 2010 11:39
|
 |
|
Re: is there U++ coding style reference?
By: koldo on Mon, 02 August 2010 14:59
|
 |
|
Re: is there U++ coding style reference?
By: kohait00 on Mon, 02 August 2010 15:34
|
 |
|
Re: is there U++ coding style reference?
By: kohait00 on Tue, 03 August 2010 11:24
|
 |
|
Re: is there U++ coding style reference?
By: mrjt on Tue, 03 August 2010 12:40
|
 |
|
Re: is there U++ coding style reference?
By: kohait00 on Tue, 03 August 2010 12:50
|
 |
|
Re: is there U++ coding style reference?
By: mirek on Thu, 05 August 2010 12:50
|
 |
|
Re: is there U++ coding style reference?
By: kohait00 on Thu, 05 August 2010 12:53
|
 |
|
Re: is there U++ coding style reference?
By: mr_ped on Tue, 03 August 2010 13:05
|
 |
|
Re: is there U++ coding style reference?
|
 |
|
Re: is there U++ coding style reference?
By: kohait00 on Tue, 03 August 2010 15:58
|
 |
|
Re: is there U++ coding style reference?
By: mr_ped on Tue, 03 August 2010 17:28
|
 |
|
Re: is there U++ coding style reference?
By: kohait00 on Tue, 03 August 2010 17:34
|
Goto Forum:
Current Time: Wed May 14 20:11:07 CEST 2025
Total time taken to generate the page: 0.04506 seconds
|