bool __hxcpp_same_closure(Dynamic &inF1,Dynamic &inF2) { hx::Object *p1 = inF1.GetPtr(); hx::Object *p2 = inF2.GetPtr(); if (p1==0 || p2==0) return false; if ( (p1->__GetHandle() != p2->__GetHandle())) return false; return p1->__Compare(p2)==0; }
void __int_hash_set(Dynamic &ioHash,int inKey,const Dynamic &value) { IntHashBase *hash = static_cast<IntHashBase *>(ioHash.GetPtr()); if (!hash) { #ifdef HX_DYNAMIC_HASH_VALUES hash = new IntHashObject(); #else if (value==null()) { hash = new IntHashObject(); } else { hxObjectType type = (hxObjectType)value->__GetType(); if (type==vtInt) hash = new IntHashInt(); else if (type==vtFloat) hash = new IntHashFloat(); else if (type==vtString) hash = new IntHashString(); else // Object or bool hash = new IntHashObject(); } #endif ioHash = hash; } else if (hash->store!=hashObject) { HashStore want = hashObject; if (value!=null()) { hxObjectType type = (hxObjectType)value->__GetType(); if ( type==vtInt) { if (hash->store==hashFloat) want = hashFloat; else if (hash->store==hashInt) want = hashInt; } else if (type==vtFloat) { if (hash->store==hashInt || hash->store==hashFloat) want =hashFloat; } else if (type==vtString) { if (hash->store==hashString) want = hashString; } } if (hash->store!=want) { hash = hash->convertStore(want); ioHash = hash; } } ioHash.mPtr = hash->set(inKey,value); }
String __string_hash_to_string(Dynamic &ioHash) { StringHashBase *hash = static_cast<StringHashBase *>(ioHash.GetPtr()); if (hash) return hash->toString(); return HX_CSTRING("{}"); }
bool __string_hash_remove(Dynamic &ioHash,String inKey) { StringHashBase *hash = static_cast<StringHashBase *>(ioHash.GetPtr()); if (!hash) return false; return hash->remove(inKey); }
bool __object_hash_remove(Dynamic &ioHash,Dynamic inKey) { DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr()); if (!hash) return false; return hash->remove(inKey); }
String __string_hash_to_string_raw(Dynamic &ioHash) { StringHashBase *hash = static_cast<StringHashBase *>(ioHash.GetPtr()); if (hash) return hash->toStringRaw(); return null(); }
Array<Dynamic> __object_hash_keys(Dynamic &ioHash) { DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr()); if (!hash) return Array_obj<String>::__new(); return hash->keys(); }
Dynamic __object_hash_values(Dynamic &ioHash) { DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr()); if (!hash) return Array_obj<Dynamic>::__new(); return hash->values(); }
bool __int_hash_remove(Dynamic &ioHash,int inKey) { IntHashBase *hash = static_cast<IntHashBase *>(ioHash.GetPtr()); if (!hash) return false; return hash->remove(inKey); }
Array<int> __int_hash_keys(Dynamic &ioHash) { IntHashBase *hash = static_cast<IntHashBase *>(ioHash.GetPtr()); if (!hash) return Array_obj<int>::__new(); return hash->keys(); }
String __object_hash_to_string(Dynamic &ioHash) { DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr()); if (hash) return hash->toString(); return String(); }
String __int_hash_to_string(Dynamic &ioHash) { IntHashBase *hash = static_cast<IntHashBase *>(ioHash.GetPtr()); if (hash) return hash->toString(); return String(); }
bool __object_hash_exists(Dynamic &ioHash,Dynamic inKey) { toRealObject(inKey); DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr()); if (!hash) return false; return hash->exists(inKey); }
void __string_hash_set(Dynamic &ioHash,String inKey,const Dynamic &value) { StringHashBase *hash = static_cast<StringHashBase *>(ioHash.GetPtr()); if (!hash) { if (value==null()) { hash = new StringHashObject(); } else { ObjectType type = (ObjectType)value->__GetType(); if (type==vtBool || type==vtInt) { hash = new StringHashInt(); } else if (type==vtFloat) hash = new StringHashFloat(); else if (type==vtString) hash = new StringHashString(); else hash = new StringHashObject(); } ioHash = hash; } else if (hash->store!=hashObject) { HashStore want = hashObject; if (value!=null()) { ObjectType type = (ObjectType)value->__GetType(); if (type==vtBool || type==vtInt) { if (hash->store==hashFloat) want = hashFloat; else if (hash->store==hashInt) want = hashInt; } else if (type==vtFloat) { if (hash->store==hashInt || hash->store==hashFloat) want =hashFloat; } else if (type==vtString) { if (hash->store==hashString) want = hashString; } } if (hash->store!=want) { hash = hash->convertStore(want); ioHash = hash; } } hash->set(inKey,value); }
Dynamic __object_hash_get(Dynamic &ioHash,Dynamic inKey) { DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr()); if (!hash) return null(); Dynamic result = null(); hash->query(inKey,result); return result; }
Dynamic __string_hash_get(Dynamic &ioHash,String inKey) { StringHashBase *hash = static_cast<StringHashBase *>(ioHash.GetPtr()); if (!hash) return null(); Dynamic result = null(); hash->query(inKey,result); return result; }
Dynamic __int_hash_get(Dynamic &ioHash,int inKey) { IntHashBase *hash = static_cast<IntHashBase *>(ioHash.GetPtr()); if (!hash) return null(); Dynamic result = null(); hash->query(inKey,result); return result; }
bool __instanceof(const Dynamic &inValue, const Dynamic &inType) { if (inValue==null()) return false; if (inType==hx::Object::__SGetClass()) return true; hx::Class c = inType; if (c==null()) return false; return c->CanCast(inValue.GetPtr()); }
void __int_hash_set_int(Dynamic &ioHash,int inKey,int inValue) { IntHashBase *hash = static_cast<IntHashBase *>(ioHash.GetPtr()); if (!hash) { hash = new IntHashInt(); ioHash = hash; } else if (hash->store==hashString) { hash = hash->convertStore(hashObject); ioHash = hash; } ioHash.mPtr = hash->set(inKey,inValue); }
void __string_hash_set_string(Dynamic &ioHash,String inKey, ::String inValue) { StringHashBase *hash = static_cast<StringHashBase *>(ioHash.GetPtr()); if (!hash) { hash = new StringHashString(); ioHash = hash; } else if (hash->store==hashInt || hash->store==hashFloat) { hash = hash->convertStore(hashObject); ioHash = hash; } ioHash.mPtr = hash->set(inKey,inValue); }
void __object_hash_set_string(Dynamic &ioHash,Dynamic inKey, ::String inValue,bool inWeakKeys) { DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr()); if (!hash) { hash = inWeakKeys ? (DynamicHashBase *)new WeakDynamicHashString() : (DynamicHashBase *)new DynamicHashString(); ioHash = hash; } else if (hash->store==hashInt || hash->store==hashFloat) { hash = hash->convertStore(hashObject); ioHash = hash; } hash->set(inKey,inValue); }
void __object_hash_set_int(Dynamic &ioHash,Dynamic inKey,int inValue,bool inWeakKeys) { toRealObject(inKey); DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr()); if (!hash) { hash = inWeakKeys ? (DynamicHashBase *)new WeakDynamicHashInt() : (DynamicHashBase *)new DynamicHashInt(); ioHash = hash; } else if (hash->store==hashString) { hash = hash->convertStore(hashObject); ioHash = hash; } ioHash.mPtr = hash->set(inKey,inValue); }
void __object_hash_set(Dynamic &ioHash,Dynamic inKey,const Dynamic &value,bool inWeakKeys) { DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr()); if (!hash) { if (value==null()) { hash = inWeakKeys ? (DynamicHashBase *)new WeakDynamicHashObject() : (DynamicHashBase *)new DynamicHashObject(); } else { ObjectType type = (ObjectType)value->__GetType(); if (type==vtBool || type==vtInt) { hash = inWeakKeys ? (DynamicHashBase *)new WeakDynamicHashInt() : (DynamicHashBase *)new DynamicHashInt(); } else if (type==vtFloat) hash = inWeakKeys ? (DynamicHashBase *)new WeakDynamicHashFloat() : (DynamicHashBase *)new DynamicHashFloat(); else if (type==vtString) hash = inWeakKeys ? (DynamicHashBase *)new WeakDynamicHashString() : (DynamicHashBase *)new DynamicHashString(); else hash = inWeakKeys ? (DynamicHashBase *)new WeakDynamicHashObject() : (DynamicHashBase *)new DynamicHashObject(); } ioHash = hash; } else if (hash->store!=hashObject) { HashStore want = hashObject; if (value!=null()) { ObjectType type = (ObjectType)value->__GetType(); if (type==vtBool || type==vtInt) { if (hash->store==hashFloat) want = hashFloat; else if (hash->store==hashInt) want = hashInt; } else if (type==vtFloat) { if (hash->store==hashInt || hash->store==hashFloat) want =hashFloat; } else if (type==vtString) { if (hash->store==hashString) want = hashString; } } if (hash->store!=want) { hash = hash->convertStore(want); ioHash = hash; } } hash->set(inKey,value); }
void __object_hash_set(Dynamic &ioHash,Dynamic inKey,const Dynamic &value,bool inWeakKeys) { toRealObject(inKey); DynamicHashBase *hash = static_cast<DynamicHashBase *>(ioHash.GetPtr()); if (!hash) { #ifdef HX_DYNAMIC_HASH_VALUES hash = inWeakKeys ? (DynamicHashBase *)new WeakDynamicHashObject() : (DynamicHashBase *)new DynamicHashObject(); #else if (value==null()) { hash = inWeakKeys ? (DynamicHashBase *)new WeakDynamicHashObject() : (DynamicHashBase *)new DynamicHashObject(); } else { hxObjectType type = (hxObjectType)value->__GetType(); if (type==vtInt) { hash = inWeakKeys ? (DynamicHashBase *)new WeakDynamicHashInt() : (DynamicHashBase *)new DynamicHashInt(); } else if (type==vtFloat) hash = inWeakKeys ? (DynamicHashBase *)new WeakDynamicHashFloat() : (DynamicHashBase *)new DynamicHashFloat(); else if (type==vtString) hash = inWeakKeys ? (DynamicHashBase *)new WeakDynamicHashString() : (DynamicHashBase *)new DynamicHashString(); else hash = inWeakKeys ? (DynamicHashBase *)new WeakDynamicHashObject() : (DynamicHashBase *)new DynamicHashObject(); } #endif ioHash = hash; } else if (hash->store!=hashObject) { HashStore want = hashObject; if (value!=null()) { hxObjectType type = (hxObjectType)value->__GetType(); if (type==vtInt) { if (hash->store==hashFloat) want = hashFloat; else if (hash->store==hashInt) want = hashInt; } else if (type==vtFloat) { if (hash->store==hashInt || hash->store==hashFloat) want =hashFloat; } else if (type==vtString) { if (hash->store==hashString) want = hashString; } } if (hash->store!=want) { hash = hash->convertStore(want); ioHash = hash; } } ioHash.mPtr = hash->set(inKey,value); }
bool Object::__Is(Dynamic inClass ) const { return __Is(inClass.GetPtr()); }