|
Samond Classes Library 1.1.6-RELEASE build 132
|
Config files support class. More...
#import <SCConfigFile.h>
Config files support class.
Class implements the functions for using the text configuration files.
Class was introduced in version 1.2.0.
Class declares the following properties:
| - (void) addAllowedComment: | (NSString *) | comment |
Adds the specified string to the allowed comments list.
| comment | - added comment string |
| - (void) addComment: | (NSString *) | comment |
Adds the specified string to the configuration file comments list.
| comment | - added string |
| SCConfigException | - configuration file error detected |
| - (void) addComment: | (NSString *) | comment | |
| forKey: | (NSString *) | key | |
Adds the specified string to the comments list of a given configuration key.
| comment | - added string |
| key | - key for which adding comment |
| SCConfigException | - configuration file error detected |
| - (void) addComments: | (SCStrings *) | comments |
Adds the strings from a given strings list into the receiving configuration file comments.
| comments | - strings list with the added comments |
| SCConfigException | - configuration file error detected |
| - (void) addComments: | (SCStrings *) | comments | |
| forKey: | (NSString *) | key | |
Adds strings from the specified list into the comments for a given key.
| comments | - list with the added comment strings |
| key | - configuration key for which to adding comments |
| SCConfigException | - configuration file error detected |
| - (void) addValuesFromConfigFile: | (SCConfigFile *) | configFile |
Adds into the receiving configuration file values from the specified configuration file.
| configFile | - existing source configuration file |
| SCConfigException | - configurstion file error detected |
| - (void) addValuesFromConfigFileWithPath: | (NSString *) | path |
Adds into the receiving configuration file values from the file with the specified path.
| path | - source file path |
| SCConfigException | - configuration file error detected |
| SCStreamException | - stream operation error detected |
| SCSystemException | - system error detected |
| - (void) addValuesFromStream: | (SCStream *) | stream |
Adds into the receiving configuration file values from the specified stream.
| stream | - input stream |
| SCConfigException | - configuration file error detected |
| SCStreamException | - stream operation error detected |
| SCSystemException | - system error detected |
| - (SCArray *) allowedComments |
Returns the allowed comments list.
| - (void) appendConfigFileToPath: | (NSString *) | path |
Appends the receiving configuration file content into the file with the specified path.
| path | - output file path |
| SCConfigException | - configuration file error detected |
| SCStreamException | - stream operation error detected |
| SCSystemException | - system error detected |
!!
| - (void) appendConfigFileToStream: | (SCStream *) | stream |
Appends the receiving configuration file content into the specified stream.
| stream | - destination output stream |
| SCConfigException | - configuration file error detected |
| SCStreamException | - stream operation error detected |
| SCSystemException | - system error detected |
| - (void) appendConfigFileToText: | (SCStrings *) | text |
Appends the receiving configuration file content into the specified strings list.
| text | - destination strings list |
| SCConfigException | - configuration file error detected |
| SCTextException | - strings list error detected |
| - (NSString *) commentPrefix |
Returns a string with the comment prefix.
| - (SCStrings *) comments |
Returns the receiving configuration file comments.
| - (SCStrings *) commentsForKey: | (NSString *) | key |
Returns a comments for the specified configuration key.
| key | - configuration key for which to return the comments |
| SCConfigException | - configuration file error detected |
| - (SCConfig *) config |
Returns a configuration with the copy of all receiving configuration file keys and settings.
Reimplemented from SCConfig.
| + (SCConfigFile *) configFile |
Returns the configuration file created by using the default properties.
| + (SCConfigFile *) configFileWithCoder: | (NSCoder *) | coder |
Returns the configuration file created by using the specified coder.
| coder | - source coder |
| + (SCConfigFile *) configFileWithConfig: | (SCConfig *) | config |
Returns the configuration file created by using the specified existing configuration.
| config | - existing source configuration |
| SCConfigException | - configuration error detected |
| + (SCConfigFile *) configFileWithConfigFile: | (SCConfigFile *) | configFile |
Returns the configuration file created by using the specified existing configuration file.
| configFile | - existing source configuration file |
| SCConfigException | - configuration error detected |
| + (SCConfigFile *) configFileWithContentsOfSerializedFile: | (NSString *) | path |
Returns the configuration file created by using the contents of serialized file with the specified path.
| path | - source serialized file path |
| + (SCConfigFile *) configFileWithDataDictionary: | (NSDictionary *) | dictionary |
Returns the configuration file created by using the specified dictionary.
| dictionary | - source dictionary |
| + (SCConfigFile *) configFileWithDataDictionaryFromFile: | (NSString *) | path |
Returns the configuration file created by using the dictionary from the specified file.
| path | - source dictionary file path |
| + (SCConfigFile *) configFileWithFileStream: | (NSString *) | path |
Returns the configuration file created from the stream file with the specified path.
| path | - stream file path |
| SCStreamException | - stream operation error detected |
| SCSystemException | - system error detected |
| + (SCConfigFile *) configFileWithStream: | (SCStream *) | stream |
Returns the configuration file created from the specified stream.
| stream | - stream for reading configuration file |
| SCStreamException | - stream operation error detected |
| SCSystemException | - system error detected |
| - (NSString *) description |
Returns a string which represents the configuration file information.
Reimplemented from SCConfig.
| - (BOOL) haveComments |
Returns a boolean which determines whether the receiving configuration file has at least one comment.
| - (BOOL) haveCommentsForKey: | (NSString *) | key |
Returns a boolean which determines whether the receiving configuration file has at least one comment for the record with the specified key.
| key | - required configuration record key |
| - (id) initWithConfigFile: | (SCConfigFile *) | configFile |
Initializes the configuration file using the specified existing configuration file.
| configFile | - existing source configuration file |
| SCConfigException | - configuration file error detected |
| - (BOOL) isComment: | (NSString *) | string |
Returns a boolean value that determines whether the specified string is a comment line.
| string | - checked string |
| - (BOOL) isLoaded |
Returns a boolean that determines whether the configuration file is loaded.
| - (NSString *) path |
Returns the receiving configuration file path.
| - (void) read |
Reads the content of the default configuration file.
| SCConfigException | - configuration file error detected |
| SCStreamException | - stream operation error detected |
| SCSystemException | - system error detected |
| - (void) readConfigFileFromStream: | (SCStream *) | stream |
Reads the content of the specified stream into the receiving configuration file.
| stream | - input stream |
| SCConfigException | - configuration file error detected |
| SCStreamException | - stream operation error detected |
| SCSystemException | - system error detected |
| - (void) readConfigFileFromText: | (SCStrings *) | text |
Reads the content of the specified strings list into the receiving configuration file.
| text | - source strings list |
| SCConfigException | - configuration file error detected |
| - (void) readConfigFileWithPath: | (NSString *) | path |
Reads the content of the file with the specified path into the receiving configuration file.
| path | - source file path |
| SCConfigException | - configuration file error detected |
| SCStreamException | - stream operation error detected |
| SCSystemException | - system error detected |
| - (void) reload |
Discards all changes in the configuration file and reads content from the default file.
| SCConfigException | - configuration file error detected |
| SCStreamException | - stream operation error detected |
| SCSystemException | - system error detected |
| - (void) removeAllowedComment: | (NSString *) | comment |
Removes the specified string from the allowed comments list.
| comment | - removed comment string |
| - (void) removeAllowedComments |
Removes all records from the allowed comments list.
| - (void) removeComment: | (NSString *) | comment |
Removes from the receiving configuration file comments the specified string.
| comment | - removed comment string |
| SCConfigException | - configuration file error detected |
| - (void) removeComment: | (NSString *) | comment | |
| forKey: | (NSString *) | key | |
Removes a given string from the comments of the specified key.
| comment | - removed comment string |
| key | - key for which to be removed comment string |
| SCConfigException | - configuration file error detected |
| - (void) removeComments |
Removes all comments from the receiving configuration file.
| SCConfigException | - configuration file error detected |
| - (void) removeCommentsForKey: | (NSString *) | key |
Removes comments for the specified configuration key.
| key | - key for which to be removed comments |
| SCConfigException | - configuration file error detected |
| - (void) replaceComment: | (NSString *) | comment | |
| withComment: | (NSString *) | newComment | |
Replaces the specified comment with a given comment.
| comment | - replaced existing comment |
| newComment | - new comment string |
| SCConfigException | - configuration file error detected |
| - (void) replaceComment: | (NSString *) | comment | |
| withComment: | (NSString *) | newComment | |
| forKey: | (NSString *) | key | |
Replaces the specified comment string for a given configuration key by using the specified new comment string.
| comment | - string to be replaced |
| newComment | - new comment string |
| key | - configuration key for which to be replaced comment string |
| SCConfigException | - configuration file error detected |
| - (void) resetConfigurationFile |
Remove all configuration file records, clears the configuration service lists and sets the properties to the default values (excluding delegate object).
| SCConfigException | - configuration error detected |
| - (void) setComment: | (NSString *) | comment |
Replaces the receiving configuration file comments by using the specified comment string.
| comment | - new comment string |
| SCConfigException | - configuration file error detected |
| - (void) setComment: | (NSString *) | comment | |
| forKey: | (NSString *) | key | |
Sets the specified string as a comment for a given configuration key.
| comment | - string to be replace the existing configuration key comments |
| key | - configuration key for which to be replaced comments |
| SCConfigException | - configuration file error detected |
| - (void) setCommentPrefix: | (NSString *) | commentPrefix |
Sets the specified string as a comments prefix.
| commentPrefix | - comment prefix |
| - (void) setComments: | (SCStrings *) | comments |
Sets the receiving configuration file comments.
| comments | - list with the comment strings |
| - (void) setComments: | (SCStrings *) | comments | |
| forKey: | (NSString *) | key | |
Adds the specified text as a comments of a given configuration key.
| comments | - configuration record comments |
| key | - key for which setting comments |
| SCConfigException | - configuration file error detected |
| - (void) setConfigFile: | (SCConfigFile *) | configFile |
Erases the receiving configuration file and copies all values and settings from the specified existing configuration file.
| configFile | - existing source configuration file |
| SCConfigException | - configuration file error detected |
| - (void) setConfigFileWithPath: | (NSString *) | path |
Erases the receiving configuration file and copies all values from the file with the specified path.
| path | - source file path |
| SCConfigException | - configuration file error detected |
| SCStreamException | - stream operation error detected |
| SCSystemException | - system error detected |
| - (void) setConfigFileWithStream: | (SCStream *) | stream |
Erases the receiving configuration file and copies all values from the specified stream.
| stream | - input stream |
| SCConfigException | - configuration file error detected |
| SCStreamException | - stream operation error detected |
| SCSystemException | - system error detected |
| - (void) setConfigFileWithText: | (SCStrings *) | text |
Erases the receiving configuration file and copies all values from the specified existing strings list.
| text | - existing source configuration text |
| SCConfigException | - configuration file error detected |
| - (void) setLoaded: | (BOOL) | loaded | [implementation] |
Sets the configuration loaded flag.
| loaded | - YES if the configuration is loaded, otherwise NO |
| - (void) setPath: | (NSString *) | path |
Sets the receiving configuration file path.
| path | - configuration file path |
| - (void) writeConfigFileToStream: | (SCStream *) | stream |
Writes the receiving configuration file content into the specified output stream.
| stream | - destination output stream |
| SCConfigException | - configuration file error detected |
| SCStreamException | - stream operation error detected |
| SCSystemException | - system error detected |
| - (void) writeConfigFileToText: | (SCStrings *) | text |
Writes the receiving configuration file content into the specified strings list.
| text | - destination strings list |
| SCConfigException | - configuration file error detected |
| SCTextException | - strings list error detected |
| - (void) writeConfigFileWithPath: | (NSString *) | path |
Writes the receiving config file content into the file with the specified path.
| path | - output file path |
| SCConfigException | - configuration file error detected |
| SCStreamException | - stream operation error detected |
| SCSystemException | - system error detected |
1.7.3