/usr/include/GNUstep/Foundation/NSValueTransformer.h is in libgnustep-base-dev 1.22.1-4+deb7u1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | /* Interface for NSValueTransformer for GNUStep
Copyright (C) 2006 Free Software Foundation, Inc.
Written Dr. H. Nikolaus Schaller
Created on Mon Mar 21 2005.
Updatesd and documented by Richard Frith-Macdonald
This file is part of the GNUstep Base Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111 USA.
*/
#ifndef __NSValueTransformer_h_GNUSTEP_BASE_INCLUDE
#define __NSValueTransformer_h_GNUSTEP_BASE_INCLUDE
#import <GNUstepBase/GSVersionMacros.h>
#if OS_API_VERSION(100300,GS_API_LATEST) && GS_API_VERSION( 10200,GS_API_LATEST)
#import <Foundation/NSObject.h>
#if defined(__cplusplus)
extern "C" {
#endif
@class NSArray;
@class NSString;
/** This transformer converts a YES to a NO and a NO to a YES.
*/
GS_EXPORT NSString* const NSNegateBooleanTransformerName;
/** This transformer converts a nil value to a YES.<br />
* Not reversible.
*/
GS_EXPORT NSString* const NSIsNilTransformerName;
/** This transformer converts a non-nil value to a YES.<br />
* Not reversible.
*/
GS_EXPORT NSString* const NSIsNotNilTransformerName;
/** This transformer converts an [NSData] instance to the object
* archived in it, or archives an object inot an [NSData].
*/
GS_EXPORT NSString* const NSUnarchiveFromDataTransformerName;
/** 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.
*/
@interface NSValueTransformer : NSObject
/** <override-subclass />
* Returns a flag indicating whether the transformer permits reverse
* transformations.
*/
+ (BOOL) allowsReverseTransformation;
/**
* Registers transformer to handle transformations with the specified
* name.
*/
+ (void) setValueTransformer: (NSValueTransformer *)transformer
forName: (NSString *)name;
/** <override-subclass />
* Returns the class of the value produced by this transformer.
*/
+ (Class) transformedValueClass;
/**
* Returns the transformer registered for the specified name, or nil
* if no transformer is registered for name.
*/
+ (NSValueTransformer *) valueTransformerForName: (NSString *)name;
/**
* Returns an array listing the names of all registered value transformers.
*/
+ (NSArray *) valueTransformerNames;
/**
* Performs a reverse transformation on the specified value and returns the
* resulting object.<br />
* The default implementation raises an exception if
* +allowsReverseTransformation returns NO, otherwise it calls
* -transformedValue: and returns the result.
*/
- (id) reverseTransformedValue: (id)value;
/** <override-subclass/>
* Subclasses should override this method to perform the actual transformation
* (and reverse transformation if applicable) and return the result.
*/
- (id) transformedValue: (id)value;
@end
#if defined(__cplusplus)
}
#endif
#endif /* OS_API_VERSION */
#endif /* __NSValueTransformer_h_GNUSTEP_BASE_INCLUDE */
|