Hi Everybody,
Hi Atul,
I do give it a try! I also tried out astyle. indent has a huge amount of configuration options and I’m trying to find the configuration that most closly resembles the current style of Calitko. If that does not work I’m considering even modifying some open source tool (possibly indent) so that it produces “correct” output. I’ll just need more time to figure out what and how to do. Any help is welcome of course!
So generally I can’t get any tool or configuration so far to generate this for example:
namespace MyNamespace {
class MyClass
{
public:
MyClass();
~MyClass();
void doSomething();
int someValue();
};
}; // namespace MyNamesapce;
You see how the ctors and dtors are aligned with the names of the other functions. So you can say to indent to aling member functions by specifying -di24 for example, but that does not work for ctors and dtors.
I didn’t find an option that says that the opening bracket should come right after the namespace and that -di24 should not be in effect for namespaces, classes, structs, etc.
No way to say that function without argument should have no whitespace around parentheses and a single space after the name otherwise.
There is definitely other stuff that’s just not coming to my mind right now.
I’ve been reading again lots of style guidelines and coding conventions as I’m currently working on the ones for Calitko and I’m open to changing some things. For example type:
MyClass * something;
rather then:
MyClass *something;
MyClass* something;
since the pointer belongs to the type not to the variable, etc.
I’m quite open to ideas and suggestions but I’m reluctant to “standardizing” the Calitko style too much. The reason, as I already said, is that I want Calitko to have its own identity and distinctiveness at multiple levels. I want it to have its own spirit!
Regards,
Peter
atul wrote:Hey Peter,
Why not give Gnu indent a shot - so all of us can submit patches in a uniform syntax….
—- cheers atul
Peter Dimov wrote:
Thanks Atul! I just fixed the whitespace around parentheses and aligned the code a little. Committed in revision 53!
atul wrote:Dear Peter,
I made Packet::name pure virtual. By doing this refactoring I discovered that IbmcDescriptor, OpenVendorDescriptor and StandardVendorDescriptor are not used — What I mean is there are no concrete derivations for them…
However, the UnownPacket::name returns the correct name,
( the semantics of Packet::name() are preserved ;-)….
—- cheers atul
