PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Frameworks/Foundation/objj.platform/CPData.j

http://github.com/jfahrenkrug/MapKit-HelloWorld
Unknown | 72 lines | 72 code | 0 blank | 0 comment | 0 complexity | bec6326637925f3c8d5e653471d84300 MD5 | raw file
 1i;10;CPObject.ji;10;CPString.jc;2225;
 2var _1=objj_allocateClassPair(CPObject,"CPData"),_2=_1.isa;
 3class_addIvars(_1,[new objj_ivar("_plistObject")]);
 4objj_registerClassPair(_1);
 5objj_addClassForBundle(_1,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
 6class_addMethods(_1,[new objj_method(sel_getUid("initWithString:"),function(_3,_4,_5){
 7with(_3){
 8_3=objj_msgSendSuper({receiver:_3,super_class:objj_getClass("CPObject")},"init");
 9if(_3){
10string=_5;
11}
12return _3;
13}
14}),new objj_method(sel_getUid("initWithPlistObject:"),function(_6,_7,_8){
15with(_6){
16_6=objj_msgSendSuper({receiver:_6,super_class:objj_getClass("CPObject")},"init");
17if(_6){
18_plistObject=_8;
19}
20return _6;
21}
22}),new objj_method(sel_getUid("length"),function(_9,_a){
23with(_9){
24return objj_msgSend(objj_msgSend(_9,"string"),"length");
25}
26}),new objj_method(sel_getUid("description"),function(_b,_c){
27with(_b){
28return string;
29}
30}),new objj_method(sel_getUid("string"),function(_d,_e){
31with(_d){
32if(!string&&_plistObject){
33string=objj_msgSend(objj_msgSend(CPPropertyListSerialization,"dataFromPropertyList:format:errorDescription:",_plistObject,CPPropertyList280NorthFormat_v1_0,NULL),"string");
34}
35return string;
36}
37}),new objj_method(sel_getUid("setString:"),function(_f,_10,_11){
38with(_f){
39string=_11;
40_plistObject=nil;
41}
42}),new objj_method(sel_getUid("plistObject"),function(_12,_13){
43with(_12){
44if(string&&!_plistObject){
45_plistObject=objj_msgSend(CPPropertyListSerialization,"propertyListFromData:format:errorDescription:",_12,0,NULL);
46}
47return _plistObject;
48}
49}),new objj_method(sel_getUid("setPlistObject:"),function(_14,_15,_16){
50with(_14){
51string=nil;
52_plistObject=_16;
53}
54})]);
55class_addMethods(_2,[new objj_method(sel_getUid("alloc"),function(_17,_18){
56with(_17){
57return new objj_data();
58}
59}),new objj_method(sel_getUid("data"),function(_19,_1a){
60with(_19){
61return objj_msgSend(objj_msgSend(_19,"alloc"),"initWithPlistObject:",nil);
62}
63}),new objj_method(sel_getUid("dataWithString:"),function(_1b,_1c,_1d){
64with(_1b){
65return objj_msgSend(objj_msgSend(_1b,"alloc"),"initWithString:",_1d);
66}
67}),new objj_method(sel_getUid("dataWithPlistObject:"),function(_1e,_1f,_20){
68with(_1e){
69return objj_msgSend(objj_msgSend(_1e,"alloc"),"initWithPlistObject:",_20);
70}
71})]);
72objj_data.prototype.isa=CPData;