//
//  TTTable.h
//  GSFontTools
//
//  Created by Georg Seifert on 24.07.11.
//  Copyright 2011 schriftgestaltung.de. All rights reserved.
//

#import <Foundation/Foundation.h>

@class TTFont;
@class GSXMLWriter;

@interface TTTable : NSObject

@property (nonatomic, strong) NSError *error;
@property (nonatomic, strong) NSArray *glyphOrder;
@property (nonatomic, copy) NSString *tableTag;
//@property (nonatomic, assign) NSUInteger originalSize;
@property (nonatomic, strong) NSData *cachedData;

- (instancetype)initWithTag:(NSString *)tag;

+ (NSArray *)dependencies;

- (void)toXML:(GSXMLWriter *)writer font:(TTFont *)font;
- (void)fromXML:(NSString *)name attrs:(NSDictionary *)attrs content:(id)content font:(TTFont *)font;

- (BOOL)decompile:(NSData *)data font:(TTFont *)font error:(NSError **)error;
- (NSData *)compile:(TTFont *)font error:(NSError **)error;

@end
