|
Parsnip
parsing library
|
Schema component requiring data be a particular type. More...
#include <parsnip_schema.h>
Public Member Functions | |
| UncheckedSchema (const UncheckedSchema &)=default | |
| UncheckedSchema (UncheckedSchema &&)=default | |
| UncheckedSchema & | operator= (const UncheckedSchema &)=default |
| UncheckedSchema & | operator= (UncheckedSchema &&)=default |
| virtual UncheckedSchema * | createCopy () const override |
| Create an identical, deep copy of the schema. | |
| virtual void | validate (const Parsnip::Data &) const override |
| Construct a schema element that does no checking. | |
| virtual std::ostream & | dump (std::ostream &target, int indent, bool suppress_ident=false) const override |
| Render the schema in human-friendly text. | |
Public Member Functions inherited from Parsnip::SchemaBase | |
| virtual bool | operator== (const SchemaBase &other) const |
| Check if two schemas perform the same validation. | |
| bool | operator!= (const SchemaBase &other) const |
| virtual void | mergeSchemas (const SchemaBase &from) |
| Merge elements into the current schema. | |
Additional Inherited Members | |
Protected Types inherited from Parsnip::SchemaBase | |
| using | StringType = Data::StringType |
| using | SchemaRegex = std::basic_regex< StringType::value_type > |
Protected Member Functions inherited from Parsnip::SchemaBase | |
| SchemaBase (const SchemaBase &)=default | |
| SchemaBase (SchemaBase &&)=default | |
| SchemaBase & | operator= (const SchemaBase &)=default |
| SchemaBase & | operator= (SchemaBase &&)=default |
| SchemaBase (const Parsnip::Data &schema_spec) | |
| Construct a schema from a JSON specification. | |
| void | checkType (Data::Type expected, const Parsnip::Data &entry) const |
| Check that Data item is an allowed type. | |
| bool | isValidlyNull (const Parsnip::Data &entry) const |
| Determine if the data is Null and if that is allowed. | |
| bool | isType (Data::Type expected, const Parsnip::Data &entry) const |
| Check if a data object is a particular type. | |
Protected Attributes inherited from Parsnip::SchemaBase | |
| bool | nullable = false |
If true, element may be null. | |
Schema component requiring data be a particular type.
|
overridevirtual |
Create an identical, deep copy of the schema.
Caller is responsible for deleting it.
Implements Parsnip::SchemaBase.
|
overridevirtual |
Render the schema in human-friendly text.
| target | Where to write the schema. |
| indent | Amount of indent to use. |
| suppress_indent | Flag indicating indent was already performed. |
Implements Parsnip::SchemaBase.
|
overridevirtual |
Construct a schema element that does no checking.
Implements Parsnip::SchemaBase.