[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Code hacking style: method declaration and definition placement

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Fri, 15 Apr 2011 14:48:58 +0200

On 15.04.2011 09:31, Oto BREZINA wrote:
> Dear Stefan,
> I have to add some method into class. However I don't get way how to
> decide where to place it. Till now I use new to bottom, but now I need
> add public one.
> In our company we developed some rules to keep method organized, but
> they (expecialy my extensions :) ) are too tight to keep even in our
> small team. It seems you don't have any of those rules.
> Can you give me a hint how to decite where to place method declarationa
> and definition to keep your layout ?

Just put them where you think is appropriate. If there's a similar
method, add it below that one. If several methods are used for a
specific feature (e.g., all methods dealing with scrolling), try to keep
them grouped together.

But it's your decision where to place them.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-04-15 14:49:14 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.