Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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 Smile

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 Smile 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? Smile

Honza


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: using Ctrl::Add; required for templates / overloaded virtual functions
Next Topic: dll instead of exe
Goto Forum:
  


Current Time: Wed May 14 20:11:07 CEST 2025

Total time taken to generate the page: 0.04506 seconds