forked from gavinkwoe/todparsekit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKJSSequence.m
63 lines (50 loc) · 1.56 KB
/
PKJSSequence.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
// PKJSSequence.m
// ParseKit
//
// Created by Todd Ditchendorf on 1/11/09.
// Copyright 2009 Todd Ditchendorf. All rights reserved.
//
#import "PKJSSequence.h"
#import "PKJSUtils.h"
#import "PKJSCollectionParser.h"
#import <ParseKit/PKSequence.h>
#pragma mark -
#pragma mark Methods
#pragma mark -
#pragma mark Properties
#pragma mark -
#pragma mark Initializer/Finalizer
static void PKSequence_initialize(JSContextRef ctx, JSObjectRef this) {
}
static void PKSequence_finalize(JSObjectRef this) {
// released in PKParser_finalize
}
static JSStaticFunction PKSequence_staticFunctions[] = {
{ 0, 0, 0 }
};
static JSStaticValue PKSequence_staticValues[] = {
{ 0, 0, 0, 0 }
};
#pragma mark -
#pragma mark Public
JSClassRef PKSequence_class(JSContextRef ctx) {
static JSClassRef jsClass = NULL;
if (!jsClass) {
JSClassDefinition def = kJSClassDefinitionEmpty;
def.parentClass = PKCollectionParser_class(ctx);
def.staticFunctions = PKSequence_staticFunctions;
def.staticValues = PKSequence_staticValues;
def.initialize = PKSequence_initialize;
def.finalize = PKSequence_finalize;
jsClass = JSClassCreate(&def);
}
return jsClass;
}
JSObjectRef PKSequence_new(JSContextRef ctx, void *data) {
return JSObjectMake(ctx, PKSequence_class(ctx), data);
}
JSObjectRef PKSequence_construct(JSContextRef ctx, JSObjectRef constructor, size_t argc, const JSValueRef argv[], JSValueRef *ex) {
PKSequence *data = [[PKSequence alloc] init];
return PKSequence_new(ctx, data);
}