Skip to content

Commit aa2bf45

Browse files
authored
Merge pull request #6213 from gassmoeller/fix_mapparsing_documentation
Fix some documentation entries for parsing maps
2 parents f24524a + ea75d11 commit aa2bf45

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

include/aspect/utilities.h

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ namespace aspect
7676
const unsigned int N,
7777
const std::string &id_text);
7878

79+
/**
80+
* A namespace that contains options and functions able to parse
81+
* a map of double values from a string representation of the form
82+
* "key1 : value1, key2 : value2, etc". The parsing and output
83+
* is controlled by the Options struct and the parse_map_to_double_array()
84+
* function.
85+
*/
7986
namespace MapParsing
8087
{
8188
/**
@@ -84,7 +91,8 @@ namespace aspect
8491
*/
8592
struct Options
8693
{
87-
/* A list of valid key names that are allowed
94+
/**
95+
* A list of valid key names that are allowed
8896
* to appear in the map. If this list is empty
8997
* it is assumed to be equal to the list of
9098
* required keys. If this list is longer than
@@ -94,22 +102,23 @@ namespace aspect
94102
*/
95103
std::vector<std::string> list_of_allowed_keys;
96104

97-
/* A list of valid key names that are required
105+
/**
106+
* A list of valid key names that are required
98107
* to appear in the map. Only these keys will be
99108
* parsed into the map structure and the order of
100109
* these keys determines the order of entries
101110
* in the output vector.
102111
*/
103112
std::vector<std::string> list_of_required_keys;
104113

105-
/*
114+
/**
106115
* A name that identifies the type of input property (e.g. 'density', 'viscosity')
107116
* that is being parsed by this function. This name is used in generating
108117
* error messages if the map does not conform to the expected format.
109118
*/
110119
std::string property_name;
111120

112-
/*
121+
/**
113122
* If true, allow multiple values
114123
* for each key. If false only allow a single value per key. In either
115124
* case each key is only allowed to appear once. Multiple values
@@ -125,7 +134,7 @@ namespace aspect
125134
*/
126135
bool allow_missing_keys;
127136

128-
/*
137+
/**
129138
* Whether to store the number of values
130139
* per key in n_values_per_key while creating
131140
* the map. This vector can be later accessed
@@ -135,7 +144,7 @@ namespace aspect
135144
*/
136145
bool store_values_per_key;
137146

138-
/*
147+
/**
139148
* Whether to check the number of values
140149
* per key in the map against values stored
141150
* in n_values_per_key. This allows to
@@ -145,7 +154,7 @@ namespace aspect
145154
*/
146155
bool check_values_per_key;
147156

148-
/*
157+
/**
149158
* A vector of unsigned
150159
* integers that is used by store_values_per_key and
151160
* check_values_per_key to either store the current map

0 commit comments

Comments
 (0)