Revision: 29015
http://sourceforge.net/p/bibdesk/svn/29015
Author: hofman
Date: 2025-02-17 16:48:43 +0000 (Mon, 17 Feb 2025)
Log Message:
-----------
Add nullability for parser classes
Modified Paths:
--------------
trunk/bibdesk/BDSKConverter.h
trunk/bibdesk/BDSKFormatParser.h
trunk/bibdesk/BDSKTeXTask.h
trunk/bibdesk/BDSKTemplateParser.h
Modified: trunk/bibdesk/BDSKConverter.h
===================================================================
--- trunk/bibdesk/BDSKConverter.h 2025-02-17 16:35:00 UTC (rev 29014)
+++ trunk/bibdesk/BDSKConverter.h 2025-02-17 16:48:43 UTC (rev 29015)
@@ -41,6 +41,8 @@
#import <Cocoa/Cocoa.h>
#import "BDSKTypeManager.h"
+NS_ASSUME_NONNULL_BEGIN
+
// The filename and keys used in the plist
#define CHARACTER_CONVERSION_FILENAME @"CharacterConversion.plist"
#define ONE_WAY_CONVERSION_KEY @"One-Way Conversions"
@@ -103,3 +105,5 @@
@property (nonatomic, readonly) NSString *stringByDeTeXifyingString;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/BDSKFormatParser.h
===================================================================
--- trunk/bibdesk/BDSKFormatParser.h 2025-02-17 16:35:00 UTC (rev 29014)
+++ trunk/bibdesk/BDSKFormatParser.h 2025-02-17 16:48:43 UTC (rev 29015)
@@ -39,6 +39,8 @@
#import <Cocoa/Cocoa.h>
#import "BDSKOwnerProtocol.h"
+NS_ASSUME_NONNULL_BEGIN
+
@protocol BDSKParseableItem <NSObject>
- (NSString *)citeKey;
- (NSString *)title;
@@ -46,8 +48,8 @@
- (NSString *)stringValueOfField:(NSString *)field;
- (NSInteger)integerValueOfField:(NSString *)field;
- (NSArray *)peopleArrayForField:(NSString *)field;
-- (NSURL *)localFileURLForField:(NSString *)field;
-- (id<BDSKOwner>)owner;
+- (nullable NSURL *)localFileURLForField:(NSString *)field;
+- (nullable id<BDSKOwner>)owner;
@end
@class BDSKLinkedFile;
@@ -58,8 +60,8 @@
+ (NSString *)parseFormat:(NSString *)format forLinkedFile:(BDSKLinkedFile
*)file ofItem:(id <BDSKParseableItem>)pub;
-+ (BOOL)validateFormat:(NSString **)formatString forField:(NSString
*)fieldName error:(NSString **)error;
-+ (BOOL)validateFormat:(NSString **)formatString
attributedFormat:(NSAttributedString **)attrFormatString forField:(NSString
*)fieldName error:(NSString **)error;
++ (BOOL)validateFormat:(NSString * _Nullable * _Nullable)formatString
forField:(NSString *)fieldName error:(NSString * _Nullable * _Nullable)error;
++ (BOOL)validateFormat:(NSString * _Nullable * _Nullable)formatString
attributedFormat:(NSAttributedString * _Nullable * _Nullable)attrFormatString
forField:(NSString *)fieldName error:(NSString * _Nullable * _Nullable)error;
+ (NSArray *)requiredFieldsForFormat:(NSString *)formatString;
@@ -66,3 +68,5 @@
+ (NSURL *)folderURLForFilingPapersFromDocumentAtURL:(NSURL *)fileURL;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/BDSKTeXTask.h
===================================================================
--- trunk/bibdesk/BDSKTeXTask.h 2025-02-17 16:35:00 UTC (rev 29014)
+++ trunk/bibdesk/BDSKTeXTask.h 2025-02-17 16:48:43 UTC (rev 29015)
@@ -39,6 +39,8 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
+
typedef NS_ENUM(NSInteger, BDSKGeneratedType) {
BDSKGenerateAMSRefsLaTeX = 0,
BDSKGenerateLaTeX = 1,
@@ -70,7 +72,7 @@
- (instancetype)init;
- (instancetype)initWithFileName:(NSString *)fileName;
-@property (nonatomic, weak) id<BDSKTeXTaskDelegate> delegate;
+@property (nonatomic, nullable, weak) id<BDSKTeXTaskDelegate> delegate;
- (BOOL)runWithBibTeXString:(NSString *)bibStr citeKeys:(NSArray *)citeKeys
generatedType:(BDSKGeneratedType)generatedType;
@@ -77,14 +79,16 @@
- (void)cancel;
- (void)terminate;
-@property (nonatomic, readonly) NSString *logFileString;
-@property (nonatomic, readonly) NSString *laTeXString;
-@property (nonatomic, readonly) NSData *PDFData;
+@property (nonatomic, nullable, readonly) NSString *logFileString;
+@property (nonatomic, nullable, readonly) NSString *laTeXString;
+@property (nonatomic, nullable, readonly) NSData *PDFData;
-@property (nonatomic, readonly) NSString *logFilePath;
+@property (nonatomic, nullable, readonly) NSString *logFilePath;
@property (nonatomic, readonly) NSString *laTeXFilePath;
-@property (nonatomic, readonly) NSString *PDFFilePath;
+@property (nonatomic, nullable, readonly) NSString *PDFFilePath;
@property (nonatomic, readonly, getter=isProcessing) BOOL processing;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/BDSKTemplateParser.h
===================================================================
--- trunk/bibdesk/BDSKTemplateParser.h 2025-02-17 16:35:00 UTC (rev 29014)
+++ trunk/bibdesk/BDSKTemplateParser.h 2025-02-17 16:48:43 UTC (rev 29015)
@@ -38,6 +38,7 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
/*!
@class BDSKTemplateParser
@@ -81,3 +82,5 @@
- (void)cleanupAfterTemplateParsing;
@end
+
+NS_ASSUME_NONNULL_END
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit