/commonlibrary/ets_utils/js_util_module/container/queue/ |
D | js_queue.ts | 31 private isOutBounds(obj: Queue<T>, prop: string): void { 34 errorUtil.checkRangeError('index', index, 0, obj.length); 37 get(obj: Queue<T>, prop: string): T { 39 return obj[prop]; 41 this.isOutBounds(obj, prop); 42 return obj[prop]; 44 set(obj: Queue<T>, prop: any, value: T): boolean { 46 obj[prop] = value; 49 this.isOutBounds(obj, prop); 51 if (index >= 0 && index <= obj.length && Number.isInteger(index)) { [all …]
|
/commonlibrary/ets_utils/js_util_module/container/stack/ |
D | js_stack.ts | 31 private isOutBounds(obj: Stack<T>, prop: string): void { 34 errorUtil.checkRangeError('index', index, 0, obj.length - 1); 37 get(obj: Stack<T>, prop: string): T { 39 return obj[prop]; 41 this.isOutBounds(obj, prop); 42 return obj[prop]; 44 set(obj: Stack<T>, prop: any, value: T): boolean { 46 obj[prop] = value; 49 this.isOutBounds(obj, prop); 51 if (index >= 0 && index < obj.length && Number.isInteger(index)) { [all …]
|
/commonlibrary/ets_utils/js_util_module/container/vector/ |
D | js_vector.ts | 29 private isOutBounds(obj: Vector<T>, prop: string): void { 32 if (index < 0 || index >= obj.length) { 37 get(obj: Vector<T>, prop: string): T { 39 return obj[prop]; 41 this.isOutBounds(obj, prop); 42 return obj[prop]; 44 set(obj: Vector<T>, prop: any, value: T): boolean { 46 obj[prop] = value; 51 if (index < 0 || index > obj.length) { 54 obj[index] = value; [all …]
|
/commonlibrary/ets_utils/js_util_module/container/arraylist/ |
D | js_arraylist.ts | 31 private isOutBounds(obj: ArrayList<T>, prop: string): void { 34 errorUtil.checkRangeError('index', index, 0, obj.length - 1); 37 get(obj: ArrayList<T>, prop: string): T { 39 return obj[prop]; 41 this.isOutBounds(obj, prop); 42 return obj[prop]; 44 set(obj: ArrayList<T>, prop: any, value: T): boolean { 46 obj[prop] = value; 51 errorUtil.checkRangeError('index', index, 0, obj.length); 52 obj[index] = value; [all …]
|
/commonlibrary/ets_utils/js_util_module/util/src/ |
D | util_js.ts | 149 function switchLittleObject(enter: string, obj: Object, count: number): string | Object { 151 if (obj === null) { 152 str += obj; 153 } else if (obj instanceof Array) { 154 str += '[ ' + arrayToString(enter, obj, count) + '[length]: ' + obj.length + ' ]'; 155 } else if (typeof obj === 'function') { 156 str += '{ [Function: ' + obj.name + ']' + enter + 157 '[length]: ' + obj.length + ',' + enter + 158 '[name] :\'' + obj.name + '\',' + enter + 159 '[prototype]: ' + obj.name + ' { [constructor]: [Circular] } }'; [all …]
|
/commonlibrary/ets_utils/js_util_module/container/deque/ |
D | js_deque.ts | 37 get(obj: Deque<T>, prop: string): T { 39 return obj[prop]; 42 return obj[prop]; 44 set(obj: Deque<T>, prop: any, value: T): boolean { 46 obj[prop] = value; 52 obj[index] = value; 57 has(obj: Deque<T>, prop: T): boolean { 58 return obj.has(prop); 60 ownKeys(obj: Deque<T>): Array<string> { 62 for (let i: number = 0; i < obj.length; i++) { [all …]
|
/commonlibrary/ets_utils/js_util_module/container/list/ |
D | js_list.ts | 31 get(obj: List<T>, prop: string): T { 33 return obj[prop]; 37 errorUtil.checkRangeError('index', index, 0, obj.length - 1); 38 return obj.get(index); 40 return obj[prop]; 42 set(obj: List<T>, prop: string, value: T): boolean { 47 obj[prop] = value; 52 errorUtil.checkRangeError('index', index, 0, obj.length); 53 obj.set(index, value); 58 deleteProperty(obj: List<T>, prop: string): boolean { [all …]
|
/commonlibrary/ets_utils/js_concurrent_module/common/helper/ |
D | napi_helper.cpp | 68 napi_value obj = nullptr; in GetNamePropertyInParentPort() local 69 napi_get_reference_value(env, parentPort, &obj); in GetNamePropertyInParentPort() 72 napi_get_named_property(env, obj, name, &value); in GetNamePropertyInParentPort() 93 napi_value obj = nullptr; in IsCallable() local 94 napi_get_reference_value(env, value, &obj); in IsCallable() 95 if (obj == nullptr) { in IsCallable() 98 return IsCallable(env, obj); in IsCallable() 174 napi_value NapiHelper::GetNameProperty(napi_env env, napi_value obj, const char* name) in GetNameProperty() argument 177 napi_get_named_property(env, obj, name, &result); in GetNameProperty() 181 bool NapiHelper::HasNameProperty(napi_env env, napi_value obj, const char* name) in HasNameProperty() argument [all …]
|
D | error_helper.h | 128 napi_value obj = NapiHelper::CreateObject(env); in TranslateErrorEvent() local 133 napi_set_named_property(env, obj, "message", msgValue); in TranslateErrorEvent() 137 napi_set_named_property(env, obj, "backtrace", stack); in TranslateErrorEvent() 143 napi_set_named_property(env, obj, "timeStamp", timeStamp); in TranslateErrorEvent() 151 napi_set_named_property(env, obj, "filename", filenameValue); in TranslateErrorEvent() 156 napi_set_named_property(env, obj, "lineno", lineno); in TranslateErrorEvent() 161 napi_set_named_property(env, obj, "colno", colno); in TranslateErrorEvent() 167 napi_set_named_property(env, obj, "type", eventType); in TranslateErrorEvent() 170 napi_set_named_property(env, obj, "error", error); in TranslateErrorEvent() 172 return obj; in TranslateErrorEvent()
|
D | napi_helper.h | 47 static napi_value GetNameProperty(napi_env env, napi_value obj, const char* name); 48 static bool HasNameProperty(napi_env env, napi_value obj, const char* name);
|
/commonlibrary/ets_utils/js_util_module/container/linkedlist/ |
D | js_linkedlist.ts | 31 get(obj: LinkedList<T>, prop: string): T { 33 return obj[prop]; 36 let length: number = obj.length; 39 return obj.get(index); 41 return obj[prop]; 43 set(obj: LinkedList<T>, prop: string, value: T): boolean { 49 obj[prop] = value; 54 let length: number = obj.length; 56 obj.set(index, value); 61 deleteProperty(obj: LinkedList<T>, prop: string): boolean { [all …]
|
/commonlibrary/ets_utils/js_api_module/xml/src/ |
D | js_xml.ts | 56 constructor(obj: object, inputStr: string) { 57 if (typeof obj !== 'object') { 58 throw new BusinessError(`Parameter error.The type of ${obj} must be object`); 63 this.xmlSerializerClass = new XML.XmlSerializer(obj, inputType); 69 this.xmlSerializerClass = new XML.XmlSerializer(obj, inputStr); 184 constructor(obj: object, inputStr: string) { 185 if (typeof obj !== 'object') { 186 throw new BusinessError(`Parameter error.The type of ${obj} must be object`); 191 this.xmlPullParserClass = new XML.XmlPullParser(obj, str); 198 this.xmlPullParserClass = new XML.XmlPullParser(obj, inputStr);
|
/commonlibrary/ets_utils/js_util_module/container/lightweightset/ |
D | js_lightweightset.ts | 64 add(obj: T): boolean { 66 if (this.members.keys.indexOf(obj) > 0) { 69 this.addmember(obj); 103 equal(obj: Object): boolean { 108 if (obj instanceof LightWeightSet) { 109 return JSON.stringify(obj.members.keys) === JSON.stringify(this.members.keys); 111 if (JSON.stringify(obj) === JSON.stringify(this.members.keys)) {
|
/commonlibrary/ets_utils/js_api_module/xml/ |
D | js_xml.cpp | 1702 void *obj = nullptr; in GetColumnNumber() local 1704 NAPI_CALL(env, napi_unwrap(env, mainVar, &obj)); in GetColumnNumber() 1706 if (obj != nullptr) { in GetColumnNumber() 1707 int temp = (reinterpret_cast<XmlPullParser *>(obj))->GetColumnNumber(); in GetColumnNumber() 1718 void *obj = nullptr; in GetDepth() local 1720 NAPI_CALL(env, napi_unwrap(env, mainVar, &obj)); in GetDepth() 1722 if (obj != nullptr) { in GetDepth() 1723 int temp = (reinterpret_cast<XmlPullParser *>(obj))->GetDepth(); in GetDepth() 1734 void *obj = nullptr; in GetLineNumber() local 1736 NAPI_CALL(env, napi_unwrap(env, mainVar, &obj)); in GetLineNumber() [all …]
|
D | native_module_xml.cpp | 68 auto obj = reinterpret_cast<XmlSerializer*>(data); in XmlSerializerConstructor() local 69 if (obj != nullptr) { in XmlSerializerConstructor() 70 delete obj; in XmlSerializerConstructor() 125 auto obj = reinterpret_cast<XmlPullParser*>(data); in XmlPullParserConstructor() local 126 if (obj != nullptr) { in XmlPullParserConstructor() 127 delete obj; in XmlPullParserConstructor()
|
/commonlibrary/ets_utils/js_concurrent_module/worker/ |
D | worker.cpp | 270 napi_value obj = NapiHelper::GetReferenceValue(hostEnv_, workerRef_); in HostOnErrorInner() local 271 napi_value callback = NapiHelper::GetNameProperty(hostEnv_, obj, "onerror"); in HostOnErrorInner() 281 napi_call_function(hostEnv_, obj, callback, 1, argv, &callbackResult); in HostOnErrorInner() 284 HandleEventListeners(hostEnv_, obj, 1, argv, "error"); in HostOnErrorInner() 353 napi_value obj = NapiHelper::GetReferenceValue(hostEnv_, workerRef_); in CloseHostCallback() local 355 HandleEventListeners(hostEnv_, obj, 1, argv, "exit"); in CloseHostCallback() 399 napi_value obj = NapiHelper::GetReferenceValue(hostEnv_, workerRef_); in HostOnMessageInner() local 400 napi_value callback = NapiHelper::GetNameProperty(hostEnv_, obj, "onmessage"); in HostOnMessageInner() 440 napi_call_function(hostEnv_, obj, callback, 1, argv, &callbackResult); in HostOnMessageInner() 443 HandleEventListeners(hostEnv_, obj, 1, argv, "message"); in HostOnMessageInner() [all …]
|
D | worker_new.cpp | 453 napi_value obj = NapiHelper::GetReferenceValue(env, worker->workerRef_); in DispatchEvent() local 461 NewCallWorkCallback(env, obj, 1, args, "onerror"); in DispatchEvent() 463 NewCallWorkCallback(env, obj, 1, args, "onmessageerror"); in DispatchEvent() 465 NewCallWorkCallback(env, obj, 1, args, "onmessage"); in DispatchEvent() 468 worker->HandleEventListeners(env, obj, 1, args, typeStr); in DispatchEvent() 669 napi_value obj = NapiHelper::GetReferenceValue(env, worker->workerPort_); in WorkerPortDispatchEvent() local 672 NewCallWorkCallback(env, obj, 1, args, "onerror"); in WorkerPortDispatchEvent() 674 NewCallWorkCallback(env, obj, 1, args, "onmessageerror"); in WorkerPortDispatchEvent() 676 NewCallWorkCallback(env, obj, 1, args, "onmessage"); in WorkerPortDispatchEvent() 679 worker->ParentPortHandleEventListeners(env, obj, 1, args, typeStr, true); in WorkerPortDispatchEvent() [all …]
|
D | worker.h | 77 napi_value obj = NapiHelper::GetReferenceValue(env_, ref_); in operator() local 79 return NapiHelper::StrictEqual(env_, compareObj, obj); in operator()
|
D | worker_new.h | 77 napi_value obj = NapiHelper::GetReferenceValue(env_, ref_); in operator() local 79 return NapiHelper::StrictEqual(env_, compareObj, obj); in operator()
|
/commonlibrary/ets_utils/js_api_module/convertxml/ |
D | native_module_convertxml.cpp | 35 auto obj = reinterpret_cast<ConvertXml*>(data); in ConvertXmlConstructor() local 36 if (obj != nullptr) { in ConvertXmlConstructor() 37 delete obj; in ConvertXmlConstructor()
|
/commonlibrary/ets_utils/js_api_module/convertxml/test/ |
D | test_convertxml.cpp | 29 napi_value setProperty(napi_env env, napi_value obj, std::vector<std::string> proVec) in setProperty() argument 36 napi_set_named_property(env, obj, proVec[i].c_str(), val); in setProperty() 40 napi_set_named_property(env, obj, proVec[i].c_str(), val); in setProperty() 44 return obj; in setProperty() 403 napi_value obj = nullptr; variable 404 napi_create_object(env, &obj); 412 obj = setProperty(env, obj, proVec); 414 convertXml.DealOptions(env, obj); 416 napi_has_named_property(env, obj, "textKey", &isHas); 442 napi_value obj = nullptr; variable [all …]
|
/commonlibrary/memory_utils/libpurgeablemem/c/src/ |
D | purgeable_mem_c.c | 42 static inline void LogPurgMemInfo(struct PurgMem *obj) in LogPurgMemInfo() argument 46 (unsigned long)obj, (unsigned long)(obj->dataPtr), obj->dataSizeInput, in LogPurgMemInfo() 47 (unsigned long)(obj->builder), (unsigned long)(obj->uxPageTable)); in LogPurgMemInfo()
|
/commonlibrary/ets_utils/js_api_module/buffer/src/ |
D | js_buffer.ts | 16 function getTypeName(obj: unknown): string { 17 if (obj === null) { 20 if (typeof obj !== 'object') { 21 return typeof obj; 23 if (obj != null && obj.constructor != null) { 24 return obj.constructor.name; 450 get(obj: Buffer, prop: string): number | undefined { 452 if (prop >= obj.length) { 453 return obj[prop]; 455 return obj[bufferSymbol].get(prop); [all …]
|
/commonlibrary/ets_utils/js_api_module/url/src/ |
D | js_url.ts | 118 return arr.reduce((obj, val, index) => { 120 obj[val] = [arr[index + 1]]; 122 if (obj[arr[index - 1]]) { 123 obj[arr[index - 1]].push(val); 126 return obj;
|
/commonlibrary/ets_utils/js_api_module/uri/ |
D | native_module_uri.cpp | 49 auto obj = reinterpret_cast<Uri*>(data); in UriConstructor() local 50 if (obj != nullptr) { in UriConstructor() 51 delete obj; in UriConstructor()
|