Up
Authors
- Generated by richard
-
- Declared in:
- Foundation/NSValueTransformer.h
Availability: MacOS-X 10.3.0, Base 1.2.0
Instances of the NSValueTransformer class are used
to convert values from one representation to another. The
base class is abstract and its methods must be
overridden by subclasses to do the actual work.
Method summary
+ (BOOL)
allowsReverseTransformation;
Availability: MacOS-X 10.3.0, Base 1.2.0
Subclasses
should override this method.
Returns a flag indicating whether the transformer
permits reverse transformations.
+ (void)
setValueTransformer: (
NSValueTransformer*)transformer
forName: (
NSString*)name;
Availability: MacOS-X 10.3.0, Base 1.2.0
Registers transformer to handle
transformations with the specified
name.
+ (Class)
transformedValueClass;
Availability: MacOS-X 10.3.0, Base 1.2.0
Subclasses
should override this method.
Returns the class of the value produced by this
transformer.
+ (
NSValueTransformer*)
valueTransformerForName: (
NSString*)name;
Availability: MacOS-X 10.3.0, Base 1.2.0
Returns the transformer registered for the
specified name, or nil
if
no transformer is registered for name.
+ (
NSArray*)
valueTransformerNames;
Availability: MacOS-X 10.3.0, Base 1.2.0
Returns an array listing the names of all
registered value transformers.
- (id)
reverseTransformedValue: (id)value;
Availability: MacOS-X 10.3.0, Base 1.2.0
Performs a reverse transformation on the specified
value and returns the resulting object.
The default implementation raises an
exception if
+allowsReverseTransformation
returns
NO
, otherwise it calls
-transformedValue:
and returns the result.
- (id)
transformedValue: (id)value;
Availability: MacOS-X 10.3.0, Base 1.2.0
Subclasses
should override this method.
Subclasses should override this method to
perform the actual transformation (and reverse
transformation if applicable) and return the
result.
Up