Home
last modified time | relevance | path

Searched refs:defaultValue (Results 1 – 25 of 111) sorted by relevance

12345

/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/state_mgmt/src/lib/sdk/
Dpersistent_storage.ts82 public static persistProp<T>(key: string, defaultValue: T): void {
83 PersistentStorage.getOrCreate().persistProp(key, defaultValue);
90 public static PersistProp<T>(key: string, defaultValue: T): void {
91 PersistentStorage.getOrCreate().persistProp(key, defaultValue);
125 defaultValue: any
136 defaultValue: any
213 private persistProp<T>(propName: string, defaultValue: T): void {
214 if (this.persistProp1(propName, defaultValue)) {
224 private persistProp1<T>(propName: string, defaultValue: T): boolean {
225 stateMgmtConsole.debug(`PersistentStorage: persistProp1 ${propName} ${defaultValue}`);
[all …]
Dapp_storage.ts89 …public static setAndLink<T>(key: string, defaultValue: T, linkUser?: IPropertySubscriber, subscrib…
90 return AppStorage.getOrCreate().setAndLink(key, defaultValue, linkUser, subscribersName);
98 …public static SetAndLink<T>(key: string, defaultValue: T, linkUser?: IPropertySubscriber, subscrib…
99 return AppStorage.getOrCreate().setAndLink(key, defaultValue, linkUser, subscribersName);
145 …public static setAndProp<S>(key: string, defaultValue: S, propUser?: IPropertySubscriber, subscrib…
146 return AppStorage.getOrCreate().setAndProp(key, defaultValue, propUser, subscribersName);
154 …public static SetAndProp<S>(key: string, defaultValue: S, propUser?: IPropertySubscriber, subscrib…
155 return AppStorage.getOrCreate().setAndProp(key, defaultValue, propUser, subscribersName);
464 public static __createSync<T>(storagePropName: string, defaultValue: T,
466 return AppStorage.getOrCreate().__createSync(storagePropName, defaultValue, factoryFunc);
Dlocal_storage.ts256 …public setAndLink<T>(propName: string, defaultValue: T, linkUser?: IPropertySubscriber, subscriber…
259 this.setOrCreate(propName, defaultValue);
309 …public setAndProp<T>(propName: string, defaultValue: T, propUser?: IPropertySubscriber, subscriber…
312 this.setOrCreate(propName, defaultValue);
435 public __createSync<T>(storagePropName: string, defaultValue: T,
442 if (defaultValue === undefined) {
447 p = this.addNewPropertyInternal<T>(storagePropName, defaultValue);
Denvironment.ts82 defaultValue: any
94 defaultValue: any
162 defaultValue: any
165 this.envProp(property.key, property.defaultValue);
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/state_mgmt/src/utest/common/
Denvironment_test.ts18 var envProps : { key: string, defaultValue: boolean | number | string }[] = [
19 …{ key: "accessibilityEnabled", defaultValue: (mockEnv.getAccessibilityEnabled() == "true") }, // b…
20 { key: "colorMode", defaultValue: mockEnv.getColorMode() },
21 { key: "fontScale", defaultValue: mockEnv.getFontScale() },
22 { key: "fontWeightScale", defaultValue: mockEnv.getFontWeightScale() },
23 { key: "layoutDirection", defaultValue: mockEnv.getLayoutDirection() },
24 { key: "languageCode", defaultValue: mockEnv.getLanguageCode() }
Dpersistent_storage_test.ts33 defaultValue: "Terve"
36 defaultValue: "Maailma"
46 defaultValue: ""
49 defaultValue: 10
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/common/
Ddistributeddb_schema_unit_test.cpp63 EXPECT_EQ(res.defaultValue.stringValue, check.defaultValue.stringValue); in CheckSchemaAttribute()
64 EXPECT_EQ(memcmp(&res.defaultValue, &check.defaultValue, 8), 0); // only check this unit 8 byte in CheckSchemaAttribute()
71 attributeRes.defaultValue.integerValue = 0; in PreNumDataForParseAndCheckSchemaAttribute003()
79 attributeRes1.defaultValue.integerValue = INT32_MAX; in PreNumDataForParseAndCheckSchemaAttribute003()
85 attributeRes2.defaultValue.integerValue = 0; in PreNumDataForParseAndCheckSchemaAttribute003()
91 attributeRes3.defaultValue.longValue = 0; in PreNumDataForParseAndCheckSchemaAttribute003()
98 attributeRes4.defaultValue.longValue = LONG_MAX; in PreNumDataForParseAndCheckSchemaAttribute003()
107 attributeRes5.defaultValue.stringValue = "11ada%$%"; in PreStringDataForParseAndCheckSchemaAttribute003()
114 attributeRes6.defaultValue.stringValue = "asdasd_\n\t"; in PreStringDataForParseAndCheckSchemaAttribute003()
123 attributeRes7.defaultValue.doubleValue = 0; in PreDoubleDataForParseAndCheckSchemaAttribute003()
[all …]
/foundation/window/window_manager/utils/include/
Dclass_var_definition.h29 #define DEFINE_VAR_DEFAULT(type, memberName, defaultValue) \ argument
31 type memberName##_ {defaultValue};
80 #define DEFINE_VAR_DEFAULT_FUNC_GET(type, funcName, memberName, defaultValue) \ argument
81 DEFINE_VAR_DEFAULT(type, memberName, defaultValue) \
84 #define DEFINE_VAR_DEFAULT_FUNC_SET(type, funcName, memberName, defaultValue) \ argument
85 DEFINE_VAR_DEFAULT(type, memberName, defaultValue) \
98 #define DEFINE_VAR_DEFAULT_FUNC_GET_SET(type, funcName, memberName, defaultValue) \ argument
99 DEFINE_VAR_DEFAULT(type, memberName, defaultValue) \
Dfuture.h64 void Reset(T defaultValue) in Reset() argument
67 result_ = defaultValue; in Reset()
69 void ResetLock(T defaultValue) in ResetLock() argument
73 result_ = defaultValue; in ResetLock()
/foundation/filemanagement/user_file_service/interfaces/inner_api/file_access/src/
Dnapi_common_fileaccess.cpp32 uint32_t UnwrapUint32FromJS(napi_env env, napi_value param, uint32_t defaultValue) in UnwrapUint32FromJS() argument
34 uint32_t value = defaultValue; in UnwrapUint32FromJS()
38 return defaultValue; in UnwrapUint32FromJS()
68 uint64_t UnwrapBigIntUint64FromJS(napi_env env, napi_value param, uint64_t defaultValue) in UnwrapBigIntUint64FromJS() argument
71 uint64_t value = defaultValue; in UnwrapBigIntUint64FromJS()
75 return defaultValue; in UnwrapBigIntUint64FromJS()
79 bool UnwrapBigIntUint64FromJS2(napi_env env, napi_value param, uint64_t &defaultValue) in UnwrapBigIntUint64FromJS2() argument
82 if (napi_get_value_bigint_uint64(env, param, &defaultValue, &lossless) == napi_ok) { in UnwrapBigIntUint64FromJS2()
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/
Ddb_properties.cpp33 std::string DBProperties::GetStringProp(const std::string &name, const std::string &defaultValue) c… in GetStringProp()
39 return defaultValue; in GetStringProp()
47 bool DBProperties::GetBoolProp(const std::string &name, bool defaultValue) const in GetBoolProp()
53 return defaultValue; in GetBoolProp()
61 int DBProperties::GetIntProp(const std::string &name, int defaultValue) const in GetIntProp()
67 return defaultValue; in GetIntProp()
/foundation/resourceschedule/memmgr/common/src/
Dxml_helper.cpp48 std::string key, int &dst, int defaultValue) in SetIntParam() argument
50 dst = defaultValue; in SetIntParam()
68 std::string key, unsigned int &dst, unsigned int defaultValue) in SetUnsignedIntParam() argument
70 dst = defaultValue; in SetUnsignedIntParam()
76 src = defaultValue; in SetUnsignedIntParam()
133 std::string key, std::string &dst, std::string defaultValue) in SetStringParam() argument
136 dst = defaultValue; in SetStringParam()
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/
Djs_particle.cpp88 std::optional<std::pair<float, float>> ParseParticleRange(JSRef<JSVal>& jsValue, float defaultValue) in ParseParticleRange() argument
91 auto defaultPair = std::pair<float, float>(defaultValue, defaultValue); in ParseParticleRange()
101 auto from = defaultValue; in ParseParticleRange()
105 auto to = defaultValue; in ParseParticleRange()
133 …ParticlePropertyAnimation<float>>& particleAnimationFloatArray, float defaultValue, float minValue, in ParseAnimationFloatArray() argument
145 float from = defaultValue; in ParseAnimationFloatArray()
149 from = defaultValue; in ParseAnimationFloatArray()
152 from = defaultValue; in ParseAnimationFloatArray()
157 float to = defaultValue; in ParseAnimationFloatArray()
161 to = defaultValue; in ParseAnimationFloatArray()
[all …]
/foundation/resourceschedule/memmgr/common/include/
Dxml_helper.h37 std::string key, int &dst, int defaultValue);
39 std::string key, unsigned int &dst, unsigned int defaultValue);
41 std::string key, std::string &dst, std::string defaultValue);
/foundation/filemanagement/user_file_service/interfaces/inner_api/file_access/include/
Dnapi_common_fileaccess.h31 uint32_t UnwrapUint32FromJS(napi_env env, napi_value param, uint32_t defaultValue = 0);
36 uint64_t UnwrapBigIntUint64FromJS(napi_env env, napi_value param, uint64_t defaultValue = 0);
37 bool UnwrapBigIntUint64FromJS2(napi_env env, napi_value param, uint64_t &defaultValue);
/foundation/bundlemanager/bundle_framework/interfaces/kits/js/zip/napi/
Dnapi_zlib_common.cpp37 std::string UnwrapStringFromJS(napi_env env, napi_value param, const std::string &defaultValue) in UnwrapStringFromJS() argument
41 return defaultValue; in UnwrapStringFromJS()
46 return defaultValue; in UnwrapStringFromJS()
63 value = defaultValue; in UnwrapStringFromJS()
/foundation/communication/dsoftbus/core/connection/wifi_direct/data/
Dinfo_container.h85 … int32_t (*getInt)(struct type *self, size_t key, int32_t defaultValue); \
86 … bool (*getBoolean)(struct type *self, size_t key, bool defaultValue); \
87 … void* (*getPointer)(struct type *self, size_t key, void *defaultValue); \
88 … char* (*getString)(struct type *self, size_t key, const char *defaultValue); \
91 … void* (*getRawData)(struct type *self, size_t key, size_t *size, void *defaultValue); \
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/include/
Ddb_properties.h28 std::string GetStringProp(const std::string &name, const std::string &defaultValue) const;
34 bool GetBoolProp(const std::string &name, bool defaultValue) const;
40 int GetIntProp(const std::string &name, int defaultValue) const;
/foundation/filemanagement/file_api/utils/filemgmt_libn/src/
Dn_val.cpp79 tuple<bool, unique_ptr<char[]>, size_t> NVal::ToUTF8String(string defaultValue) const in ToUTF8String()
82 auto str = CreateUniquePtr<char[]>(defaultValue.size() + 1); in ToUTF8String()
86 copy(defaultValue.begin(), defaultValue.end(), str.get()); in ToUTF8String()
87 str[defaultValue.size()] = '\0'; in ToUTF8String()
88 return make_tuple(true, move(str), defaultValue.size()); in ToUTF8String()
134 tuple<bool, bool> NVal::ToBool(bool defaultValue) const in ToBool()
137 return make_tuple(true, defaultValue); in ToBool()
149 tuple<bool, int32_t> NVal::ToInt32(int32_t defaultValue) const in ToInt32()
152 return make_tuple(true, defaultValue); in ToInt32()
164 tuple<bool, int64_t> NVal::ToInt64(int64_t defaultValue) const in ToInt64()
[all …]
/foundation/filemanagement/file_api/interfaces/kits/js/src/common/napi/
Dn_val.cpp75 tuple<bool, unique_ptr<char[]>, size_t> NVal::ToUTF8String(string_view defaultValue) const in ToUTF8String()
78 auto str = make_unique<char[]>(defaultValue.size() + 1); in ToUTF8String()
79 copy(defaultValue.begin(), defaultValue.end(), str.get()); in ToUTF8String()
80 return make_tuple(true, move(str), defaultValue.size()); in ToUTF8String()
123 tuple<bool, bool> NVal::ToBool(bool defaultValue) const in ToBool()
126 return make_tuple(true, defaultValue); in ToBool()
138 tuple<bool, int32_t> NVal::ToInt32(int32_t defaultValue) const in ToInt32()
141 return make_tuple(true, defaultValue); in ToInt32()
153 tuple<bool, int64_t> NVal::ToInt64(int64_t defaultValue) const in ToInt64()
156 return make_tuple(true, defaultValue); in ToInt64()
Dn_val.h44 …std::tuple<bool, std::unique_ptr<char[]>, size_t> ToUTF8String(std::string_view defaultValue) cons…
48 std::tuple<bool, bool> ToBool(bool defaultValue) const;
50 std::tuple<bool, int32_t> ToInt32(int32_t defaultValue) const;
52 std::tuple<bool, int64_t> ToInt64(int64_t defaultValue) const;
/foundation/arkui/ace_engine/interfaces/napi/kits/plugincomponent/
Djs_plugin_util.h34 int AceUnwrapInt32FromJS(napi_env env, napi_value param, int defaultValue = 0);
38 int64_t AceUnwrapLongFromJS(napi_env env, napi_value param, int64_t defaultValue = 0);
42 int64_t AceUnwrapInt64FromJS(napi_env env, napi_value param, int64_t defaultValue = 0);
46 bool AceUnWrapBoolFromJS(napi_env env, napi_value param, bool defaultValue = false);
50 double AceUnWrapDoubleFromJS(napi_env env, napi_value param, double defaultValue = 0.0);
54 std::string AceUnwrapStringFromJS(napi_env env, napi_value param, const std::string& defaultValue =…
/foundation/ability/ability_runtime/frameworks/js/napi/inner/napi_common/
Dnapi_common_util.h38 int UnwrapInt32FromJS(napi_env env, napi_value param, int defaultValue = 0);
42 long UnwrapLongFromJS(napi_env env, napi_value param, long defaultValue = 0);
46 int64_t UnwrapInt64FromJS(napi_env env, napi_value param, int64_t defaultValue = 0);
50 bool UnWrapBoolFromJS(napi_env env, napi_value param, bool defaultValue = false);
54 double UnWrapDoubleFromJS(napi_env env, napi_value param, double defaultValue = 0.0);
58 std::string UnwrapStringFromJS(napi_env env, napi_value param, const std::string &defaultValue = ""…
/foundation/filemanagement/file_api/utils/filemgmt_libn/include/
Dn_val.h47 std::tuple<bool, std::unique_ptr<char[]>, size_t> ToUTF8String(std::string defaultValue) const;
51 std::tuple<bool, bool> ToBool(bool defaultValue) const;
53 std::tuple<bool, int32_t> ToInt32(int32_t defaultValue) const;
55 std::tuple<bool, int64_t> ToInt64(int64_t defaultValue) const;
/foundation/ability/ability_base/test/unittest/want/
Dwant_test.cpp1986 byte defaultValue = std::get<3>(GetParam()); variable
1989 EXPECT_EQ(result, want_->GetByteParam(getKey, defaultValue));
2038 std::vector<bool> defaultValue = std::get<3>(GetParam()); variable
2093 std::vector<zchar> defaultValue = std::get<3>(GetParam()); variable
2112 std::vector<zchar> defaultValue; variable
2114 EXPECT_EQ(defaultValue, want_->GetCharArrayParam(getKey));
2132 std::vector<zchar> defaultValue; variable
2133 EXPECT_EQ(defaultValue, want_->GetCharArrayParam(keyStr));
2148 std::vector<zchar> defaultValue; variable
2155 EXPECT_EQ(defaultValue, want_->GetCharArrayParam(secondKey));
[all …]

12345