Skip to content

Commit ac46bfa

Browse files
committed
fable: Improve documentation of fable::schema::{Interface, Base}
1 parent 406b120 commit ac46bfa

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

fable/include/fable/schema/interface.hpp

+12
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,12 @@ class Box : public Interface {
348348

349349
// ------------------------------------------------------------------------- //
350350

351+
/**
352+
* The Base class implements the Interface partially and is meant to cover
353+
* the most commonly used types.
354+
*
355+
* See most of the other schema types for how it is used.
356+
*/
351357
template <typename CRTP>
352358
class Base : public Interface {
353359
public:
@@ -397,6 +403,12 @@ class Base : public Interface {
397403
}
398404

399405
protected:
406+
/**
407+
* Validate whether `c` is of the correct type.
408+
*
409+
* This method is provided for an implementation to call in its `validate()`
410+
* implementation. It is not called automatically.
411+
*/
400412
void validate_type(const Conf& c) const {
401413
if (c->type() != type_) {
402414
if (c->type() == JsonType::number_unsigned && type_ == JsonType::number_integer) {

0 commit comments

Comments
 (0)