@@ -85,9 +85,22 @@ struct Config {
8585 */
8686 [[nodiscard]] std::expected<void , std::string> init (const std::string &input_file_path) noexcept ;
8787
88+ /* !
89+ * parses and sets internal state from a toml configuration
90+ * @param config toml configuration
91+ * @return std::expected<void, std::string> for {success, error} cases respectively
92+ */
8893 [[nodiscard]] std::expected<void , std::string>
89- parse_from (const toml::basic_value<toml::type_config> &config) noexcept ;
94+ parse_from_toml (const toml::basic_value<toml::type_config> &config) noexcept ;
9095
96+ /* !
97+ * parses item of type T from toml configuration at a given table and key
98+ * @tparam T type to be parsed
99+ * @param config toml configuration
100+ * @param table table to parse from
101+ * @param key item key in table
102+ * @return std::expected<T, std::string> for {success, error} cases respectively
103+ */
91104 template <typename T>
92105 std::expected<T, std::string> parse_item (const toml::basic_value<toml::type_config> &config, const std::string table,
93106 const std::string key) noexcept {
@@ -143,8 +156,21 @@ struct Config {
143156 return name;
144157 }
145158
159+ /* !
160+ * validates internal state against preconfigured value ranges
161+ * @return std::expected<void, std::string> for {success, error} cases respectively
162+ */
146163 [[nodiscard]] std::expected<void , std::string> validate () noexcept ;
147164
165+ /* !
166+ * checks to see if value is within a given range
167+ * @tparam T type of value
168+ * @param value value to check
169+ * @param lower lower end of range
170+ * @param upper upper end of range
171+ * @param bounds inclusivity/exclusivity of lower and upper bounds respectively
172+ * @return {true, false} for {in, out} of range respectively
173+ */
148174 template <typename T>
149175 static bool in_range (const T value, const T lower, const T upper, const Bounds bounds) noexcept {
150176 SPDLOG_TRACE (" enter Config::in_range" );
@@ -174,6 +200,12 @@ struct Config {
174200 return status;
175201 }
176202
203+ /* !
204+ * sets up output filesystem at out
205+ * @param id unique identifier
206+ * @return std::expected<std::filesystem::path, std::string> for {success, error} cases respectively
207+ * @note std::filesystem::path is a path to a unique output folder which is used to store data from a given run
208+ */
177209 std::expected<std::filesystem::path, std::string> setup_out (const std::string &id) const noexcept ;
178210};
179211
0 commit comments