ww5 created page: build instructions authored by Wieselquist, William's avatar Wieselquist, William
Here is an example class that uses the ORIGEN naming convention. # ORIGEN naming convention
The ORIGEN naming convention is basically ``CamelCase`` for classes and ``snake_case`` for everything else.
## C++ example class
Here is a C++ example class that uses the ORIGEN naming convention.
```cpp ```cpp
namespace scale{ namespace scale{
...@@ -36,6 +43,7 @@ int main(){ ...@@ -36,6 +43,7 @@ int main(){
return 0; return 0;
} }
``` ```
### Why the underscores?
A strict camel case would have this reader be named ``BufferedIntReader`` or ``IntBufferedReader``, but this has some shortcomings. By pushing the "variant" part of the naming to the end with ``BufferedReader_Int`` and ``BufferedReader_Dbl``, we get good, automatic sorting of the classes. This helps in editors and in documentation: *lexically similar implies logically similar*. Now, imagine what happens when we get around to templating the BufferedReader. A strict camel case would have this reader be named ``BufferedIntReader`` or ``IntBufferedReader``, but this has some shortcomings. By pushing the "variant" part of the naming to the end with ``BufferedReader_Int`` and ``BufferedReader_Dbl``, we get good, automatic sorting of the classes. This helps in editors and in documentation: *lexically similar implies logically similar*. Now, imagine what happens when we get around to templating the BufferedReader.
```c++ ```c++
template <typename T> template <typename T>
... ...
......