/*! @page Vocb Vocabulary and Notions
Previous: @ref sVoc
Up: @ref Intro
Next: @ref lemutree
@section sVocb Usefull notions of C++ language
- Header files and source codes files
-
Geant4 is a C++ toolkit and one need to write both a header and a source files for each object class.
The header file contains the declaration of all methods and variables that are specific to the class that is being defined. One also have to specify all the other classes from which his class inherits. Finally, one should indicate if the methods and variables are public (can be seen and get their values modified by other methods) or private (excusive appartenance to the class). Header files are located in the $LEMU/include directory.
The source file contains the code of each method. These files are located in the $LEMU/source directory.
-
\anchor virtual_classes
- The inheritance philosophy
-
A base class (a class from which other classes derive) can present so-called virtual methods. That means that these methods can be re-written when defining a daughter class: in C++ language, we say that virtual methods can be overloaded. Virtual methods are the key of Geant4 framework modularity: many of Geant4 classes can be personalized by the user. They are called \b virtual \b classes.
One only has to build a daughter class of those classes and overload the virtual methods, making sure to keep their name exact because they are called at other places of the framework. It is also possible to add new methods and variables at will.
For example, the method in charge of building the geometry must be called Construct(), and the messengers methods in charge of modifying parameters must have the name SetNewValue().
*/