API  0.9.10
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:
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
(void) - applyChange:toKeyPath:
(id) - autorelease
(id) - awakeAfterUsingCoder:
(void) - awakeFromCib
(void) - bind:toObject:withKeyPath:options:
(Class) - classForCoder
(Class) - classForKeyedArchiver
(CPString- className
(id) - copy
(void) - dealloc
(CPString- description
(CPDictionary- dictionaryWithValuesForKeys:
(void) - didChange:valuesAtIndexes:forKey:
(void) - didChangeValueForKey:
(void) - didChangeValueForKey:withSetMutation:usingObjects:
(void) - doesNotRecognizeSelector:
(CPArray) - exposedBindings
(id) - forwardingTargetForSelector:
(void) - forwardInvocation:
(unsigned) - hash
(BOOL) - implementsSelector:
(CPDictionary- infoForBinding:
(BOOL) - isEqual:
(BOOL) - isKindOfClass:
(BOOL) - isMemberOfClass:
(BOOL) - isProxy
(IMP) - methodForSelector:
(CPMethodSignature) - methodSignatureForSelector:
(id) - mutableArrayValueForKey:
(id) - mutableArrayValueForKeyPath:
(id) - mutableCopy
(id) - mutableSetValueForKey:
(id) - mutableSetValueForKeyPath:
(id) - performSelector:
(id) - performSelector:withObject:
(void) - performSelector:withObject:afterDelay:
(void) - performSelector:withObject:afterDelay:inModes:
(id) - performSelector:withObject:withObject:
(id) - performSelector:withObjects:
(void) - release
(void) - removeObserver:forKeyPath:
(id) - replacementObjectForArchiver:
(id) - replacementObjectForCoder:
(id) - replacementObjectForKeyedArchiver:
(BOOL) - respondsToSelector:
(id) - retain
(id) - self
(void) - setValue:forKey:
(void) - setValue:forKeyPath:
(void) - setValue:forUndefinedKey:
(void) - setValuesForKeysWithDictionary:
(CPString- UID
(void) - unbind:
(Class) - valueClassForBinding:
(id) - valueForKey:
(id) - valueForKeyPath:
(id) - valueForUndefinedKey:
(void) - willChange:valuesAtIndexes:forKey:
(void) - willChangeValueForKey:
(void) - willChangeValueForKey:withSetMutation:usingObjects:

Creating Strings from Byte Count

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

Additional Inherited Members

- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
(id) + alloc
(id) + allocWithCoder:
(BOOL) + automaticallyNotifiesObserversForKey:
(void) + cancelPreviousPerformRequestsWithTarget:
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
(Class) + class
(BOOL) + conformsToProtocol:
(void) + exposeBinding:
(void) + initialize
(IMP) + instanceMethodForSelector:
(BOOL) + instancesImplementSelector:
(BOOL) + instancesRespondToSelector:
(BOOL) + isBindingExclusive:
(BOOL) + isSubclassOfClass:
(CPSet) + keyPathsForValuesAffectingValueForKey:
(void) + load
(id) + new
(void) + object:performSelector:withObject:afterDelay:inModes:
(void) + setVersion:
(Class) + superclass
(int) + version

Detailed Description

Method Documentation

◆ allowedUnits()

- (int) allowedUnits

Definition at line 262 of file CPByteCountFormatter.j.

◆ allowsNonnumericFormatting()

- (BOOL) allowsNonnumericFormatting

Definition at line 232 of file CPByteCountFormatter.j.

◆ countStyle()

- (int) countStyle

Definition at line 222 of file CPByteCountFormatter.j.

◆ encodeWithCoder:()

- (void) encodeWithCoder: (CPCoder aCoder

Reimplemented from CPFormatter.

Provided by category CPByteCountFormatter(CPCoding).

Definition at line 336 of file CPByteCountFormatter.j.

◆ getObjectValue:forString:errorDescription:()

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

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.

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.
BOOL YES if the conversion from the string to a view content object was successful, otherwise NO.

Reimplemented from CPFormatter.

Definition at line 214 of file CPByteCountFormatter.j.

◆ includesActualByteCount()

- (BOOL) includesActualByteCount

Definition at line 242 of file CPByteCountFormatter.j.

◆ includesCount()

- (BOOL) includesCount

Definition at line 273 of file CPByteCountFormatter.j.

◆ includesUnit()

- (BOOL) includesUnit

Definition at line 283 of file CPByteCountFormatter.j.

◆ init()

- (id) init

Initializes the receiver

the initialized receiver

Reimplemented from CPObject.

Definition at line 63 of file CPByteCountFormatter.j.

◆ initWithCoder:()

- (id) initWithCoder: (CPCoder aCoder

Reimplemented from CPFormatter.

Provided by category CPByteCountFormatter(CPCoding).

Definition at line 317 of file CPByteCountFormatter.j.

◆ isAdaptive()

- (BOOL) isAdaptive

Definition at line 252 of file CPByteCountFormatter.j.

◆ setAdaptive:()

- (void) setAdaptive: (BOOL)  shouldBeAdaptive

Definition at line 257 of file CPByteCountFormatter.j.

◆ setAllowedUnits:()

- (void) setAllowedUnits: (int)  allowed

Definition at line 267 of file CPByteCountFormatter.j.

◆ setAllowsNonnumericFormatting:()

- (void) setAllowsNonnumericFormatting: (BOOL)  shouldAllowNonnumericFormatting

Definition at line 237 of file CPByteCountFormatter.j.

◆ setCountStyle:()

- (void) setCountStyle: (int)  style

Definition at line 227 of file CPByteCountFormatter.j.

◆ setIncludesActualByteCount:()

- (void) setIncludesActualByteCount: (BOOL)  shouldIncludeActualByteCount

Definition at line 247 of file CPByteCountFormatter.j.

◆ setIncludesCount:()

- (void) setIncludesCount: (BOOL)  shouldIncludeCount

Definition at line 278 of file CPByteCountFormatter.j.

◆ setIncludesUnit:()

- (void) setIncludesUnit: (BOOL)  shouldIncludeUnit

Definition at line 288 of file CPByteCountFormatter.j.

◆ setZeroPadsFractionDigits:()

- (void) setZeroPadsFractionDigits: (BOOL)  shouldZeroPad

Definition at line 298 of file CPByteCountFormatter.j.

◆ stringForObjectValue:()

- (CPString) stringForObjectValue: (id)  anObject

Cocoa returns nil if anObject is not a number.

Reimplemented from CPFormatter.

Definition at line 206 of file CPByteCountFormatter.j.

◆ stringFromByteCount:()

- (CPString) stringFromByteCount: (int)  byteCount

Definition at line 94 of file CPByteCountFormatter.j.

◆ stringFromByteCount:countStyle:()

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

Definition at line 85 of file CPByteCountFormatter.j.

◆ zeroPadsFractionDigits()

- (BOOL) zeroPadsFractionDigits

Definition at line 293 of file CPByteCountFormatter.j.

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