1 /* Cycript - The Truly Universal Scripting Language
2 * Copyright (C) 2009-2016 Jay Freeman (saurik)
5 /* GNU Affero General Public License, Version 3 {{{ */
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef CYCRIPT_OBJECTIVEC_INTERNAL_HPP
23 #define CYCRIPT_OBJECTIVEC_INTERNAL_HPP
25 #include <objc/objc.h>
27 #include "../Internal.hpp"
29 struct Selector_privateData :
30 CYValue<Selector_privateData, SEL>
32 _finline Selector_privateData(SEL value) :
41 typedef unsigned Flags;
42 static const Flags None = 0;
43 static const Flags Permanent = 1 << 0;
44 static const Flags Uninitialized = 1 << 1;
48 Instance(id value, Flags flags);
51 JSValueRef GetPrototype(JSContextRef context) const;
53 static JSClassRef GetClass(id value, Flags flags);
55 _finline bool IsPermanent() const {
56 return (flags_ & Permanent) != 0;
59 _finline bool IsUninitialized() const {
60 return (flags_ & Uninitialized) != 0;
70 _finline Super(id value, Class _class) :
78 CYValue<Messages, Class>
80 _finline Messages(Class value) :
85 JSValueRef GetPrototype(JSContextRef context) const;
93 _finline Interior(id value, JSContextRef context, JSObjectRef owner) :
95 owner_(context, owner)
100 #endif/*CYCRIPT_OBJECTIVEC_INTERNAL_HPP*/