Add set/get method for requiresSecureCoding

This commit is contained in:
Gregory John Casamento 2020-05-13 02:29:53 -04:00
parent de0282fdac
commit 1a6a091fc4
2 changed files with 23 additions and 0 deletions

View file

@ -70,6 +70,7 @@ extern "C" {
NSMutableDictionary *_enc; /* Object being encoded. */
NSMutableArray *_obj; /* Array of objects. */
NSPropertyListFormat _format;
BOOL _requiresSecureCoding;
#endif
#if GS_NONFRAGILE
#else
@ -121,6 +122,18 @@ extern "C" {
*/
+ (void) setClassName: (NSString*)aString forClass: (Class)aClass;
/**
* Returns whether the current instance of the archiver needs secure
* coding.
*/
- (BOOL) requiresSecureCoding;
/**
* Sets whether the current instance of the archiver needs secure
* coding.
*/
- (void) setRequiresSecureCoding: (BOOL)flag;
/**
* Returns any mapping for the name of aClass which was previously set
* for the receiver using the -setClassName:forClass: method.<br />

View file

@ -517,6 +517,16 @@ static NSDictionary *makeReference(unsigned ref)
}
}
- (BOOL) requiresSecureCoding
{
return _requiresSecureCoding;
}
- (void) setRequiresSecureCoding: (BOOL)flag
{
_requiresSecureCoding = flag;
}
- (BOOL) allowsKeyedCoding
{
return YES;