I use
BSD KNF indent style for my personal projects, while my day job prefers I use
K&R indent style. For naming, I use
Camel Case for class name and method names and mixed case for member variables.
I tend to inline getter/setters (if they are relatively simple) and I eventually have adopted the 'm_' prefix for private data members (after much grumbling). Sometimes I also find it handy to have a typedef'd pointer type.
typedef Foo * FooPtr;
class Foo : public Bar {
public:
Foo();
virtual ~Foo();
int Getter() { return m_value; }
void Setter(int value) { m_value = value; }
void SomeOtherPublicMethod();
private:
int m_value;
int m_someOtherValue;
};
I this has been helpful, please feel free to pick my brain.
