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

#import <GSFontTools/PSUtilities.h>

@class PSToken;

@interface PSByteCodeBase : NSObject

@property (assign) PSEncodingFormat encodingFormat;
@property (nonatomic, strong) NSDictionary *opcodes;

- (PSToken *)tokenForValue:(uint8_t)b0 format:(PSEncodingFormat)format file:(NSData *)file pos:(NSUInteger *)pos NS_RETURNS_RETAINED;

//- (PSOperator)resolveOperatorCode:(uint8_t)b0;
- (int)resolveOperator:(uint8_t)b0 file:(NSData *)file pos:(NSUInteger *)pos;

- (id)performOperator:(int)op pos:(NSUInteger *)pos NS_RETURNS_RETAINED;

//- (NSNumber*)read_byte:(NSInteger)b0 file:(GSFileData*)file;
//- (NSNumber*)read_smallInt1:(NSInteger)b0 file:(GSFileData*)file;
//- (NSNumber*)read_smallInt2:(NSInteger)b0 file:(GSFileData*)file;
//- (NSNumber*)read_shortInt:(NSInteger)b0 file:(GSFileData*)file;
//- (NSNumber*)read_longInt:(NSInteger)b0 file:(GSFileData*)file;
//- (NSNumber*)read_fixed1616:(NSInteger)b0 file:(GSFileData*)file;
//- (NSNumber*)read_realNumber:(NSInteger)b0 file:(GSFileData*)file;

@end

double read_realNumber(uint8_t b0, NSData *file, NSUInteger *pos);
