<commit_before>//
//  SMRPreprocessor.h
//  MicroReasoner
//
//  Created by <NAME> on 05/05/16.
//  Copyright © 2016 SisInf Lab. All rights reserved.
//

#ifndef SMRPreprocessor_h
#define SMRPreprocessor_h

// Pseudo-abstract class convenience macros.

#define ABSTRACT_METHOD {\
@throw [NSException exceptionWithName:NSInternalInconsistencyException \
reason:@"This method should be overridden in a subclass." \
userInfo:nil]; \
}

#endif /* SMRPreprocessor_h */<commit_msg>Add lazy property synthesis directives<commit_after>//
//  SMRPreprocessor.h
//  MicroReasoner
//
//  Created by <NAME> on 05/05/16.
//  Copyright © 2016 SisInf Lab. All rights reserved.
//

#ifndef SMRPreprocessor_h
#define SMRPreprocessor_h

/**
 * Use this directive to mark method implementations that should be overridden
 * by concrete subclasses.
 */
#define ABSTRACT_METHOD {\
@throw [NSException exceptionWithName:NSInternalInconsistencyException \
reason:@"This method should be overridden in a subclass." \
userInfo:nil]; \
}

/**
 * Use this directive in place of @synthesize to automatically create a
 * lazy getter for the specified property. Example syntax:
 *
 * SYNTHESIZE_LAZY(NSMutableString, myMutableString) {
 *     return [NSMutableString stringWithString:@"my mutable string"];
 * }
 *
 * @param type The type of the property.
 * @param name The name of the property.
 */
#define SYNTHESIZE_LAZY(type, name) \
@synthesize name = _##name; \
- (type *)name { \
if (_##name == nil) { _##name = [self __##name##LazyInit]; } \
return _##name; \
} \
- (type *)__##name##LazyInit

/**
 * Use this directive in place of @synthesize to automatically create a
 * lazy getter for the specified property. The getter calls the default
 * 'init' constructor.
 *
 * @param type The type of the property.
 * @param name The name of the property.
 */
#define SYNTHESIZE_LAZY_INIT(type, name) \
@synthesize name = _##name; \
- (type *)name { \
if (_##name == nil) { _##name = [[type alloc] init]; } \
return _##name; \
}

#endif /* SMRPreprocessor_h */
{'fraction_non_alphanumeric': 0.12592228234136743, 'fraction_numerical': 0.009837678307919331, 'mean_word_length': 3.9249394673123486, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4127861', 'n_tokens_mistral': 684, 'n_tokens_neox': 638, 'n_words': 207}