summaryrefslogtreecommitdiff
path: root/README.NAMING
diff options
context:
space:
mode:
Diffstat (limited to 'README.NAMING')
-rw-r--r--README.NAMING46
1 files changed, 46 insertions, 0 deletions
diff --git a/README.NAMING b/README.NAMING
new file mode 100644
index 00000000..cffd7324
--- /dev/null
+++ b/README.NAMING
@@ -0,0 +1,46 @@
+Identifier styles in aptitude.
+
+These are not followed 100%, but should generally be used for new
+code.
+
+1) Capitalization
+
+Class names:
+
+ class some_class_name
+ {
+ };
+
+Template parameters:
+
+ template<typename TemplateParam1, typename TemplateParam2>
+ class foo { ... };
+
+ template<typename Key, typename Val>
+ class my_super_map { ... };
+
+Note that single-character names are not used. They should only be
+used if the type is truly unimportant, such as in a container:
+
+ template<typename T>
+ class my_super_list { ... };
+
+Member variables and member functions:
+
+ class foo
+ {
+ int some_member_variable;
+ };
+
+ In some parts of aptitude, camelCase creeps in here; it is
+ acceptable for new code, but dispreferred.
+
+Macros:
+
+ #define MY_MACRO
+
+2) Accessors
+
+For value classes, aptitude follows the get_NAME() pattern to retrieve
+the value of the property NAME. If there is a corresponding mutator,
+use set_NAME(), but normally immutable objects are preferred.