You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Jean-Sebastien Delfino <js...@apache.org> on 2006/08/23 23:47:13 UTC

[C++] Coding convention for #ifndef in our includes

I see two different coding conventions for the usual 
#ifndef/#define/#endif in our include files:
#ifndef tuscany_sca_model_binding_h in tuscany::sca::model::Binding.h
#ifndef _CHANGEDDATAOBJECTLIST_H_ in commonj::sdo::ChangedDataObjectList.h

Can we decide on a common convention? I have used both conventions in 
the past, so I'm OK with either but think it'd be nicer if we could pick 
one and stick to it.
Until we make a decision I'll follow my old code maintainer habit to 
stick to the scheme I see in the code around what I'm adding/changing.

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [C++] Coding convention for #ifndef in our includes

Posted by haleh mahbod <hm...@gmail.com>.
Can you please update C++ development website to include conventions that
are agreed to?

On 8/23/06, Jean-Sebastien Delfino <js...@apache.org> wrote:
>
> I see two different coding conventions for the usual
> #ifndef/#define/#endif in our include files:
> #ifndef tuscany_sca_model_binding_h in tuscany::sca::model::Binding.h
> #ifndef _CHANGEDDATAOBJECTLIST_H_ in commonj::sdo::ChangedDataObjectList.h
>
> Can we decide on a common convention? I have used both conventions in
> the past, so I'm OK with either but think it'd be nicer if we could pick
> one and stick to it.
> Until we make a decision I'll follow my old code maintainer habit to
> stick to the scheme I see in the code around what I'm adding/changing.
>
> --
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: [C++] Coding convention for #ifndef in our includes

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Pete Robbins wrote:
> I prefer the SCA style rather than the ones in SDO. The full path is 
> better
> as well so
> #ifndef commonj_sdo_changeddataobjectlist_h
> is what I would use.
>
> However, I don't think this affects the readabillity of the code so I 
> don't
> propose we change them all. We need to update the licence header in every
> file at some point so we could change these at that time if necessary.
>
> Cheers,
>
> PS. Let's not get into the discussion on where you place your opening 
> "{".
> If the code is readable then it's ok by me rather than getting anal on 
> code
> formating standards ;-)
>

OK I agree with you that we don't need to change the existing ones at 
this point, I was just thinking about what to do in new files.

+1 on the SCA style, that's what I'll use from now on.

I'm with you on keeping the code readable while staying open to 
different coding styles. Like I said below I usually try to follow the 
style I find in existing code and so far I've found the Tuscany C++ code 
quite readable.

> On 23/08/06, Jean-Sebastien Delfino <js...@apache.org> wrote:
>>
>> I see two different coding conventions for the usual
>> #ifndef/#define/#endif in our include files:
>> #ifndef tuscany_sca_model_binding_h in tuscany::sca::model::Binding.h
>> #ifndef _CHANGEDDATAOBJECTLIST_H_ in 
>> commonj::sdo::ChangedDataObjectList.h
>>
>> Can we decide on a common convention? I have used both conventions in
>> the past, so I'm OK with either but think it'd be nicer if we could pick
>> one and stick to it.
>> Until we make a decision I'll follow my old code maintainer habit to
>> stick to the scheme I see in the code around what I'm adding/changing.
>>
>> -- 
>> Jean-Sebastien
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>>
>
>


-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [C++] Coding convention for #ifndef in our includes

Posted by Pete Robbins <ro...@googlemail.com>.
I prefer the SCA style rather than the ones in SDO. The full path is better
as well so
#ifndef commonj_sdo_changeddataobjectlist_h
is what I would use.

However, I don't think this affects the readabillity of the code so I don't
propose we change them all. We need to update the licence header in every
file at some point so we could change these at that time if necessary.

Cheers,

PS. Let's not get into the discussion on where you place your opening "{".
If the code is readable then it's ok by me rather than getting anal on code
formating standards ;-)

On 23/08/06, Jean-Sebastien Delfino <js...@apache.org> wrote:
>
> I see two different coding conventions for the usual
> #ifndef/#define/#endif in our include files:
> #ifndef tuscany_sca_model_binding_h in tuscany::sca::model::Binding.h
> #ifndef _CHANGEDDATAOBJECTLIST_H_ in commonj::sdo::ChangedDataObjectList.h
>
> Can we decide on a common convention? I have used both conventions in
> the past, so I'm OK with either but think it'd be nicer if we could pick
> one and stick to it.
> Until we make a decision I'll follow my old code maintainer habit to
> stick to the scheme I see in the code around what I'm adding/changing.
>
> --
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>


-- 
Pete