summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksandr Mishchenko <AMishchenko@luxoft.com>2020-02-27 10:51:10 +0100
committerAleksandr Mishchenko <AMishchenko@luxoft.com>2020-02-27 10:51:10 +0100
commit20bbb94b19a36723576ed17e070c94579e46f9c8 (patch)
tree61b02c1d30941660c1ca1fdd95e9f2fbd917e505
parent209f50079767b81206e8526d193bb94e1fdf1be9 (diff)
downloadsdl_ios-20bbb94b19a36723576ed17e070c94579e46f9c8.tar.gz
remove all custom mappings
-rw-r--r--generator/mapping.json3
-rw-r--r--generator/templates/enums/FunctionID.h29
-rw-r--r--generator/templates/enums/FunctionID.m52
3 files changed, 0 insertions, 84 deletions
diff --git a/generator/mapping.json b/generator/mapping.json
index e90187f04..60fe362be 100644
--- a/generator/mapping.json
+++ b/generator/mapping.json
@@ -1,8 +1,5 @@
{
"enums": {
- "FunctionID": {
- "template": true
- }
},
"structs": {
},
diff --git a/generator/templates/enums/FunctionID.h b/generator/templates/enums/FunctionID.h
deleted file mode 100644
index 92e36ac29..000000000
--- a/generator/templates/enums/FunctionID.h
+++ /dev/null
@@ -1,29 +0,0 @@
-{% include 'copyright.txt' %}
-// {{name}}.h
-
-#import <Foundation/Foundation.h>
-#import "NSNumber+NumberType.h"
-#import "SDLRPCFunctionNames.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// A function ID for an SDL RPC
-@interface {{name}} : NSObject
-
-/// The shared object for pulling function id information
-+ (instancetype)sharedInstance;
-
-/// Gets the function name for a given SDL RPC function ID
-///
-/// @param functionID A function ID
-/// @returns An SDLRPCFunctionName
-- (nullable SDLRPCFunctionName)functionNameForId:(UInt32)functionID;
-
-/// Gets the function ID for a given SDL RPC function name
-///
-/// @param functionName The RPC function name
-- (nullable NSNumber<SDLInt> *)functionIdForName:(SDLRPCFunctionName)functionName;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/generator/templates/enums/FunctionID.m b/generator/templates/enums/FunctionID.m
deleted file mode 100644
index 92ddacafc..000000000
--- a/generator/templates/enums/FunctionID.m
+++ /dev/null
@@ -1,52 +0,0 @@
-{% include 'copyright.txt' %}
-// {{name}}.m
-
-#import "{{name}}.h"
-
-#import "NSMutableDictionary+Store.h"
-#import "SDLRPCFunctionNames.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface {{name}} ()
-
-@property (nonatomic, strong, nonnull) NSDictionary* functionIds;
-
-@end
-
-@implementation {{name}}
-
-+ (instancetype)sharedInstance {
- static {{name}}* functionId = nil;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- functionId = [[{{name}} alloc] init];
- });
- return functionId;
-}
-
-- (instancetype)init {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- self.functionIds = @{
- {%- for param in params %}
- @{{param.value}}: SDLRPCFunctionName{{param.name}}{{ ',' if not loop.last }}
- {%- endfor %}
- };
- return self;
-}
-
-- (nullable SDLRPCFunctionName)functionNameForId:(UInt32)functionID {
- return self.functionIds[@(functionID)];
-}
-
-- (nullable NSNumber<SDLInt> *)functionIdForName:(SDLRPCFunctionName)functionName {
- return [[self.functionIds allKeysForObject:functionName] firstObject];
-}
-
-@end
-
-NS_ASSUME_NONNULL_END