claw::configuration_file::syntax_description Struct Reference

This class tells us how to parse the input file. More...

`#include <configuration_file.hpp>`

## Public Types

typedef std::pair< char, char > | paired_symbol
| Two symbols making a pair (like () or []).

## Public Member Functions

| syntax_description ()
| Default constructor.
std::string | make_comment (const std::string &value) const
| Create a comment from a string.
std::string | make_assignment (const std::string &key, const std::string &value) const
| Make an assignment of a value to a key.
std::string | make_section_name (const std::string &name) const
| Create a section name from a string.

## Public Attributes

char | comment
| Symbol used to comment the rest of the line.
char | assignment
| Symbol used to assign a value to a field.
paired_symbol | section_name
| Pair of symbols around a section name.

## Detailed Description

This class tells us how to parse the input file.

Definition at line 50 of file configuration_file.hpp.

## Member Typedef Documentation

## paired_symbol

typedef std::pair<char, char> claw::configuration_file::syntax_description::paired_symbol

Two symbols making a pair (like () or []).

Definition at line 54 of file configuration_file.hpp.

## Constructor & Destructor Documentation

## syntax_description()

claw::configuration_file::syntax_description::syntax_description | ( |  | ) |

Default constructor.

Definition at line 38 of file configuration_file.cpp.

References assignment, comment, and section_name.

## Member Function Documentation

## make_assignment()

std::string claw::configuration_file::syntax_description::make_assignment | ( | const std::string & | key,
|  | const std::string & | value ) const

Make an assignment of a value to a key.

Parameters

  key | The key.
  value | The value given to the key.

Definition at line 61 of file configuration_file.cpp.

References assignment.

## make_comment()

std::string claw::configuration_file::syntax_description::make_comment | ( | const std::string & | value | ) | const

Create a comment from a string.

Parameters

  value | The string to comment.

Definition at line 49 of file configuration_file.cpp.

References comment.

## make_section_name()

std::string claw::configuration_file::syntax_description::make_section_name | ( | const std::string & | name | ) | const

Create a section name from a string.

Parameters

  name | The name of the section.

Definition at line 72 of file configuration_file.cpp.

References section_name.

Referenced by claw::configuration_file::save().

## Member Data Documentation

## assignment

char claw::configuration_file::syntax_description::assignment

Symbol used to assign a value to a field.

Definition at line 69 of file configuration_file.hpp.

Referenced by make_assignment(), and syntax_description().

## comment

char claw::configuration_file::syntax_description::comment

Symbol used to comment the rest of the line.

Definition at line 66 of file configuration_file.hpp.

Referenced by make_comment(), and syntax_description().

## section_name

paired_symbol claw::configuration_file::syntax_description::section_name

Pair of symbols around a section name.

Definition at line 72 of file configuration_file.hpp.

Referenced by make_section_name(), and syntax_description().

The documentation for this struct was generated from the following files:

- configuration_file.hpp
- code/configuration_file.cpp