Schema adapter component that allows use of schemas from option parsers.
More...
#include <parsnip_schema.h>
Schema adapter component that allows use of schemas from option parsers.
◆ OptionSchema() [1/4]
| Parsnip::OptionSchema::OptionSchema |
( |
| ) |
|
|
default |
Validate a type schema: ensure the datatype is as expected.
◆ OptionSchema() [2/4]
| Parsnip::OptionSchema::OptionSchema |
( |
const OptionSchema & |
| ) |
|
|
default |
◆ OptionSchema() [3/4]
◆ OptionSchema() [4/4]
| Parsnip::OptionSchema::OptionSchema |
( |
const SchemaRef & |
option_schema | ) |
|
Construct a new option schema.
◆ createCopy()
Create an identical, deep copy of the schema.
Caller is responsible for deleting it.
Implements Parsnip::SchemaBase.
◆ dump()
| std::ostream & Parsnip::OptionSchema::dump |
( |
std::ostream & |
target, |
|
|
int |
indent, |
|
|
bool |
suppress_indent = false |
|
) |
| const |
|
overridevirtual |
Render the schema in human-friendly text.
- Parameters
-
| target | Where to write the schema. |
| indent | Amount of indent to use. |
| suppress_indent | Flag indicating indent was already performed. |
Implements Parsnip::SchemaBase.
◆ mergeSchemas()
| void Parsnip::OptionSchema::mergeSchemas |
( |
const SchemaBase & |
from | ) |
|
|
overridevirtual |
Merge elements into the current schema.
Merge elements managed by this class.
- Elements seen every time are mandatory.
- Elements seen only sometime are optional.
- Elements always seen together are codependent.
- Elements must always expect similar types, except they may vary as element and list-of-same-element.
- Parameters
-
| from | A schema for a valid command command line. |
- Exceptions
-
Reimplemented from Parsnip::SchemaBase.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ operator==()
| bool Parsnip::OptionSchema::operator== |
( |
const SchemaBase & |
other | ) |
const |
|
overridevirtual |
Check if two schemas perform the same validation.
Compare two schemas to see if they determine validity in the same manner.
- Parameters
-
| other | The schema to compare to. |
- Returns
- True if the schemas match, false otherwise.
Reimplemented from Parsnip::SchemaBase.
◆ validate()
| void Parsnip::OptionSchema::validate |
( |
const Parsnip::Data & |
entry | ) |
const |
|
overridevirtual |
Validate the option's schema by calling that scheme's validator.
Implements Parsnip::SchemaBase.
◆ schema
The documentation for this class was generated from the following files: