-
Notifications
You must be signed in to change notification settings - Fork 0
Convention
The effort for coherent naming is not strictly implemented through the code, but should be used for new development and applied when refactoring the code.
This naming convention only apply to internal structure. Files which comes from other sources (the random generator, matrix structure, etc) follow their own convention.
Internal class are named with a T in front and with a Capital to separate the different name: class TPatchFitness;
Properties of an object start with a lowercase but have uppercase to separate between words: int nbImmigrant;
The private properties of an object have an underscore in front: unsigned int _capacity;
The method of an object are name with only lowercase, separating words with underscore: void regulation_fitness_hard()
In the case of a setter of a getter/setter, a underscore is used to separate the key word get or set from the name of the properties to be access. The second part follow the name given to the property, so with uppercase to separate words: int get_nbImmigrant();
Pointer to something are indicated with a p at the beginning (or ptr or nothing).
vector are indicates with a v at the begining (or with s at the end, or with nothing)
In general, the name in the variable are fully spelled. Exception are made for:
- nb = number
- quanti = quantitative
- Proto = prototype
- freq = frequence
- param = parameter
- pop = population
- db = database
- rec = ???
- LCE = life cycle event
- sim = simulation
- ind = individual
- var = variance
- FH = file handler
- Srt = string
- info = information
- cur = current
- curind = current individual
- sel = selecion
- coal = coalescence