<ol><li><strong>Naming:</strong> Classes will be initialized with an upper case letter, example: ( ADIOS, NETCDF, PHDF5, Transform, Transport, etc. ). <ul><li><code>Don't</code><ul><li><prestyle="border: 0;"><code>class filedescriptor : public transport
1.<strong>Class naming:</strong> always start with an upper case letter, example: ```ADIOS, Transform, Transport```.
{...</code></pre></li></ul></li><li><code>Do</code><ul><li><prestyle="border: 0;"><code>class FileDescriptor : public Transport
* _Don't_
{...</code></pre></li></ul></li></ul></li><li><strong>Members:</strong> Class member variables will use hungarian notation "m_" prefix followed an upper case letter: m_XMLConfig, m_Shape. This method enables easy autocomplete of members in many editors as it's encouraged by the clang-format. While member functions will have the same rules as regular functions (<em>e.g.</em> start with an upper case letter). <ul><li><code>Don't</code><ul><li><prestyle="border: 0;"><code>class Transport
```cpp
{
classfiledescriptor:publictransport
public:
{...
std::string Name;
```
</code></pre></li></ul></li><li><code>Do</code><ul><li><prestyle="border: 0;"><code>class Transport
* _Do_
{
```cpp
public:
classFileDescriptor:publicTransport
std::string m_Name;
{...
</code></pre></li></ul></li></ul></li><li><strong>Structs:</strong> reserve structs for public member variables only, Structs should not have member functions, inheritance or private members. Structs will be initialized with an upper case letter and member variables won't use hungarian notation as classes. <ul><li><code>Don't</code><ul><li><prestyle="border: 0;"><code>struct Attribute
```
{
2.<strong>Class members naming</strong> member variables: use hungarian notation ```m_``` prefix followed an upper case letter: m_XMLConfig, m_Shape. This method enables easy autocomplete of members in many editors as it's encouraged by the clang-format. Member functions will have the same rules as regular functions (<em>e.g.</em> start with an upper case letter).
public:
std::string m_Name;
* _Don't_
std::string m_Type;
```cpp
std::string m_Value;
class Transport
void SetName( const std::string name ); // Use a class instead
</code></pre></li></ul></li></ul></li><li><strong>Class Header and Source Files:</strong> Only allow one header and one source file per class ( <em>e.g.</em> class Transport in Transport.h and Transport.cpp), do not define several classes in the same file. Structs are always define in one header file, ( <em>e.g.</em> Attribute in Attribute.h )</li></ol>
public:
\ No newline at end of file
std::string m_Name;
3.<strong>Structs:</strong> reserve structs for public member variables only, Structs should not have member functions, derived classes (inheritance), or private members. Structs will be initialized with an upper case letter and member variables won't use hungarian notation (```m_```) as in classes.
* _Don't_
```cpp
struct Attribute
{
public:
std::string m_Name;
std::string m_Type;
std::string m_Value;
// Use a class instead
void SetName( const std::string name );
}
```
* _Don't_
```cpp
struct Attribute
{
std::string Name;
std::string Type;
std::string Value;
}
```
4.<strong>Single header (*.h) and source (*.cpp) file per class</strong>: Example: class Transport must have Transport.h and Transport.cpp only, do not define several classes in the same file. Define structs in single header file, ( _e.g._ Attribute in Attribute.h ).