//
//  EXPSwitchElement.m
//  XMLTest
//
//  Created by Ashley on 26/05/2007.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import "EXPSwitchElement.h"
//#import "EXPAssemblerConstants.h"

@implementation EXPSwitchElement

+ (int) storageSize
{
	return sizeof(double)/sizeof(unsigned short int);
}

- (id) init
{
	self = [super init];
	return self;
}

- (NSString *)elementType
{
	return @"switch";
}

/*- (void) addInitialiser:(id)initialiser
{
	[self addStatement:initialiser];
} */

/*- (BOOL) compile:(EXPVirtualMachine *)machine switchAddress:(NSMutableArray *)switchAddresses andMapAddresses:(NSMutableArray *)mapAddresses 
		 error:(EXPError *)error
{
/*	int switchAddress = [machine pc];
	NSNumber *switchAddressNumber = [[NSNumber alloc] initWithInt:switchAddress];
	[switchAddresses addObject:switchAddressNumber];
	[switchAddressNumber release];
	
	BOOL success;
	success = [super compile:machine error:error withArguments:nil];
	[machine putUInt:HLT];

	int mapAddress = [machine pc];
	NSNumber *mapAddressNumber = [[NSNumber alloc] initWithInt:mapAddress];
	[mapAddresses addObject:mapAddressNumber];
	[mapAddressNumber release];
	
	NSArray *statements = [self statements];
	int i;
	for (i=0; i<[statements count]; i++) {
		NSMutableDictionary *dict = [statements objectAtIndex:i];
		EXPExpression *exp = [dict objectForKey:@"exp"];
		success = [exp compile:machine error:error];
		
		EXPElement *element = [dict objectForKey:@"element"];
		unsigned int address = [element address];
		[machine putUInt:STA];
		[machine putUInt:address];
		
	}
	
	[machine putUInt:HLT]; */
	
/*- (void) clear
{
	[self setStatements:nil];
	[super clear];
} */

- (void) dealloc
{
//	[_statements release];
	[super dealloc];
}

@end