SVGKParseResult.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. Reports detailed information from an attempted run of the SVG Parser
  3. */
  4. #import <Foundation/Foundation.h>
  5. @class SVGSVGElement, SVGDocument;
  6. #import "SVGSVGElement.h"
  7. #import "SVGDocument.h"
  8. @protocol SVGKParserExtension;
  9. #import "SVGKParserExtension.h"
  10. @interface SVGKParseResult : NSObject
  11. @property(nonatomic, strong) NSMutableArray* warnings, * errorsRecoverable, * errorsFatal;
  12. @property(nonatomic) BOOL libXMLFailed;
  13. /** 0.0 = no parsing done yet, 0.x = partially parsed, 1.0 = parse complete (no fatal errors) */
  14. @property(nonatomic) double parseProgressFractionApproximate;
  15. @property(nonatomic,strong) SVGSVGElement* rootOfSVGTree; /**< both are needed, see spec */
  16. @property(nonatomic,strong) SVGDocument* parsedDocument; /**< both are needed, see spec */
  17. @property(nonatomic,strong) NSMutableDictionary* namespacesEncountered; /**< maps "prefix" to "uri" */
  18. -(void) addSourceError:(NSError*) fatalError;
  19. -(void) addParseWarning:(NSError*) warning;
  20. -(void) addParseErrorRecoverable:(NSError*) recoverableError;
  21. -(void) addParseErrorFatal:(NSError*) fatalError;
  22. -(void) addSAXError:(NSError*) saxError;
  23. #if ENABLE_PARSER_EXTENSIONS_CUSTOM_DATA
  24. /*! Each SVGKParserExtension can optionally save extra data here */
  25. @property(nonatomic,retain) NSMutableDictionary* extensionsData;
  26. -(NSMutableDictionary*) dictionaryForParserExtension:(NSObject<SVGKParserExtension>*) extension;
  27. #endif
  28. @end