ww5 created page: build instructions authored by Wieselquist, William's avatar Wieselquist, William
# ORIGEN naming convention # ORIGEN naming convention
The ORIGEN naming convention is basically ``CamelCase`` for classes and ``snake_case`` for everything else. The ORIGEN naming convention is basically ``CamelCase`` for classes and ``snake_case`` for everything else. There are some notable exceptions
## C++ example class ## C++ example class
...@@ -54,13 +54,17 @@ typedef BufferedReader<int> BufferedReader_Int; ...@@ -54,13 +54,17 @@ typedef BufferedReader<int> BufferedReader_Int;
typedef BufferedReader<double> BufferedReader_Dbl; typedef BufferedReader<double> BufferedReader_Dbl;
``` ```
The typedefs mirror the templating syntax and can always be made fairly straightforwardly, as opposed to trying to figure out where to put the "Int", i.e. is it "BufferedIntReader" or "IntBufferedReader". With multiple template parameters it gets even more hairy, but the _ syntax, simply leads to ``typedef std::map<std::string,int> Map_Str_Int``. The typedefs mirror the templating syntax and can always be made fairly straightforwardly, as opposed to trying to figure out where to put the "Int", i.e. is it "BufferedIntReader" or "IntBufferedReader". With multiple template parameters it gets even more hairy, but the _ syntax, simply leads to ``typedef std::map<std::string,int> Map_Str_Int``.
```
### Word Boundaries
Basic ways of distinguishing word boundaries with ``<LWORD>=[a-z]+`` and ``<UWORD>=[A-Z][a-z]+`` Basic ways of distinguishing word boundaries with ``<LWORD>=[a-z]+`` and ``<UWORD>=[A-Z][a-z]+``
* Camel case * Camel case
* upper camel ``<UCAMEL>``=``<UWORD>+``, e.g. Nexus, HelloWorld, or MyGreatApi * upper camel ``<UCAMEL>``=``<UWORD>+``, e.g. Nexus, HelloWorld, or MyGreatApi
* lower camel ``<LCAMEL>``=``<LWORD><UWORD>*, ``e.g. nexus, helloWorld, or myGreatApi * lower camel ``<LCAMEL>``=``<LWORD><UWORD>*, ``e.g. nexus, helloWorld, or myGreatApi
* Snake case ``<SNAKE>``=``<LWORD>(_<LWORD>)*``, e.g. nexus, hello_world, my_great_api * Snake case ``<SNAKE>``=``<LWORD>(_<LWORD>)*``, e.g. nexus, hello_world, my_great_api
## C++ Word Definitions
With those definitions in mind, let's define a set of word conventions. The main technical goal is to use the different ways of writing words to distinguish between as many parts of the language as possible. With those definitions in mind, let's define a set of word conventions. The main technical goal is to use the different ways of writing words to distinguish between as many parts of the language as possible.
1.``VAR`` variables 1.``VAR`` variables
... ...
......