API  0.9.7
 All Classes Files Functions Variables Macros Groups Pages
CPByteCountFormatter Class Reference

#import <CPByteCountFormatter.h>

+ Inheritance diagram for CPByteCountFormatter:

Instance Methods

(void) - encodeWithCoder:
 
(id) - init
 
(id) - initWithCoder:
 
Setting Formatting Styles
(int) - countStyle
 
(void) - setCountStyle:
 
(BOOL) - allowsNonnumericFormatting
 
(void) - setAllowsNonnumericFormatting:
 
(BOOL) - includesActualByteCount
 
(void) - setIncludesActualByteCount:
 
(BOOL) - isAdaptive
 
(void) - setAdaptive:
 
(int) - allowedUnits
 
(void) - setAllowedUnits:
 
(BOOL) - includesCount
 
(void) - setIncludesCount:
 
(BOOL) - includesUnit
 
(void) - setIncludesUnit:
 
(BOOL) - zeroPadsFractionDigits
 
(void) - setZeroPadsFractionDigits:
 
- Instance Methods inherited from CPFormatter
(CPString- editingStringForObjectValue:
 
(BOOL) - isPartialStringValid:newEditingString:errorDescription:
 
(BOOL) - isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:
 

Creating Strings from Byte Count

(CPString- stringFromByteCount:
 
(CPString- stringForObjectValue:
 
(BOOL) - getObjectValue:forString:errorDescription:
 
(CPString+ stringFromByteCount:countStyle:
 

Detailed Description

Method Documentation

- (int) allowedUnits
implementation

Definition at line 263 of file CPByteCountFormatter.j.

- (BOOL) allowsNonnumericFormatting
implementation

Definition at line 233 of file CPByteCountFormatter.j.

- (int) countStyle
implementation

Definition at line 223 of file CPByteCountFormatter.j.

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Reimplemented from CPFormatter.

Provided by category CPByteCountFormatter(CPCoding).

Definition at line 337 of file CPByteCountFormatter.j.

- (BOOL) getObjectValue: (idRef)  anObject
forString: (CPString aString
errorDescription: (CPStringRef)  anError 
implementation

The default implementation of this method raises an exception.

When implementing a subclass, return by reference the object anObject after creating it from aString. Return YES if the conversion is successful. If you return NO, also return by reference (in anError) a localized user-presentable CPString object that explains the reason why the conversion failed; the delegate (if any) of the CPControl object can then respond to the failure in control:didFailToFormatString:errorDescription:. However, if anError is nil, the sender is not interested in the error description, and you should not attempt to assign one.

Parameters
anObjectif conversion is successful, upon return contains the object created from the string
aStringthe string to parse.
anErrorif non-nil, if there is an error during the conversion, upon return contains an CPString object that describes the problem.
Returns
BOOL YES if the conversion from the string to a view content object was successful, otherwise NO.

Reimplemented from CPFormatter.

Definition at line 215 of file CPByteCountFormatter.j.

- (BOOL) includesActualByteCount
implementation

Definition at line 243 of file CPByteCountFormatter.j.

- (BOOL) includesCount
implementation

Definition at line 274 of file CPByteCountFormatter.j.

- (BOOL) includesUnit
implementation

Definition at line 284 of file CPByteCountFormatter.j.

- (id) init
implementation

Definition at line 64 of file CPByteCountFormatter.j.

- (id) initWithCoder: (CPCoder aCoder
implementation

Reimplemented from CPFormatter.

Provided by category CPByteCountFormatter(CPCoding).

Definition at line 318 of file CPByteCountFormatter.j.

- (BOOL) isAdaptive
implementation

Definition at line 253 of file CPByteCountFormatter.j.

- (void) setAdaptive: (BOOL)  shouldBeAdaptive
implementation

Definition at line 258 of file CPByteCountFormatter.j.

- (void) setAllowedUnits: (int)  allowed
implementation

Definition at line 268 of file CPByteCountFormatter.j.

- (void) setAllowsNonnumericFormatting: (BOOL)  shouldAllowNonnumericFormatting
implementation

Definition at line 238 of file CPByteCountFormatter.j.

- (void) setCountStyle: (int)  style
implementation

Definition at line 228 of file CPByteCountFormatter.j.

- (void) setIncludesActualByteCount: (BOOL)  shouldIncludeActualByteCount
implementation

Definition at line 248 of file CPByteCountFormatter.j.

- (void) setIncludesCount: (BOOL)  shouldIncludeCount
implementation

Definition at line 279 of file CPByteCountFormatter.j.

- (void) setIncludesUnit: (BOOL)  shouldIncludeUnit
implementation

Definition at line 289 of file CPByteCountFormatter.j.

- (void) setZeroPadsFractionDigits: (BOOL)  shouldZeroPad
implementation

Definition at line 299 of file CPByteCountFormatter.j.

- (CPString) stringForObjectValue: (id)  anObject
implementation

Cocoa returns nil if anObject is not a number.

Reimplemented from CPFormatter.

Definition at line 207 of file CPByteCountFormatter.j.

- (CPString) stringFromByteCount: (int)  byteCount
implementation

Definition at line 95 of file CPByteCountFormatter.j.

+ (CPString) stringFromByteCount: (int)  byteCount
countStyle: (int)  countStyle 
implementation

Definition at line 86 of file CPByteCountFormatter.j.

- (BOOL) zeroPadsFractionDigits
implementation

Definition at line 294 of file CPByteCountFormatter.j.


The documentation for this class was generated from the following files: