GlobalWebController.m 740 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
//
//  GlobalWebController.m
//  PLUCdraft
//
//  Created by PLUC SeniorDesign on 3/18/15.
//  Copyright (c) 2015 Alexander W. Moore. All rights reserved.
//

#import "GlobalWebController.h"

@implementation GlobalWebController
@synthesize web;
@synthesize isInitialized;

static GlobalWebController *instance = nil;

17
+ (GlobalWebController*)getInstance
18 19 20 21 22 23 24 25 26 27
{
    @synchronized(self)
    {
        if (instance==nil) {
            instance = [GlobalWebController new];
            instance.isInitialized = false;
        }
    }
    return instance;
}
28
+ (GlobalWebController*)resetInstance
Alex Moore's avatar
Alex Moore committed
29 30 31 32 33 34 35 36
{
    @synchronized(self)
    {
        instance = [GlobalWebController new];
        instance.isInitialized = false;
    }
    return instance;
}
37 38 39


@end