Basic ways of distinguishing word boundaries with ``<LWORD>=[a-z]+`` and ``<UWORD>=[A-Z][a-z]+``
* Camel case
* upper camel ``<UCAMEL>``=``<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
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. variables (``VAR``)
* description: use underscores and all lower case
* regex: ``<VAR>``=``<SNAKE>``
2. classes
1. class name (``CLASS``)
* description: standard CamelCase used for most classes, avoid abbreviations, for acronyms capitalize first, e.g. ORIGEN-->Origen or IO-->Io, MG-->Mg, CE-->Ce
* regex: ``<CLASS>``=``<UCAMEL>``
* e.g. ``NuclideSet``, ``Nexus``, ``LibraryIo``, ``CeResourceFile``
2. class methods (``CLASSMETHOD``)
* description: use snake case
* regex: ``<CLASSMETHOD>``=``<SNAKE>``
* convention: accessor method "getters" have form ``Var var() const`` while "setters" have ``void set_var(Var)``.
3. class member variables (``CLASSVAR``)
* description: use a prefix ``b_`` for the base class and ``d_`` for the derived class
* regex: ``<CLASSVAR>``=``[bd]_<SNAKE>``
3. specific-use free functions (``FREEFUNC``)
* description: functions not bound to any particular class use lazyCamelCase (does not include static functions)
* regex: ``<FREEFUNC>``=``<LCAMEL>``
* conventions: try to use a verb as the first word, e.g. countListElements instead of listElementCount
4. namespace component (``NAME``)
* description: simple lower case name which if in two parts means ``organization::component``
* e.g. ``scale::io``,``origen::detail``,`` origen::tst``,``origen::example``,``ornl::gtest::example``
3. class name (``CLASS``)
* description: standard CamelCase used for most classes, avoid abbreviations, for acronyms capitalize first, e.g. ORIGEN-->Origen or IO-->Io, MG-->Mg, CE-->Ce
* regex: ``([A-Z][a-z]*)+``
* e.g. ``NuclideSet``, ``Nexus``, ``LibraryIo``, ``CeResourceFile``
4. typedef or variant class name (``VARCLASS``)
* description: CamelCase_variant used for classes which are logically very similar, perhaps typedefed templated classes
* regex: ``CLASS_.+``
6. typedef or variant class name (``CLASSTYPE``)
* description: "CamelCase_variant" used for classes which are logically very similar, perhaps typedefed templated classes
* conventions: for STL typedefs, use ``Vec`` for vector, ``Map`` for map, ``Set`` for set, ``Dbl`` for double, ``Int`` for int, ``Str`` for string, ``Long`` for long (>=64-bit), ``Sze`` for size_t, ``Bool`` for bool.