Home
last modified time | relevance | path

Searched refs:instance_ (Results 1 – 25 of 127) sorted by relevance

123456

/base/usb/usb_manager/utils/native/include/
Ddelayed_sp_singleton.h41 static sptr<T> instance_;
45 template <typename T> sptr<T> DelayedSpSingleton<T>::instance_ = nullptr;
51 if (instance_ != nullptr) { in GetInstance()
52 return instance_; in GetInstance()
56 if (instance_ == nullptr) { in GetInstance()
57 instance_ = new(std::nothrow) T(); in GetInstance()
58 if (instance_ == nullptr) { in GetInstance()
63 return instance_; in GetInstance()
69 if (instance_) { in DestroyInstance()
70 instance_.clear(); in DestroyInstance()
[all …]
/base/hiviewdfx/hidumper/interfaces/native/innerkits/include/
Ddelayed_sp_singleton.h28 static sptr<T> instance_;
33 sptr<T> DumpDelayedSpSingleton<T>::instance_ = nullptr;
42 if (instance_) { in DestroyInstance()
43 instance_.clear(); in DestroyInstance()
44 instance_ = nullptr; in DestroyInstance()
51 if (!instance_) { in GetInstance()
53 if (instance_ == nullptr) { in GetInstance()
54 instance_ = new T(); in GetInstance()
57 return instance_; in GetInstance()
/base/powermgr/display_manager/utils/native/include/
Ddelayed_sp_singleton.h34 static sptr<T> instance_;
39 sptr<T> DelayedSpSingleton<T>::instance_ = nullptr;
47 if (!instance_) { in GetInstance()
49 if (instance_ == nullptr) { in GetInstance()
50 instance_ = new T(); in GetInstance()
54 return instance_; in GetInstance()
61 if (instance_) { in DestroyInstance()
62 instance_.clear(); in DestroyInstance()
63 instance_ = nullptr; in DestroyInstance()
/base/powermgr/power_manager/utils/native/include/
Dsp_singleton.h40 static sptr<T> instance_;
45 sptr<T> DelayedSpSingleton<T>::instance_ = nullptr;
53 if (!instance_) { in GetInstance()
55 if (instance_ == nullptr) { in GetInstance()
56 instance_ = new T(); in GetInstance()
60 return instance_; in GetInstance()
67 if (instance_) { in DestroyInstance()
68 instance_.clear(); in DestroyInstance()
69 instance_ = nullptr; in DestroyInstance()
/base/powermgr/thermal_manager/utils/native/include/
Ddelayed_sp_singleton.h40 static sptr<T> instance_;
45 sptr<T> DelayedSpSingleton<T>::instance_ = nullptr;
53 if (!instance_) { in GetInstance()
55 if (instance_ == nullptr) { in GetInstance()
56 instance_ = new T(); in GetInstance()
60 return instance_; in GetInstance()
67 if (instance_) { in DestroyInstance()
68 instance_.clear(); in DestroyInstance()
69 instance_ = nullptr; in DestroyInstance()
/base/sensors/sensor/utils/common/include/
Dsensor_delayed_sp_singleton.h40 static sptr<T> instance_;
45 sptr<T> SensorDelayedSpSingleton<T>::instance_ = nullptr;
54 if (!instance_) { in GetInstance()
55 if (instance_ == nullptr) { in GetInstance()
56 instance_ = new T(); in GetInstance()
59 return instance_; in GetInstance()
66 if (instance_) { in DestroyInstance()
67 instance_.clear(); in DestroyInstance()
68 instance_ = nullptr; in DestroyInstance()
/base/powermgr/battery_statistics/utils/native/include/
Ddelayed_stats_sp_singleton.h41 static sptr<T> instance_;
46 sptr<T> DelayedStatsSpSingleton<T>::instance_ = nullptr;
54 if (!instance_) { in GetInstance()
56 if (instance_ == nullptr) { in GetInstance()
57 instance_ = new T(); in GetInstance()
61 return instance_; in GetInstance()
68 if (instance_) { in DestroyInstance()
69 instance_.clear(); in DestroyInstance()
70 instance_ = nullptr; in DestroyInstance()
/base/powermgr/battery_manager/utils/native/include/
Dsp_singleton.h40 static sptr<T> instance_;
45 sptr<T> DelayedSpSingleton<T>::instance_ = nullptr;
53 if (!instance_) { in GetInstance()
55 if (instance_ == nullptr) { in GetInstance()
56 instance_ = new T(); in GetInstance()
60 return instance_; in GetInstance()
67 if (instance_) { in DestroyInstance()
68 instance_.clear(); in DestroyInstance()
69 instance_ = nullptr; in DestroyInstance()
/base/sensors/miscdevice/utils/include/
Dmiscdevice_delayed_sp_singleton.h40 static sptr<T> instance_;
45 sptr<T> MiscdeviceDelayedSpSingleton<T>::instance_ = nullptr;
54 if (!instance_) { in GetInstance()
55 if (instance_ == nullptr) { in GetInstance()
56 instance_ = new T(); in GetInstance()
59 return instance_; in GetInstance()
66 if (instance_) { in DestroyInstance()
67 instance_.clear(); in DestroyInstance()
68 instance_ = nullptr; in DestroyInstance()
/base/msdp/device_status/utils/common/include/
Ddevicestatus_delayed_sp_singleton.h42 static sptr<T> instance_;
47 sptr<T> DelayedSpSingleton<T>::instance_ { nullptr };
55 if (instance_ == nullptr) { in GetInstance()
57 if (instance_ == nullptr) { in GetInstance()
58 instance_ = new T(); in GetInstance()
62 return instance_; in GetInstance()
69 if (instance_ != nullptr) { in DestroyInstance()
70 instance_.clear(); in DestroyInstance()
71 instance_ = nullptr; in DestroyInstance()
/base/location/frameworks/native/source/
Dlocator.cpp21 std::shared_ptr<LocatorImpl> Locator::instance_ = nullptr; member in OHOS::Location::Locator
28 if (instance_ == nullptr) { in GetInstance()
30 if (instance_ == nullptr) { in GetInstance()
32 instance_ = locator; in GetInstance()
35 return instance_; in GetInstance()
/base/customization/enterprise_device_management/interfaces/inner_api/usb_manager/src/
Dusb_manager_proxy.cpp25 std::shared_ptr<UsbManagerProxy> UsbManagerProxy::instance_ = nullptr; member in OHOS::EDM::UsbManagerProxy
31 if (instance_ == nullptr) { in GetUsbManagerProxy()
33 if (instance_ == nullptr) { in GetUsbManagerProxy()
35 instance_ = temp; in GetUsbManagerProxy()
38 return instance_; in GetUsbManagerProxy()
/base/customization/enterprise_device_management/interfaces/inner_api/account_manager/src/
Daccount_manager_proxy.cpp23 std::shared_ptr<AccountManagerProxy> AccountManagerProxy::instance_ = nullptr; member in OHOS::EDM::AccountManagerProxy
33 if (instance_ == nullptr) { in GetAccountManagerProxy()
35 if (instance_ == nullptr) { in GetAccountManagerProxy()
37 instance_ = temp; in GetAccountManagerProxy()
40 return instance_; in GetAccountManagerProxy()
/base/useriam/fingerprint_auth/services/src/
Dfingerprint_auth_service.cpp67 std::shared_ptr<FingerprintAuthService> FingerprintAuthService::instance_ = nullptr; member in OHOS::UserIam::FingerprintAuth::FingerprintAuthService
75 if (instance_ == nullptr) { in GetInstance()
77 if (instance_ == nullptr) { in GetInstance()
78 instance_ = Common::MakeShared<FingerprintAuthService>(); in GetInstance()
79 if (instance_ == nullptr) { in GetInstance()
84 return instance_; in GetInstance()
/base/customization/enterprise_device_management/interfaces/inner_api/device_control/src/
Ddevice_control_proxy.cpp23 std::shared_ptr<DeviceControlProxy> DeviceControlProxy::instance_ = nullptr; member in OHOS::EDM::DeviceControlProxy
33 if (instance_ == nullptr) { in GetDeviceControlProxy()
35 if (instance_ == nullptr) { in GetDeviceControlProxy()
37 instance_ = temp; in GetDeviceControlProxy()
40 return instance_; in GetDeviceControlProxy()
/base/account/os_account/test/systemtest/common/resource/fuzzTest/include/
Dfuzz_test_manager.h35 if (instance_ == nullptr) { in GetInstance()
36 instance_ = std::make_shared<FuzzTestManager>(); in GetInstance()
38 return instance_; in GetInstance()
49 static Ptr instance_; variable
/base/customization/enterprise_device_management/interfaces/inner_api/restrictions/src/
Drestrictions_proxy.cpp23 std::shared_ptr<RestrictionsProxy> RestrictionsProxy::instance_ = nullptr; member in OHOS::EDM::RestrictionsProxy
29 if (instance_ == nullptr) { in GetRestrictionsProxy()
31 if (instance_ == nullptr) { in GetRestrictionsProxy()
33 instance_ = temp; in GetRestrictionsProxy()
36 return instance_; in GetRestrictionsProxy()
/base/useriam/pin_auth/services/sa/src/
Dpin_auth_service.cpp42 std::shared_ptr<PinAuthService> PinAuthService::instance_ = nullptr; member in OHOS::UserIam::PinAuth::PinAuthService
50 if (instance_ == nullptr) { in GetInstance()
52 if (instance_ == nullptr) { in GetInstance()
53 instance_ = Common::MakeShared<PinAuthService>(); in GetInstance()
54 if (instance_ == nullptr) { in GetInstance()
59 return instance_; in GetInstance()
/base/update/updateservice/interfaces/inner_api/engine/
Dupdate_service_ondemand.cpp20 sptr<UpdateServiceOnDemand> UpdateServiceOnDemand::instance_ = nullptr; member in OHOS::UpdateEngine::UpdateServiceOnDemand
25 if (instance_ == nullptr) { in GetInstance()
27 if (instance_ == nullptr) { in GetInstance()
28 instance_ = new UpdateServiceOnDemand(); in GetInstance()
31 return instance_; in GetInstance()
/base/customization/enterprise_device_management/interfaces/inner_api/datetime_manager/src/
Ddatetime_manager_proxy.cpp23 std::shared_ptr<DatetimeManagerProxy> DatetimeManagerProxy::instance_ = nullptr; member in OHOS::EDM::DatetimeManagerProxy
33 if (instance_ == nullptr) { in GetDatetimeManagerProxy()
35 if (instance_ == nullptr) { in GetDatetimeManagerProxy()
37 instance_ = temp; in GetDatetimeManagerProxy()
40 return instance_; in GetDatetimeManagerProxy()
/base/account/os_account/services/accountmgr/include/
Diaccount_context.h27 return IAccountContext::instance_; in GetInstance()
37 IAccountContext::instance_ = instance; in SetInstance()
41 static IAccountContext *instance_;
/base/theme/screenlock_mgr/frameworks/native/src/
Dscreenlock_app_manager.cpp29 sptr<ScreenLockAppManager> ScreenLockAppManager::instance_; member in OHOS::ScreenLock::ScreenLockAppManager
44 if (instance_ == nullptr) { in GetInstance()
46 if (instance_ == nullptr) { in GetInstance()
47 instance_ = new ScreenLockAppManager; in GetInstance()
48 std::lock_guard<std::mutex> guard(instance_->managerProxyLock_); in GetInstance()
49 instance_->screenlockManagerProxy_ = GetScreenLockManagerProxy(); in GetInstance()
52 return instance_; in GetInstance()
Dscreenlock_manager.cpp31 sptr<ScreenLockManager> ScreenLockManager::instance_; member in OHOS::ScreenLock::ScreenLockManager
44 if (instance_ == nullptr) { in GetInstance()
46 if (instance_ == nullptr) { in GetInstance()
47 instance_ = new ScreenLockManager; in GetInstance()
48 std::lock_guard<std::mutex> guard(instance_->managerProxyLock_); in GetInstance()
49 instance_->screenlockManagerProxy_ = GetScreenLockManagerProxy(); in GetInstance()
52 return instance_; in GetInstance()
/base/useriam/face_auth/services/src/
Dface_auth_service.cpp68 std::shared_ptr<FaceAuthService> FaceAuthService::instance_ = nullptr; member in OHOS::UserIam::FaceAuth::FaceAuthService
76 if (instance_ == nullptr) { in GetInstance()
78 if (instance_ == nullptr) { in GetInstance()
79 instance_ = Common::MakeShared<FaceAuthService>(); in GetInstance()
80 if (instance_ == nullptr) { in GetInstance()
85 return instance_; in GetInstance()
/base/security/device_security_level/test/dslm_unit_test/cmocker/
Dc_mocker.h34 EXPECT_EQ(instance_, nullptr); in CMocker()
35 instance_ = static_cast<T *>(this); in CMocker()
41 EXPECT_EQ(instance_, this); in ~CMocker()
42 instance_ = nullptr; in ~CMocker()
46 return instance_; in GetInstance()
55 static T *instance_;
60 T *CMocker<T>::instance_ = nullptr;

123456