Main Page | Recent changes | View source | Page history

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

Coding Guidelines

From KDevelop

KDevPlatform Policies

The following policies apply to the public API in the kdevplatform module, that is all the libraries in the top-level directory.

Coding Guidelines

This document describes the ideal code formatting techniques for use in KDevelop. It is only meant to serve as a guide to help answer questions about how the majority of code in KDevelop is formatted.


If the author does not have strong personal preferences over the coding style (or wants to stick with the default KDevelop coding style), he/she is advised to pick following kate modeline:
// kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on; auto-insert-doxygen on

An example of the default coding style is presented below:

namespace Foospace
{

class Bar: public Base
{
public:
    Bar();
    int foo();
private:
    int m_foo;
};

Bar::Bar()
: Base()
{
}

int Bar::foo()
{
    switch (x)
    {
    case 1:
        break;
    default:
        break;
    }

    if (isBar)
    {
        bar();
        return m_foo + 1;
    }
    else
        return 0;
}

}

Retrieved from "http://www.kdevelop.org/mediawiki/index.php/Coding_Guidelines"

This page has been accessed 5,902 times. This page was last modified 20:37, 27 April 2008. Content is available under GNU Free Documentation License 1.2.


[Main Page]
Main Page
Community portal
Current events
Recent changes
Help
Donations

View source
Discuss this page
Page history
What links here
Related changes

Special pages
Bug reports