Wired Foundation  2.0
A foundation framework for the Wired implementation on Mac OS X
WISettings.h
00001 /* $Id$ */
00002 
00003 /*
00004  *  Copyright (c) 2003-2009 Axel Andersson
00005  *  All rights reserved.
00006  *
00007  *  Redistribution and use in source and binary forms, with or without
00008  *  modification, are permitted provided that the following conditions
00009  *  are met:
00010  *  1. Redistributions of source code must retain the above copyright
00011  *     notice, this list of conditions and the following disclaimer.
00012  *  2. Redistributions in binary form must reproduce the above copyright
00013  *     notice, this list of conditions and the following disclaimer in the
00014  *     documentation and/or other materials provided with the distribution.
00015  *
00016  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
00017  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00018  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00019  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
00020  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00021  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00022  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00023  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00024  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00025  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00026  * POSSIBILITY OF SUCH DAMAGE.
00027  */
00028 
00029 @interface WISettings : WIObject {
00030         NSString                                                *_identifier;
00031         id                                                              _defaults;
00032         NSDictionary                                    *_defaultValues;
00033 }
00034 
00035 + (id)settings;
00036 + (id)settingsWithIdentifier:(NSString *)identifier;
00037 
00038 - (NSDictionary *)defaults;
00039 
00040 - (BOOL)synchronize;
00041 
00042 - (void)setObject:(id)object forKey:(id)key;
00043 - (id)objectForKey:(id)key;
00044 - (void)removeObjectForKey:(id)key;
00045 - (void)setString:(NSString *)string forKey:(id)key;
00046 - (NSString *)stringForKey:(id)key;
00047 - (void)setBool:(BOOL)value forKey:(id)key;
00048 - (BOOL)boolForKey:(id)key;
00049 - (void)setInt:(int)value forKey:(id)key;
00050 - (int)intForKey:(id)key;
00051 - (void)setInteger:(NSInteger)value forKey:(id)key;
00052 - (NSInteger)integerForKey:(id)key;
00053 - (void)setFloat:(float)value forKey:(id)key;
00054 - (float)floatForKey:(id)key;
00055 - (void)setDouble:(double)value forKey:(id)key;
00056 - (double)doubleForKey:(id)key;
00057 
00058 - (void)addObject:(id)object toArrayForKey:(id)arrayKey;
00059 - (void)replaceObjectAtIndex:(NSUInteger)index withObject:(id)object inArrayForKey:(id)arrayKey;
00060 - (void)removeObjectAtIndex:(NSUInteger)index fromArrayForKey:(id)arrayKey;
00061 
00062 - (void)setObject:(id)object forKey:(id)key inDictionaryForKey:(id)dictionaryKey;
00063 - (void)removeObjectForKey:(id)key inDictionaryForKey:(id)dictionaryKey;
00064 
00065 @end
 All Classes