|
Parsnip
parsing library
|
Public Member Functions | |
| IntegerSchema (const Parsnip::Data &schema_spec) | |
| Construct an integer schema from a schema specification. | |
| virtual IntegerSchema * | createCopy () const override |
| Create an identical, deep copy of the schema. | |
| virtual bool | operator== (const SchemaBase &other) const override |
| Check if two schemas perform the same validation. | |
| virtual void | validate (const Parsnip::Data &entry) const override |
| Validate item range: ensure the datatype falls within the allowed range. | |
Public Member Functions inherited from Parsnip::RangeSchema< long > | |
| RangeSchema (const long min=std::numeric_limits< long >::lowest(), const long max=std::numeric_limits< long >::max()) | |
| Construct a numeric schema from a schema definition. | |
| RangeSchema (const RangeSchema &)=default | |
| RangeSchema (RangeSchema &&)=default | |
| RangeSchema (const Parsnip::Data &schema_spec) | |
| Construct a numeric schema from a schema definition. | |
| RangeSchema & | operator= (const RangeSchema &)=default |
| RangeSchema & | operator= (RangeSchema &&)=default |
| virtual void | mergeSchemas (const SchemaBase &from) override |
| Merge elements into the current schema. | |
| 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 | |
| bool | operator!= (const SchemaBase &other) const |
Additional Inherited Members | |
Public Types inherited from Parsnip::RangeSchema< long > | |
| using | value_type = long |
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. | |
|
overridevirtual |
Create an identical, deep copy of the schema.
Caller is responsible for deleting it.
Reimplemented from Parsnip::RangeSchema< long >.
|
overridevirtual |
Check if two schemas perform the same validation.
Compare two schemas to see if they determine validity in the same manner.
| other | The schema to compare to. |
Reimplemented from Parsnip::RangeSchema< long >.
|
overridevirtual |
Validate item range: ensure the datatype falls within the allowed range.
Reimplemented from Parsnip::RangeSchema< long >.