This Naming convention is referred to followed documents:
General Naming Rules
- Names are sequences of letters and numerical digits, the first of which must not be a digit;
- Don’t use abbreviations;
- Variables and pointers use only lowercase letters.
Class
- The name of classes should a noun or a noun phrase;
- Use CamelCase to form multi-word names by joining the words together and capitalizing the interior word beginnings;
- Class names begin with a capital letter.
Examples: class LargeFurryMammal
, class Customer
.
Class members
- Data members:
m_Color
,m_Width
- prepend lowercasem_
; - Static data members:
s_Singleton
,s_ObjCount
- prepend lowercases_
.
Function
- Each function name should be a verb or a verb phrase:
processBookOrder()
; - Function names begin with a lowercase letter.
Getter and setter
- Non-boolean getters:
color()
orgetColor()
; - Boolean getters:
isChecked()
orisValid()
; - setter:
setColor(const Color& newColor)
.
If you have questions about JPSeditor, please contact t.zhong@fz-juelich.de.