Guidelines
This chapter collects the internal guidelines for maintaining and extending this library.
The documents in this section describe how source code, APIs, documentation, and supporting files should be written and structured. Their purpose is to ensure that the entire project remains consistent, readable, maintainable, and easy to understand for both contributors and long-term maintainers.
These guidelines are primarily intended for:
maintainers,
contributors,
and developers working on the library itself.
If you are only using the library in your own applications, most of these documents are not required reading. However, they may still provide useful insights into the design philosophy and architectural decisions behind the project.
- Erbsland C++ Code Style
- CMake Build Files Structure
- Guidelines for File Structures
- Platform Integration Guidelines
- ReStructuredText Style
- Topic Page Guidelines
- What are Good Topic Pages?
- File Structure
- Page Structure
- Recommended Workflow to Create the Content
- Teach Concepts Through Working Examples
- Introduce the underlying concept before walking through the demo
- Introduce the purpose of each operation before its architectural classification
- Explain the normal execution path before discussing variations
- Give each example one teaching purpose
- Keep declarations that explain ownership and execution visible
- Explain details in proportion to their role in the task
- Section Titles That Help Readers Navigate
- Review the Reader’s Path
- Recommended Writing Style
- Anti-Patterns
- Related Guidelines
- Reference Page Guidelines
- Maintenance Tool Documentation Guidelines
- Writing Style
- Guidelines for Writing Demos
- Integrating Demos into Pages
- Guidelines for Writing Examples and Demos
- Themes and Languages for Examples and Demos
- Bad Code and Anti-Patterns
- Severity
- Automated Scanner
- Accepted Locations
- Anti-Pattern Catalog
- Files Longer Than 500 Lines
- Anonymous Namespaces
- Classes and Structs in the Wrong Files or Units
- Namespaces in the Wrong Units
- Implementations in the Wrong Units
- Oversized Nested Types
- Forward Declarations at the Usage Location
- Static Global Object Construction
- Classes with Only Static Methods
- Missing API Documentation
- API Documentation on Member Implementations
- Misplaced Unit-Test Metadata
- Missing Default Group Comment
- Multiple Classes, Structs, or Enums in a Header
- Regular Literal Strings for Erbsland Core APIs
- Erbsland Core Containers Strict
- Named Constant for Repeated Literals
- Silencing nodiscard with
static_cast<void>(...) - Inefficient and Unnecessary Conversions or Copies
- Nested Namespace Blocks and End Comments
- Multiple Distinct Namespaces in One Unit
- Unnecessary Unit Conversions
- Unnecessary Type Construction
- Namespace Noise
- Archive Format Documentation
- Cryptographic Algorithm Documentation
- How to Write API Guidelines
- Common API Guidelines
- Block Geometry Domain API Guidelines
- Compression Domain API Guidelines
- Geometry API Guidelines
- Configuration Domain API Guidelines
- Core Semantics
- Primary Types
- Value and Document Types
- Source and Trust Types
- Validation Rules Types
- Error Types
- Syntax Formatting Types
- Pattern Definitions
- Value Access Patterns
- Document Construction Patterns
- Parsing Patterns
- Validation Rule Construction Patterns
- Source and Trust Patterns
- Syntax Formatting Patterns
- Core Application API Guidelines
- Cryptology Domain API Guidelines
- Core Semantics
- Primary Types
- Secondary Types
- X.509 Identity Patterns
- Hash Selection Patterns
- Hashing Patterns
- Message Authentication Patterns
- Key Derivation Patterns
- Symmetric Encryption Patterns
- Cryptology Configuration Patterns
- TLS Configuration and Parser Patterns
- Protected Data Patterns
- Key Agreement Patterns
- Password Hashing Patterns
- X.509 Certificate Patterns
- Signature Verification Patterns
- TLS 1.3 Record Protection Patterns
- TLS Identity Patterns
- Color Terminal Domain API Guidelines
- Core Semantics
- Primary Types
- Buffer Types
- Drawing Types
- Input Types
- Terminal Integration Types
- Document Types
- Pattern Definitions
- Block and Style Patterns
- Buffer Read Patterns
- Buffer Write Patterns
- Cursor Write Patterns
- Terminal Patterns
- Input Patterns
- Interactive Read Patterns
- Document Rendering Patterns
- Emulation and Rendering Patterns
- Error Domain API Guidelines
- Event Domain API Guidelines
- Internationalization API Guidelines
- Log Domain API Guidelines
- Math Domain API Guidelines
- Memory Domain API Guidelines
- Core Semantics
- Primary Types
- Secondary Types
- Pattern Definitions
- Internal Byte Tool Patterns
- Byte Value Patterns
- Byte Sequence Read Patterns
- Mutable Byte Sequence Patterns
- Shared Block Patterns
- Integer Access Patterns
- Sequential Read and Write Patterns
- Sequential Bit Read and Write Patterns
- Ring Buffer Patterns
- Sensitive Byte Storage Patterns
- Shared Storage Patterns
- Compiled Resource API Guidelines
- Network Domain API Guidelines
- Options Domain API Guidelines
- Path API Guidelines
- Random Domain API Guidelines
- Regular Expression API Guidelines
- Stream API Guidelines
- System Domain API Guidelines
- Text Domain API Guidelines
- Core Semantics
- Primary Types
- Processing Types
- Formatting and Parsing Types
- Collection and Pattern Types
- Document Types
- Layout Renderer Types
- Codec Types
- Pattern Definitions
- Character Set Construction Patterns
- String Value Patterns
- String Joining Patterns
- String Transformation Patterns
- String Editing Patterns
- Reader and Split Patterns
- Conversion and Encoding Patterns
- Formatting and Parsing Patterns
- Sensitive UTF-8 Patterns
- Document Patterns
- JSON Value Patterns
- Layout Renderer Patterns
- Placeholder Patterns
- Named-Key Parsing Patterns
- Base-N Codec Patterns
- Punycode and IDNA Patterns
- String Matching Patterns
- C++ Source Scanning Patterns
- Data Domain API Guidelines
- Time Domain API Guidelines
- Core Semantics
- Primary Types
- Amount and Part Types
- Supporting Types
- Policy Types
- Part Value Patterns
- Calendar Inspection Patterns
- Civil Value Patterns
- Time-of-Day Patterns
- Duration and Delta Patterns
- Date-Time Patterns
- Time-Zone Patterns
- Formatting and Parsing Patterns
- Monotonic Time Patterns
- Timestamp Patterns
- Unit and Value Domain API Guidelines
- Utilities API Guidelines