Oolite 1.91.0.7646-241128-10e222e
Loading...
Searching...
No Matches
OOPListSchemaVerifier.h File Reference
import "OOOXPVerifier.h"
import <Foundation/Foundation.h>
import "OOFunctionAttributes.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 113 of file OOPListSchemaVerifier.h.

114{
116 kPListErrorInternal, // PList verifier did something dumb.
117
118 // Verification errors -- property list doesn't match schema.
119 kPListErrorTypeMismatch, // Basic type mismatch -- array instead of number, for instance.
120
121 kPListErrorMinimumConstraintNotMet, // minimum/minCount/minLength constraint violated
122 kPListErrorMaximumConstraintNotMet, // maximum/maxCount/maxLength constraint violated
123 kPListErrorNumberIsNegative, // Negative number in positiveFloat.
124
125 kPListErrorStringPrefixMissing, // String does not match requiredPrefix rule. kMissingSubStringErrorKey is set.
126 kPListErrorStringSuffixMissing, // String does not match requiredSuffix rule. kMissingSubStringErrorKey is set.
127 kPListErrorStringSubstringMissing, // String does not match requiredSuffix rule. kMissingSubStringErrorKey is set.
128
129 kPListErrorDictionaryUnknownKey, // Unknown key for dictionary with allowOthers = NO.
130 kPListErrorDictionaryMissingRequiredKeys, // requiredKeys rule is not fulfilled. The missing keys are listed in kMissingRequiredKeysErrorKey.
131
132 kPListErrorEnumerationBadValue, // Enumeration type contains string that isn't in permitted set.
133
134 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.
135
136 kPListDelegatedTypeError, // Delegate's verification method failed. If it returned an error, this will be in NSUnderlyingErrorKey.
137
138 // Schema errors -- schema is broken.
140
141 kPListErrorSchemaBadTypeSpecifier, // Bad type specifier - specifier is not a string or a dictionary, or is a dictionary with no type key. kUndefinedMacroErrorKey is set.
142 kPListErrorSchemaUndefiniedMacroReference, // Reference to $macro not found in $definitions.
143 kPListErrorSchemaUnknownType, // Unknown type specified in type specifier. kUnknownTypeErrorKey is set.
144 kPListErrorSchemaNoOneOfOptions, // OneOf clause has no options array.
145 kPListErrorSchemaNoEnumerationValues, // Enumeration clause has no values array.
146 kPListErrorSchemaUnknownFilter, // Bad value for string/enumeration filter specifier.
147 kPListErrorSchemaBadComparator, // String comparision requirement value (requiredPrefix etc.) is not a string.
148
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 153 of file OOPListSchemaVerifier.h.

154{
156}

References kPListErrorLastErrorCode, and kPListErrorStartOfSchemaErrors.

Variable Documentation

◆ kErrorsByOptionErrorKey

NSString* const kErrorsByOptionErrorKey
extern

Definition at line 85 of file OOPListSchemaVerifier.m.

Referenced by Verify_OneOf().

◆ kExpectedClassErrorKey

NSString* const kExpectedClassErrorKey
extern

Definition at line 79 of file OOPListSchemaVerifier.m.

◆ kExpectedClassNameErrorKey

NSString* const kExpectedClassNameErrorKey
extern

Definition at line 80 of file OOPListSchemaVerifier.m.

◆ kMissingRequiredKeysErrorKey

NSString* const kMissingRequiredKeysErrorKey
extern

Definition at line 82 of file OOPListSchemaVerifier.m.

Referenced by Verify_Dictionary().

◆ kMissingSubStringErrorKey

NSString* const kMissingSubStringErrorKey
extern

Definition at line 83 of file OOPListSchemaVerifier.m.

Referenced by Verify_String().

◆ kOOPListSchemaVerifierErrorDomain

NSString* const kOOPListSchemaVerifierErrorDomain
extern

Definition at line 74 of file OOPListSchemaVerifier.m.

◆ kPListKeyPathErrorKey

NSString* const kPListKeyPathErrorKey
extern

Definition at line 76 of file OOPListSchemaVerifier.m.

◆ kSchemaKeyPathErrorKey

NSString* const kSchemaKeyPathErrorKey
extern

Definition at line 77 of file OOPListSchemaVerifier.m.

◆ kUndefinedMacroErrorKey

NSString* const kUndefinedMacroErrorKey
extern

Definition at line 88 of file OOPListSchemaVerifier.m.

◆ kUnknownKeyErrorKey

NSString* const kUnknownKeyErrorKey
extern

Definition at line 81 of file OOPListSchemaVerifier.m.

Referenced by Verify_Dictionary().

◆ kUnknownTypeErrorKey

NSString* const kUnknownTypeErrorKey
extern

Definition at line 87 of file OOPListSchemaVerifier.m.

Referenced by StringToSchemaType().

◆ kUnnownFilterErrorKey

NSString* const kUnnownFilterErrorKey
extern

Definition at line 84 of file OOPListSchemaVerifier.m.

Referenced by ApplyStringFilter().