Samond Classes Library 1.1.6-RELEASE build 132

SCConfigRecord Class Reference

Configuration record class. More...

#import <SCConfigRecord.h>

Inheritance diagram for SCConfigRecord:
SCServiceObject SCObject <SCDictionaryObjectProtocol> <SCCodingProtocol> <SCStreamProtocol> <SCCollectionProtocol>

List of all members.

Public Member Functions

Setting and Copying Configuration Records
(void) - setWithRecord:
(void) - setWithString:
Getting and Setting Configuration Record Properties
(NSString *) - key
(id) - value
(NSString *) - stringValue
(NSNumber *) - numberValue
(BOOL) - boolValue
(NSDate *) - dateValue
(SCConfig *) - configValue
(SCConfigRecordType- type
(SCStrings *) - comments
(NSString *) - description
(void) - setKey:
(void) - setValue:
(void) - setStringValue:
(void) - setNumberValue:
(void) - setBoolValue:
(void) - setDateValue:
(void) - setConfigValue:
(void) - setType:
(void) - setComments:
(BOOL) - isStringRecord
(BOOL) - isNumberRecord
(BOOL) - isBoolRecord
(BOOL) - isDateRecord
(BOOL) - isConfigRecord
(BOOL) - isEmpty
(BOOL) - isKeyEmpty
(BOOL) - isValueEmpty
Comparing Configuration Records
(BOOL) - isEqualToRecord:caseInsenstivie:
(BOOL) - isEqualToRecord:
(BOOL) - isEqual:
(BOOL) - isEqualToString:caseInsensitive:
(BOOL) - isEqualToString:
(BOOL) - isEqualToKey:caseInsensitive:
(BOOL) - isEqualToKey:
Record comments controls
(void) - addComment:
(void) - addComments:
(void) - setComment:
(void) - removeComment:
(void) - removeComments
(void) - replaceComment:withComment:
(BOOL) - haveComments

Static Public Member Functions

Getting record type names
(NSString *) + nameWithType:

Creating and Initializing Configuration Record

(SCConfigRecord *) + recordWithDataDictionary:
(SCConfigRecord *) + recordWithDataDictionaryFromFile:
(SCConfigRecord *) + recordWithCoder:
(SCConfigRecord *) + recordWithContentsOfSerializedFile:
(SCConfigRecord *) + recordWithStream:
(SCConfigRecord *) + recordWithFileStream:
(SCConfigRecord *) + recordWithKey:value:type:
(SCConfigRecord *) + recordWithKey:value:
(SCConfigRecord *) + recordWithRecord:
(SCConfigRecord *) + recordWithString:
(SCConfigRecord *) + record
(SCConfigRecord *) + recordWithKey:stringValue:
(SCConfigRecord *) + recordWithKey:numberValue:
(SCConfigRecord *) + recordWithKey:boolValue:
(SCConfigRecord *) + recordWithKey:dateValue:
(SCConfigRecord *) + recordWithKey:configValue:
(id) - initWithKey:value:type:
(id) - initWithKey:value:
(id) - initWithRecord:
(id) - initWithString:
(id) - init
(id) - initWithKey:stringValue:
(id) - initWithKey:numberValue:
(id) - initWithKey:boolValue:
(id) - initWithKey:dateValue:
(id) - initWithKey:configValue:

Detailed Description

Configuration record class.

Class implements the configuration record.
Class was introduced in version 1.2.0.

Class declares the following properties:


Member Function Documentation

- (void) addComment: (NSString *)  comment

Adds the specified string to the receiving configuration record comments.

Parameters:
comment- added comment string
- (void) addComments: (SCStrings *)  comments

Adds the strings from the specified list to the receiving configuration record comments.

Parameters:
comments- comments list
- (BOOL) boolValue

Returns the receiving configuration record boolean value.

Returns:
Record boolean value
Exceptions:
SCConfigException- incorrect record type detected
- (SCStrings *) comments

Returns the receiving configuration record comments.

Returns:
Record comments
- (SCConfig *) configValue

Returns the receiving configuration record config value.

Returns:
Record config value
Exceptions:
SCConfigException- incorrect record type detected
- (NSDate *) dateValue

Returns the receiving configuration record date value.

Returns:
Record date value
Exceptions:
SCConfigException- incorrect record type detected
- (NSString *) description

Returns the receiving config record description string.

Returns:
Description string
- (BOOL) haveComments

Returns a boolean which determines whether the receiving configuration record has at least one comment.

Returns:
YES if a record has at least one comment, otherwise NO
- (id) init

Initializes the configuration record without key and value.

Returns:
A newly initialized configuration record
- (id) initWithKey: (NSString *)  key
boolValue: (BOOL)  boolValue 

Initializes the configuration record using the specified key and boolean value.

Parameters:
key- record key
boolValue- record bool value
Returns:
A newly initialized configuration record
- (id) initWithKey: (NSString *)  key
configValue: (SCConfig *)  configValue 

Initializes the configuration record using the specified key and subconfiguration.

Parameters:
key- record key
configValue- record subconfiguration value
Returns:
A newly initialized configuration record
- (id) initWithKey: (NSString *)  key
dateValue: (NSDate *)  dateValue 

Initializes the configuration record using the specified key and date value.

Parameters:
key- record key
dateValue- record date value
Returns:
A newly initialized configuration record
- (id) initWithKey: (NSString *)  key
numberValue: (NSNumber *)  numberValue 

Initializes the configuration record using the specified key and number value.

Parameters:
key- record key
numberValue- record number value
Returns:
A newly initialized configuration record
- (id) initWithKey: (NSString *)  key
stringValue: (NSString *)  stringValue 

Initializes the configuration record using the specified key and string value.

Parameters:
key- record key
stringValue- record string value
Returns:
A newly initialized configuration record
- (id) initWithKey: (NSString *)  key
value: (id)  value 

Initializes the configuration record using the specified record key and value.

Parameters:
key- record key
value- record value
Returns:
A newly initialized configuration record
- (id) initWithKey: (NSString *)  key
value: (id)  value
type: (SCConfigRecordType type 

Initializes the configuration record using the specified record key, value and type.

Parameters:
key- record key
value- record value
type- record type
Returns:
A newly initialized configuration record
- (id) initWithRecord: (SCConfigRecord *)  record

Initializes the configuration record using the specified existing configuration record.

Parameters:
record- existing configuration record
Returns:
A newly initalized configuration record
- (id) initWithString: (NSString *)  string

Initializes the configuration record using the specified text string.

Parameters:
string- source text string
Returns:
A newly initialized configuration record
- (BOOL) isBoolRecord

Determines whether the receiving configuration record is boolean.

Returns:
YES if the record is boolean, otherwise NO
- (BOOL) isConfigRecord

Determines whether the receiving configuration record is configuration.

Returns:
YES if the record is configuration, otherwise NO
- (BOOL) isDateRecord

Determines whether the receiving configuration record is date.

Returns:
YES if the record is date, otherwise NO
- (BOOL) isEmpty

Determines whether the key and value of the receiving configuration record are both empty.

Returns:
YES if the record key and value are both empty, otherwise NO
- (BOOL) isEqual: (id)  object

Returns a boolean value that indicates whether a given object is equal to the receiving configuration record.

Parameters:
object- the object with which to compare the receiving record
Returns:
YES if the given object is equivalent to the receiving record, otherwise NO

Reimplemented from SCObject.

- (BOOL) isEqualToKey: (NSString *)  key

Returns a boolean value that indicates whether a given ket is equal to the receiving configuration record.

Parameters:
key- the key with which to compare the receiving record
Returns:
YES if the given key is equivalent to the receiving record, otherwise NO
- (BOOL) isEqualToKey: (NSString *)  key
caseInsensitive: (BOOL)  caseInsensitive 

Returns a boolean value that indicates whether a given ket is equal to the receiving configuration record with using case insensitive flag for comparison.

Parameters:
key- the key with which to compare the receiving record
caseInsensitive- YES for case insensitive comparison, NO for case sensitive comparison
Returns:
YES if the given key is equivalent to the receiving record, otherwise NO
- (BOOL) isEqualToRecord: (SCConfigRecord *)  record

Returns a boolean value that indicates whether a given configuration record is equal to the receiving configuration record.

Parameters:
record- the record with which to compare the receiving record
Returns:
YES if the given record is equivalent to the receiving record, otherwise NO
See also:
isEqualToRecord:caseInsensitive:
- (BOOL) isEqualToRecord: (SCConfigRecord *)  record
caseInsenstivie: (BOOL)  caseInsensitive 

Returns a boolean value that indicates whether a given configuration record is equal to the receiving configuration record with using case insensitive flag for keys comparison.

Parameters:
record- the record with which to compare the receiving record
caseInsensitive- YES for case insensitive comparison, NO for case sensitive comparison
Returns:
YES if the given record is equivalent to the receiving record, otherwise NO
See also:
- isEqualToRecord:
- (BOOL) isEqualToString: (NSString *)  string

Returns a boolean value that indicates whether a given configuration string is equal to the receiving configuration record.

Parameters:
string- the string with which to compare the receiving record
Returns:
YES if the given string is equivalent to the receiving record, otherwise NO
See also:
- isEqualToString:caseInsensitive:
- (BOOL) isEqualToString: (NSString *)  string
caseInsensitive: (BOOL)  caseInsensitive 

Returns a boolean value that indicates whether a given configuration string is equal to the receiving configuration record with using case insensitive flag for keys comparison.

Parameters:
string- the string with which to compare the receiving record
caseInsensitive- YES for case insensitive comparison, NO for case sensitive comparison
Returns:
YES if the given string is equivalent to the receiving record, otherwise NO
See also:
- isEqualToString:
- (BOOL) isKeyEmpty

Determines whether the receiving configuration record key is empty.

Returns:
YES if the record key is empty, otherwise NO
- (BOOL) isNumberRecord

Determines whether the receiving configuration record is number.

Returns:
YES if the record is number, otherwise NO
- (BOOL) isStringRecord

Determines whether the receiving configuration record is string.

Returns:
YES if the record is string, otherwise NO
- (BOOL) isValueEmpty

Determines whether the receiving configuration record value is empty.

Returns:
YES if the record value is empty, otherwise NO
- (NSString *) key

Returns the receiving configuration record key.

Returns:
Record key
+ (NSString *) nameWithType: (SCConfigRecordType type

Returns the name of the specified configuration record type.

Parameters:
type- configuration record type
Returns:
Name of the specified type
- (NSNumber *) numberValue

Returns the receiving configuration record number value.

Returns:
Record number value
Exceptions:
SCConfigException- incorrect record type detected
+ (SCConfigRecord *) record

Returns the configuration record created without key and value.

Returns:
A created configuration record
+ (SCConfigRecord *) recordWithCoder: (NSCoder *)  coder

Returns the configuration record created by using the specified coder.

Parameters:
coder- source coder
Returns:
A created configuration record
+ (SCConfigRecord *) recordWithContentsOfSerializedFile: (NSString *)  path

Returns the configuration record created by using the contents of serialized file with the specified path.

Parameters:
path- source serialized file path
Returns:
A created configuration record
+ (SCConfigRecord *) recordWithDataDictionary: (NSDictionary *)  dictionary

Returns the configuration record created by using the specified dictionary.

Parameters:
dictionary- source dictionary
Returns:
A created configuration record
+ (SCConfigRecord *) recordWithDataDictionaryFromFile: (NSString *)  path

Returns the configuration record created by using the dictionary from the specified file.

Parameters:
path- source dictionary file path
Returns:
A created configuration record
+ (SCConfigRecord *) recordWithFileStream: (NSString *)  path

Returns the configuration record created from the stream file with the specified path.

Parameters:
path- stream file path
Returns:
A created configuration record
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCConfigRecord *) recordWithKey: (NSString *)  key
boolValue: (BOOL)  boolValue 

Returns the configuration record created by using the specified text key and boolean value.

Parameters:
key- record key
boolValue- record boolean value
Returns:
A created configuration record
+ (SCConfigRecord *) recordWithKey: (NSString *)  key
configValue: (SCConfig *)  configValue 

Returns the configuration record created by using the specified text key and subconfiguration.

Parameters:
key- record key
configValue- record subconfiguration
Returns:
A created configuration record
+ (SCConfigRecord *) recordWithKey: (NSString *)  key
dateValue: (NSDate *)  dateValue 

Returns the configuration record created by using the specified text key and date value.

Parameters:
key- record key
dateValue- record date value
Returns:
A created configuration record
+ (SCConfigRecord *) recordWithKey: (NSString *)  key
numberValue: (NSNumber *)  numberValue 

Returns the configuration record created by using the specified text key and number value.

Parameters:
key- record key
numberValue- record number value
Returns:
A created configuration record
+ (SCConfigRecord *) recordWithKey: (NSString *)  key
stringValue: (NSString *)  stringValue 

Returns the configuration record created by using the specified text key and string value.

Parameters:
key- record key
stringValue- record string value
Returns:
A created configuration record
+ (SCConfigRecord *) recordWithKey: (NSString *)  key
value: (id)  value 

Returns the configuration record created by using the specified record key and value.

Parameters:
key- record key
value- record value
Returns:
A created configuration record
+ (SCConfigRecord *) recordWithKey: (NSString *)  key
value: (id)  value
type: (SCConfigRecordType type 

Returns the configuration record created by using the specified record key, value and type.

Parameters:
key- record key
value- record value
type- record type
Returns:
A created configuration record
+ (SCConfigRecord *) recordWithRecord: (SCConfigRecord *)  record

Returns the configuration record created by using the specified existing configration record.

Parameters:
record- existing configuration record
Returns:
A created configuration record
+ (SCConfigRecord *) recordWithStream: (SCStream *)  stream

Returns the configuration record created from the specified stream.

Parameters:
stream- stream for reading configuration record
Returns:
A created configuration record
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCConfigRecord *) recordWithString: (NSString *)  string

Returns the configuration record created by using the specified text string.

Parameters:
string- source text string
Returns:
A created configuration record
- (void) removeComment: (NSString *)  comment

Removes from the receiving configuration record comments the specified comment.

Parameters:
comment- removed comment
- (void) removeComments

Removes all configuration record comments.

- (void) replaceComment: (NSString *)  comment
withComment: (NSString *)  newComment 

Replaces the specified receiving configuration record comment with a given string.

Parameters:
comment- comment to be replaced
newComment- comment with which to replace the existing comment
- (void) setBoolValue: (BOOL)  boolValue

Sets the configuration record boolean value.

Parameters:
boolValue- record boolean value
- (void) setComment: (NSString *)  comment

Replaces the receiving configuration record comments with the specified string.

Parameters:
comment- comment string
- (void) setComments: (SCStrings *)  comments

Sets the configuration record comments.

Parameters:
comments- record comments
- (void) setConfigValue: (SCConfig *)  configValue

Sets the configuration record config value.

Parameters:
configValue- record config value
- (void) setDateValue: (NSDate *)  dateValue

Sets the configuration record date value.

Parameters:
dateValue- record date value
- (void) setKey: (NSString *)  key

Sets the configuration record key.

Parameters:
key- record key
- (void) setNumberValue: (NSNumber *)  numberValue

Sets the configuration record number value.

Parameters:
numberValue- record number value
- (void) setStringValue: (NSString *)  stringValue

Sets the configuration record string value.

Parameters:
stringValue- record string value
- (void) setType: (SCConfigRecordType type

Sets the configuration record type.

Parameters:
type- record type
- (void) setValue: (id)  value

Sets the configuration record value.

Parameters:
value- record value
- (void) setWithRecord: (SCConfigRecord *)  record

Sets the content of receiving configuration record as a copy of the content from the specified configuration record.

Parameters:
record- source configuration record
- (void) setWithString: (NSString *)  string

Sets the content of receiving configuration record as a copy of the content from the specified configuration string.

Parameters:
string- source configuration string
- (NSString *) stringValue

Returns the receiving configuration record string value.

Returns:
Record string value
Exceptions:
SCConfigException- incorrect record type detected

Returns the receiving configuration record type.

Returns:
Record type
- (id) value

Returns the receiving configuration record value.

Returns:
Record value

The documentation for this class was generated from the following files:
 All Classes Files Functions Typedefs Enumerations Enumerator Defines