Oolite
Loading...
Searching...
No Matches
OOPListSchemaVerifier.h File Reference
import "OOOXPVerifier.h"
import "OOFunctionAttributes.h"
import <Foundation/Foundation.h>
Include dependency graph for OOPListSchemaVerifier.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  OOPListSchemaVerifier
category  NSObject(OOPListSchemaVerifierDelegate)
category  NSError(OOPListSchemaVerifierConveniences)

Enumerations

enum  OOPListSchemaVerifierErrorCode {
  kPListErrorNone , kPListErrorInternal , kPListErrorTypeMismatch , kPListErrorMinimumConstraintNotMet ,
  kPListErrorMaximumConstraintNotMet , kPListErrorNumberIsNegative , kPListErrorStringPrefixMissing , kPListErrorStringSuffixMissing ,
  kPListErrorStringSubstringMissing , kPListErrorDictionaryUnknownKey , kPListErrorDictionaryMissingRequiredKeys , kPListErrorEnumerationBadValue ,
  kPListErrorOneOfNoMatch , kPListDelegatedTypeError , kPListErrorStartOfSchemaErrors = 100 , kPListErrorSchemaBadTypeSpecifier ,
  kPListErrorSchemaUndefiniedMacroReference , kPListErrorSchemaUnknownType , kPListErrorSchemaNoOneOfOptions , kPListErrorSchemaNoEnumerationValues ,
  kPListErrorSchemaUnknownFilter , kPListErrorSchemaBadComparator , kPListErrorLastErrorCode
}

Functions

OOINLINE BOOL OOPlistErrorIsSchemaError (OOPListSchemaVerifierErrorCode error)

Variables

NSString *const kOOPListSchemaVerifierErrorDomain
NSString *const kPListKeyPathErrorKey
NSString *const kSchemaKeyPathErrorKey
NSString *const kExpectedClassErrorKey
NSString *const kExpectedClassNameErrorKey
NSString *const kUnknownKeyErrorKey
NSString *const kMissingRequiredKeysErrorKey
NSString *const kMissingSubStringErrorKey
NSString *const kUnnownFilterErrorKey
NSString *const kErrorsByOptionErrorKey
NSString *const kUnknownTypeErrorKey
NSString *const kUndefinedMacroErrorKey

Enumeration Type Documentation

◆ OOPListSchemaVerifierErrorCode

Enumerator
kPListErrorNone 
kPListErrorInternal 
kPListErrorTypeMismatch 
kPListErrorMinimumConstraintNotMet 
kPListErrorMaximumConstraintNotMet 
kPListErrorNumberIsNegative 
kPListErrorStringPrefixMissing 
kPListErrorStringSuffixMissing 
kPListErrorStringSubstringMissing 
kPListErrorDictionaryUnknownKey 
kPListErrorDictionaryMissingRequiredKeys 
kPListErrorEnumerationBadValue 
kPListErrorOneOfNoMatch 
kPListDelegatedTypeError 
kPListErrorStartOfSchemaErrors 
kPListErrorSchemaBadTypeSpecifier 
kPListErrorSchemaUndefiniedMacroReference 
kPListErrorSchemaUnknownType 
kPListErrorSchemaNoOneOfOptions 
kPListErrorSchemaNoEnumerationValues 
kPListErrorSchemaUnknownFilter 
kPListErrorSchemaBadComparator 
kPListErrorLastErrorCode 

Definition at line 108 of file OOPListSchemaVerifier.h.

108 {
110 kPListErrorInternal, // PList verifier did something dumb.
111
112 // Verification errors -- property list doesn't match schema.
113 kPListErrorTypeMismatch, // Basic type mismatch -- array instead of number, for instance.
114
115 kPListErrorMinimumConstraintNotMet, // minimum/minCount/minLength constraint violated
116 kPListErrorMaximumConstraintNotMet, // maximum/maxCount/maxLength constraint violated
117 kPListErrorNumberIsNegative, // Negative number in positiveFloat.
118
119 kPListErrorStringPrefixMissing, // String does not match requiredPrefix rule. kMissingSubStringErrorKey is set.
120 kPListErrorStringSuffixMissing, // String does not match requiredSuffix rule. kMissingSubStringErrorKey is set.
121 kPListErrorStringSubstringMissing, // String does not match requiredSuffix rule. kMissingSubStringErrorKey is set.
122
123 kPListErrorDictionaryUnknownKey, // Unknown key for dictionary with allowOthers = NO.
124 kPListErrorDictionaryMissingRequiredKeys, // requiredKeys rule is not fulfilled. The missing keys are listed in kMissingRequiredKeysErrorKey.
125
126 kPListErrorEnumerationBadValue, // Enumeration type contains string that isn't in permitted set.
127
128 kPListErrorOneOfNoMatch, // No match for oneOf type. kErrorsByOptionErrorKey is set to a dictionary of type specifiers to errors. Note that the keys in this dictionary can be either strings or dictionaries.
129
130 kPListDelegatedTypeError, // Delegate's verification method failed. If it returned an error, this will be in NSUnderlyingErrorKey.
131
132 // Schema errors -- schema is broken.
134
135 kPListErrorSchemaBadTypeSpecifier, // Bad type specifier - specifier is not a string or a dictionary, or is a dictionary with no type key. kUndefinedMacroErrorKey is set.
136 kPListErrorSchemaUndefiniedMacroReference, // Reference to $macro not found in $definitions.
137 kPListErrorSchemaUnknownType, // Unknown type specified in type specifier. kUnknownTypeErrorKey is set.
138 kPListErrorSchemaNoOneOfOptions, // OneOf clause has no options array.
139 kPListErrorSchemaNoEnumerationValues, // Enumeration clause has no values array.
140 kPListErrorSchemaUnknownFilter, // Bad value for string/enumeration filter specifier.
141 kPListErrorSchemaBadComparator, // String comparision requirement value (requiredPrefix etc.) is not a string.
142
OOPListSchemaVerifierErrorCode
@ kPListErrorDictionaryMissingRequiredKeys
@ kPListErrorSchemaNoEnumerationValues
@ kPListErrorStartOfSchemaErrors
@ kPListErrorNumberIsNegative
@ kPListErrorEnumerationBadValue
@ kPListErrorSchemaBadTypeSpecifier
@ kPListErrorInternal
@ kPListErrorSchemaNoOneOfOptions
@ kPListErrorTypeMismatch
@ kPListErrorStringSubstringMissing
@ kPListErrorSchemaUnknownType
@ kPListErrorMaximumConstraintNotMet
@ kPListErrorNone
@ kPListErrorDictionaryUnknownKey
@ kPListErrorMinimumConstraintNotMet
@ kPListErrorLastErrorCode
@ kPListDelegatedTypeError
@ kPListErrorStringSuffixMissing
@ kPListErrorOneOfNoMatch
@ kPListErrorSchemaUndefiniedMacroReference
@ kPListErrorSchemaBadComparator
@ kPListErrorSchemaUnknownFilter
@ kPListErrorStringPrefixMissing

Function Documentation

◆ OOPlistErrorIsSchemaError()

OOINLINE BOOL OOPlistErrorIsSchemaError ( OOPListSchemaVerifierErrorCode error)

Definition at line 146 of file OOPListSchemaVerifier.h.

147{
149}

References kPListErrorLastErrorCode, kPListErrorStartOfSchemaErrors, and OOINLINE.

Variable Documentation

◆ kErrorsByOptionErrorKey

◆ kExpectedClassErrorKey

◆ kExpectedClassNameErrorKey

NSString* const kExpectedClassNameErrorKey
extern

◆ kMissingRequiredKeysErrorKey

◆ kMissingSubStringErrorKey

◆ kOOPListSchemaVerifierErrorDomain

NSString* const kOOPListSchemaVerifierErrorDomain
extern

◆ kPListKeyPathErrorKey

◆ kSchemaKeyPathErrorKey

◆ kUndefinedMacroErrorKey

◆ kUnknownKeyErrorKey

◆ kUnknownTypeErrorKey

◆ kUnnownFilterErrorKey