Samond Classes Library 1.1.6-RELEASE build 132

SCSubnetMask Class Reference

IPv4 subnet mask representation class. More...

#import <SCSubnetMask.h>

Inheritance diagram for SCSubnetMask:
SCNetObject SCObject <SCDictionaryObjectProtocol> <SCCodingProtocol> <SCStreamProtocol> <SCCollectionProtocol>

List of all members.

Public Member Functions

Initializing Subnet mask
(id) - init
(id) - initWithString:
(id) - initWithPrefixLength:
(id) - initWithPrefix:
(id) - initWithWildcard:
(id) - initWithCount:
(id) - initWithMask:
(id) - initWithClassA
(id) - initWithClassB
(id) - initWithClassC
(id) - initWithGlobal
(id) - initWithHost
(id) - initWithSerialLink
Changing Subnet Mask
(void) - setMask:
(void) - setLength:
(void) - setPrefix:
(void) - setWildcard:
(void) - setCount:
(void) - copyMask:
Querying Subnet Mask
(SCUInteger- raw
(NSString *) - mask
(NSString *) - description
(SCUByte- length
(NSString *) - prefix
(NSString *) - wildcard
(SCUInteger- hostsCount
Checking Subnet Mask
(BOOL) - isHostMask
(BOOL) - isGlobalMask
(BOOL) - isRegularMask
(BOOL) - isSerialLink
(BOOL) - isClassA
(BOOL) - isClassB
(BOOL) - isClassC
(BOOL) - isClassfull
Comparing Subnet Masks
(BOOL) - isEqual:
(BOOL) - isEqualToMask:
(BOOL) - isEqualToString:
(BOOL) - isEqualToLength:
(BOOL) - isEqualToPrefix:
(BOOL) - isEqualToWildcard:

Static Public Member Functions

Creating Subnet Mask
(SCSubnetMask *) + emptyMask
(SCSubnetMask *) + maskWithString:
(SCSubnetMask *) + maskWithPrefixLength:
(SCSubnetMask *) + maskWithPrefix:
(SCSubnetMask *) + maskWithWildcard:
(SCSubnetMask *) + maskWithCount:
(SCSubnetMask *) + maskWithMask:
(SCSubnetMask *) + maskWithClassA
(SCSubnetMask *) + maskWithClassB
(SCSubnetMask *) + maskWithClassC
(SCSubnetMask *) + maskWithGlobal
(SCSubnetMask *) + maskWithHost
(SCSubnetMask *) + maskWithSerialLink
(SCSubnetMask *) + maskWithDataDictionary:
(SCSubnetMask *) + maskWithDataDictionaryFromFile:
(SCSubnetMask *) + maskWithCoder:
(SCSubnetMask *) + maskWithContentsOfSerializedFile:
(SCSubnetMask *) + maskWithStream:
(SCSubnetMask *) + maskWithFileStream:
Querying a Hosts Count
(SCUInteger+ hostsClassA
(SCUInteger+ hostsClassB
(SCUInteger+ hostsClassC
(SCUInteger+ hostsSerialLink

Detailed Description

IPv4 subnet mask representation class.

Class SCSubnetMask represents IPv4 subnet mask.
This class was introduced in version 1.0.4.

Class declares the following properties:


Member Function Documentation

- (void) copyMask: (SCSubnetMask *)  mask

Sets subnet mask using the specified existing subnet mask instance.

Parameters:
mask- source subnet mask instance
Exceptions:
SCNetException- incorrect source subnte mask instance detected
- (NSString *) description

Returns subnet mask instance description.

Returns:
Instance description
+ (SCSubnetMask *) emptyMask

Returns an empty subnet mask.

Returns:
Created subnet mask
+ (SCUInteger) hostsClassA

Returns a class A network hosts count.

Returns:
Hosts count
+ (SCUInteger) hostsClassB

Returns a class B network hosts count.

Returns:
Hosts count
+ (SCUInteger) hostsClassC

Returns a class C network hosts count.

Returns:
Hosts count
- (SCUInteger) hostsCount

Returns hosts count for subnet with mask.

Returns:
Hosts count
+ (SCUInteger) hostsSerialLink

Returns a serial link subnet hosts count.

Returns:
Hosts count
- (id) init

Initializes the empty subnet mask.

Returns:
A newly initialized subnet mask
- (id) initWithClassA

Initializes the class A default subnet mask.

Returns:
A newly initalized subnet mask
- (id) initWithClassB

Initializes the class B default subnet mask.

Returns:
A newly initialized subnet mask
- (id) initWithClassC

Initializes the class C default subnet mask.

Returns:
A newly initialized subnet mask
- (id) initWithCount: (SCUInteger count

Inititializes the subnet mask using the specified hosts count.

Parameters:
count- required hosts count
Returns:
A newly initialized subnet mask
Exceptions:
SCNetException- incorrect hosts count detected
- (id) initWithGlobal

Initializes the global Internet subnet mask (all IPv4 addresses subnet).

Returns:
A newly initialized subnet mask
- (id) initWithHost

Initializes the host subnet mask (255.255.255.255).

Returns:
A newly initialized subnet mask
- (id) initWithMask: (SCSubnetMask *)  mask

Initializes the subnet mask as copy of existing subnet mask instance.

Parameters:
mask- source subnet mask instance
Returns:
A newly initialized subnet mask
Exceptions:
SCNetException- incorrect source subnet mask instance detected
- (id) initWithPrefix: (NSString *)  prefix

Initializes the subnet mask using the specified prefix.

Parameters:
prefix- prefix string
Returns:
A newly initialized subnet mask
Exceptions:
SCNetException- incorrect prefix string detected
- (id) initWithPrefixLength: (SCUByte length

Initializes the subnet mask using the specified prefix length.

Parameters:
length- prefix length
Returns:
A newly initialized sybnet mask
Exceptions:
SCNetException- incorrect prefix length detected
- (id) initWithSerialLink

Initializes the serial link subnet mask.

Returns:
A newly initialized subnet mask
- (id) initWithString: (NSString *)  mask

Initializes the subnet mask using the specified mask string.

Parameters:
mask- mask string
Returns:
A newly initialized subnet mask
Exceptions:
SCNetException- incorrect mask string detected
- (id) initWithWildcard: (NSString *)  wildcard

Initializes the subnet mask using the specified wildcard mask string.

Parameters:
wildcard- wildcard mask string
Returns:
A newly initialized subnet mask
Exceptions:
SCNetException- incorrect wildcard mask string detected
- (BOOL) isClassA

Returns a Boolean value that indicates the mask is equal to Class A default subnet mask.

Returns:
YES if mask is equal to Class A default subnet mask, otherwise NO
- (BOOL) isClassB

Returns a Boolean value that indicates the mask is equal to Class B default subnet mask.

Returns:
YES if mask is equal to Class B default subnet mask, otherwise NO
- (BOOL) isClassC

Returns a Boolean value that indicates the mask is equal to Class C default subnet mask.

Returns:
YES if mask is equal to Class C default subnet mask, otherwise NO
- (BOOL) isClassfull

Returns a Boolean value that indicates the mask is classfull.

Returns:
YES if mask is classfull, otherwise NO
- (BOOL) isEqual: (id)  mask

Returns a Boolean value that indicates the mask is equal to other instance.

Parameters:
mask- the instance witch to compare the receiver
Returns:
YES if mask is equal to other instance, otherwise NO

Reimplemented from SCObject.

- (BOOL) isEqualToLength: (SCUByte length

Returns a Boolean value that indicates the mask is equal to subnet prefix length.

Parameters:
length- subnet prefix length
Returns:
YES if mask is equal to the subnet with specified prefix length, otherwise NO
Exceptions:
SCNetException- incorrect subnet prefix length detected
- (BOOL) isEqualToMask: (SCSubnetMask *)  mask

Returns a Boolean value that indicates the mask is equal to other mask.

Parameters:
mask- the mask witch to compare the receiver
Returns:
YES if mask is equal to other mask, otherwise NO
Exceptions:
SCNetException- incorrect subnet mask detected
- (BOOL) isEqualToPrefix: (NSString *)  prefix

Returns a Boolean value that indicates the mask is equal to subnet with the specified prefix.

Parameters:
prefix- string with subnet prefix
Returns:
YES if mask is equal to the subnet with specified prefix, otherwise NO
Exceptions:
SCNetException- incorrect subnet prefix detected
- (BOOL) isEqualToString: (NSString *)  mask

Returns a Boolean value that indicates the mask is equal to text representation of other mask.

Parameters:
mask- the string with text representation of the mask
Returns:
YES if mask is equal to the text representation, otherwise NO
Exceptions:
SCNetException- incorrect subnet mask string detected
- (BOOL) isEqualToWildcard: (NSString *)  wildcard

Returns a Boolean value that indicates the mask is equal to wildcard mask.

Parameters:
wildcard- string with the wildcard mask
Returns:
YES if mask is equal to the wildcard mask, otherwise NO
Exceptions:
SCNetException- incorrect wildcard mask string detected
- (BOOL) isGlobalMask

Returns a Boolean value that indicates the mask is equal to global Internet subnet mask.

Returns:
YES if mask is equal to global Internet subnet mask, otherwise NO
- (BOOL) isHostMask

Returns a Boolean value that indicates the mask is equal to host subnet mask.

Returns:
YES if mask is equal to host subnet mask, otherwise NO
- (BOOL) isRegularMask

Returns a Boolean value that indicates the mask is equal to reqular subnet mask.

Returns:
YES if mask is equal to reqular subnet mask, otherwise NO
- (BOOL) isSerialLink

Returns a Boolean value that indicates the mask is equal to serial link subnet mask.

Returns:
YES if mask is equal to serial link subnet mask, otherwise NO
- (SCUByte) length

Returns subnet mask length.

Returns:
Subnet mask length
- (NSString *) mask

Returns subnet mask text representation.

Returns:
Subnet mask text representation
+ (SCSubnetMask *) maskWithClassA

Returns a class A default subnet mask.

Returns:
Created subnet mask
+ (SCSubnetMask *) maskWithClassB

Returns a class B default subnet mask.

Returns:
Created subnet mask
+ (SCSubnetMask *) maskWithClassC

Returns a class C default subnet mask.

Returns:
Created subnet mask
+ (SCSubnetMask *) maskWithCoder: (NSCoder *)  coder

Returns a subnet mask from the specified coder.

Parameters:
coder- source coder
Returns:
Created subnet mask
+ (SCSubnetMask *) maskWithContentsOfSerializedFile: (NSString *)  path

Returns a subnet mask from the serialized file with the specified path.

Parameters:
path- serialized file path
Returns:
Created subnet mask
+ (SCSubnetMask *) maskWithCount: (SCUInteger count

Returns a subnet mask created by using the specified hosts count.

Parameters:
count- required hosts count
Returns:
Created subnet mask
Exceptions:
SCNetException- incorrect hosts count detected
+ (SCSubnetMask *) maskWithDataDictionary: (NSDictionary *)  dictionary

Returns a subnet mask from the specified dictionary.

Parameters:
dictionary- source dictionary
Returns:
Created subnet mask
+ (SCSubnetMask *) maskWithDataDictionaryFromFile: (NSString *)  path

Returns a subnet mask from the dictionary file with the specified path.

Parameters:
path- source dictionary file path
Returns:
Created subnet mask
+ (SCSubnetMask *) maskWithFileStream: (NSString *)  path

Returns a subnet mask from the file stream with the specified path.

Parameters:
path- file stream path
Returns:
Created subnet mask
Exceptions:
SCStreamException- stream operation error detected
+ (SCSubnetMask *) maskWithGlobal

Returns a global internet subnet mask (0.0.0.0).

Returns:
Created subnet mask
+ (SCSubnetMask *) maskWithHost

Returns a host subnet mask (255.255.255.255).

Returns:
Created subnet mask
+ (SCSubnetMask *) maskWithMask: (SCSubnetMask *)  mask

Returns a subnet mask created by using the existing subnet mask instance.

Parameters:
mask- existing subnet mask instance
Returns:
Created subnet mask
Exceptions:
SCNetException- incorrect existing subnet mask instance detected
+ (SCSubnetMask *) maskWithPrefix: (NSString *)  prefix

Returns a subnet mask created by using the specified subnet prefix.

Parameters:
prefix- subnet prefix string
Returns:
Created subnet mask
Exceptions:
SCNetException- incorrect subnet prefix string detected
+ (SCSubnetMask *) maskWithPrefixLength: (SCUByte length

Returns a subnet mask created by using the specified subnet prefix length.

Parameters:
length- subnet prefix length
Returns:
Created subnet mask
Exceptions:
SCNetException- incorrect subnet prefix length detected
+ (SCSubnetMask *) maskWithSerialLink

Returns a serial link subnet mask.

Returns:
Created subnet mask
+ (SCSubnetMask *) maskWithStream: (SCStream *)  stream

Returns a subnet mask from the specified stream.

Parameters:
stream- input stream for reading
Returns:
Created subnet mask
Exceptions:
SCStreamException- stream operation error detected
SCSystemException- system error detected
+ (SCSubnetMask *) maskWithString: (NSString *)  mask

Returns a subnet mask created by using the specified subnet mask string.

Parameters:
mask- subnet mask string
Returns:
Created subnet mask
Exceptions:
SCNetException- incorrect subnet mask string detected
+ (SCSubnetMask *) maskWithWildcard: (NSString *)  wildcard

Returns a subnet mask created by using the specified wildcard mask.

Parameters:
wildcard- wildcard mask string
Returns:
Created subnet mask
Exceptions:
SCNetException- incorrect wildcard mask string detected
- (NSString *) prefix

Returns subnet prefix.

Returns:
Subnet prefix
- (SCUInteger) raw

Returns subnet mask binary representation.

Returns:
Subnet mask binary representation
- (void) setCount: (SCUInteger count

Sets subnet mask using the specified hosts count.

Parameters:
count- required hosts count
Exceptions:
SCNetException- incorrect hosts count detected
- (void) setLength: (SCUByte length

Sets subnet mask using the specified prefix length.

Parameters:
length- prefix length
Exceptions:
SCNetException- incorrect prefix length detected
- (void) setMask: (NSString *)  mask

Sets subnet mask using the specified subnet mask string.

Parameters:
mask- subnet mask string
Exceptions:
SCNetException- incorrect subnet mask string detected
- (void) setPrefix: (NSString *)  prefix

Sets subnet mask using the specified subnet prefix.

Parameters:
prefix- subnet prefix string
Exceptions:
SCNetException- incorrect subnet prefix string detected
- (void) setWildcard: (NSString *)  wildcard

Sets subnet mask using the specified wildcard mask.

Parameters:
wildcard- wildcard mask string
Exceptions:
SCNetException- incorrect wildcard mask string detected
- (NSString *) wildcard

Returns wildcard mask.

Returns:
wildcard mask

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