Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 66 lines (55 sloc) 4.031 kB
5e5ea55 @groue v1.13.0
authored
1 // The MIT License
2 //
3 // Copyright (c) 2012 Gwendal Roué
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to deal
7 // in the Software without restriction, including without limitation the rights
8 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 // copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be included in
13 // all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 // THE SOFTWARE.
22
23 #import <Foundation/Foundation.h>
24 #import "GRMustacheAvailabilityMacros.h"
25 #import "GRMustache.h"
26
27 @class GRMustacheTemplate;
28 @class GRMustacheTemplateRepository;
29
30 @protocol GRMustacheTemplateRepositoryDataSource <NSObject>
31 @required
eb5cff8 @groue v3.0.0
authored
32 - (id)templateRepository:(GRMustacheTemplateRepository *)templateRepository templateIDForName:(NSString *)name relativeToTemplateID:(id)templateID AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
33 - (NSString *)templateRepository:(GRMustacheTemplateRepository *)templateRepository templateStringForTemplateID:(id)templateID error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
5e5ea55 @groue v1.13.0
authored
34 @end
35
36 @interface GRMustacheTemplateRepository : NSObject {
37 @private
38 id<GRMustacheTemplateRepositoryDataSource> _dataSource;
39 NSMutableDictionary *_templateForTemplateID;
40 id _currentlyParsedTemplateID;
41 }
eb5cff8 @groue v3.0.0
authored
42 @property (nonatomic, assign) id<GRMustacheTemplateRepositoryDataSource> dataSource AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
5e5ea55 @groue v1.13.0
authored
43
ed879f3 @groue v2.0.0
authored
44 #if !TARGET_OS_IPHONE || __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000
eb5cff8 @groue v3.0.0
authored
45 + (id)templateRepositoryWithBaseURL:(NSURL *)URL AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
46 + (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
47 + (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
48 + (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
ed879f3 @groue v2.0.0
authored
49 #endif /* if !TARGET_OS_IPHONE || __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000 */
5e5ea55 @groue v1.13.0
authored
50
eb5cff8 @groue v3.0.0
authored
51 + (id)templateRepositoryWithDirectory:(NSString *)path AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
52 + (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
53 + (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
5e5ea55 @groue v1.13.0
authored
54
eb5cff8 @groue v3.0.0
authored
55 + (id)templateRepositoryWithBundle:(NSBundle *)bundle AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
56 + (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
57 + (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
5e5ea55 @groue v1.13.0
authored
58
eb5cff8 @groue v3.0.0
authored
59 + (id)templateRepositoryWithPartialsDictionary:(NSDictionary *)partialsDictionary AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
5e5ea55 @groue v1.13.0
authored
60
eb5cff8 @groue v3.0.0
authored
61 + (id)templateRepository AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
5e5ea55 @groue v1.13.0
authored
62
eb5cff8 @groue v3.0.0
authored
63 - (GRMustacheTemplate *)templateForName:(NSString *)name error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
64 - (GRMustacheTemplate *)templateFromString:(NSString *)templateString error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
5e5ea55 @groue v1.13.0
authored
65 @end
Something went wrong with that request. Please try again.