MobileDragon Coding conventions

All MobileDragon classes and types are enclosed in the single namespace ‘mdragon'.

For portability it uses own defined equalents for common data types.
Those types are defined as follows:

Char - 8 bits signed.
Byte - 8 bits unsigned.
Short - 16 bits singed.
Word - 16 bits unsigned.
Int - 32 bits signed.
DWord - 32 bits unsigned.
Long - 64 bits signed.

MobileDragon classes are named as follows: first symbol in upper case. If name of class is compound from multiple words every word begins with upper case symbol. All others symbols in the class names are in lower case. The same rules used for naming class methods and global functions.
For example:

class MyClassName
or
void ThisIsMyFunctionName();

MobileDragon defines are named as follows: first symbol in upper case. If name of define is compound from multiple words every word begins with upper case symbol and are separated with underscores. All others symbols in the define names are in lower case.
For example:

#define This_Is_Define_Name

MobileDragon variables are named as follows: all symbols in lower case. If name of variable is compound from multiple words every word begins with lower case symbol and are separated with underscores.
For example:

Bool this_is_my_variable;

 

 

Copyright 2005-2006 Herocraft Hitech Co. Ltd.