Skip to content
polybassa edited this page Feb 26, 2013 · 1 revision

/* Module_Name */
MyModule.h

/* DEFINES */
#define MYMODULE_GLOBAL_CONSTANT 1
#define LOCAL_CONSTANT 1
static const type TYPESAFE_CONSTANT = const_value;

/* Variables */
type g_MyModule_AllGlobalVariable;
static type g_GlobalVariableRestrictedToModule;
type localVariable;

/* Functions */
MyModule_FunctionName();
LocalFunctionName();

/* Function_Style */
void MyModule_MyFunction(const type* const readonlyParam)
{
	if(condition)
	{
		DoSomething();
	}
	else
	{
		DoSomethingElse();
	}
}

/* Classes and members *
class MyClass
{
	private:
		static const type CLASS_CONSTANT = const_value;
		const type* const mMyConstMember;

	public:
		void MyFunction(const type* const readonlyParam) const;
};

enum MyEnum
{
	FIRST_ELEMENT = 0,
	LAST_ELEMENT
}

Clone this wiki locally