AGS Engine Coding Conventions: Difference between revisions
m
fix
(Updated to the naming convention used in practice for years) |
m (fix) |
||
Line 80: | Line 80: | ||
===Naming Conventions=== | ===Naming Conventions=== | ||
The user types: classes, structs, enums and typedefs, - as well as global entities such as namespaces, global constants and global variables should be named using upper "upper" {{Wikipedia|CamelCase}} | The user types: classes, structs, enums and typedefs, - as well as global entities such as namespaces, global constants and global variables should be named using upper "upper" {{Wikipedia|CamelCase}} notation. | ||
Class methods and public data fields should also follow CamelCase notation. Private class fields should be named using lower camelCase and prefixed with an underscore ('_') to distinguish single-worded members from local variables. | Class methods and ''public'' data fields should also follow CamelCase notation. Private class ''fields'' should be named using lower camelCase and prefixed with an underscore ('_') to distinguish single-worded members from local variables. | ||
Local variables and function arguments should be named in all lowercase with underscores separating parts of name when necessary (but not as a prefix). | Local variables and function arguments should be named in all lowercase with underscores separating parts of name when necessary (but not as a prefix). |