|
pianod2
multisource multiuser scriptable networked music player
|
Schema component requiring data be a string of characters matching a regular expression. More...
#include <parsnip_schema.h>


Public Types | |
| using | size_type = StringType::size_type |
Public Types inherited from Parsnip::StringSchema | |
| using | size_type = StringType::size_type |
Public Member Functions | |
| RegExSchema (const StringType &express, bool case_blind=false, size_type min=0, size_type max=std::numeric_limits< size_type >::max()) | |
| Construct a regular expression validator. More... | |
| RegExSchema (const RegExSchema &)=default | |
| RegExSchema (RegExSchema &&)=default | |
| RegExSchema & | operator= (const RegExSchema &)=default |
| RegExSchema & | operator= (RegExSchema &&)=default |
| RegExSchema (const Parsnip::Data &schema_spec) | |
| Construct a string regular expression validator from a schema spec. More... | |
| virtual RegExSchema * | createCopy () const override |
| Create an identical, deep copy of the schema. More... | |
| virtual void | validate (const Parsnip::Data &entry) const override |
| Verify that Data matches the schema. More... | |
| virtual bool | operator== (const SchemaBase &other) const override |
| Check if two schemas perform the same validation. More... | |
| virtual std::ostream & | dump (std::ostream &target, int indent, bool suppress_ident=false) const override |
| Render the schema in human-friendly text. More... | |
Public Member Functions inherited from Parsnip::StringSchema | |
| StringSchema (size_type min=0, size_type max=std::numeric_limits< size_type >::max()) | |
| Validate a type schema: ensure the datatype is as expected. More... | |
| StringSchema (const StringSchema &)=default | |
| StringSchema (StringSchema &&)=default | |
| StringSchema & | operator= (const StringSchema &)=default |
| StringSchema & | operator= (StringSchema &&)=default |
| StringSchema (const Parsnip::Data &schema_spec) | |
| Construct a string validator from a schema specification. More... | |
Public Member Functions inherited from Parsnip::SchemaBase | |
| virtual | ~SchemaBase ()=default |
| bool | operator!= (const SchemaBase &other) const |
| virtual void | mergeSchemas (const SchemaBase &from) |
| Merge elements into the current schema. More... | |
Private Attributes | |
| StringType | expression |
| SchemaRegex | regex |
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 ()=default | |
| 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. More... | |
| void | checkType (Data::Type expected, const Parsnip::Data &entry) const |
| Check that Data item is an allowed type. More... | |
| bool | isValidlyNull (const Parsnip::Data &entry) const |
| Determine if the data is Null and if that is allowed. More... | |
| bool | isType (Data::Type expected, const Parsnip::Data &entry) const |
| Check if a data object is a particular type. More... | |
Protected Attributes inherited from Parsnip::StringSchema | |
| size_type | min_length |
| size_type | max_length |
Protected Attributes inherited from Parsnip::SchemaBase | |
| bool | nullable = false |
If true, element may be null. More... | |
Schema component requiring data be a string of characters matching a regular expression.
| using Parsnip::RegExSchema::size_type = StringType::size_type |
| Parsnip::RegExSchema::RegExSchema | ( | const StringType & | express, |
| bool | case_blind = false, |
||
| size_type | min = 0, |
||
| size_type | max = std::numeric_limits<size_type>::max() |
||
| ) |
Construct a regular expression validator.
| express | The regular expression. |
| case_blind | If true, the expression is applied case insensitive. |
| min | Minimum length of valid strings. |
| max | Maximum length of valid strings. |
|
default |
|
default |
| Parsnip::RegExSchema::RegExSchema | ( | const Parsnip::Data & | schema_spec | ) |
Construct a string regular expression validator from a schema spec.
|
overridevirtual |
Create an identical, deep copy of the schema.
Caller is responsible for deleting it.
Reimplemented from Parsnip::StringSchema.
|
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. |
Reimplemented from Parsnip::StringSchema.

|
default |
|
default |
|
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::StringSchema.
|
overridevirtual |
Verify that Data matches the schema.
| entry | The data to validate. |
| Various | exceptions. |
Reimplemented from Parsnip::StringSchema.

|
private |
|
private |