Home
last modified time | relevance | path

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

1234

/base/hiviewdfx/hiview/adapter/utility/include/extra/
Dsingleton.h54 static std::shared_ptr<T> instance_;
59 std::shared_ptr<T> DelayedSingleton<T>::instance_ = nullptr;
67 if (instance_ == nullptr) { in GetInstance()
69 if (instance_ == nullptr) { in GetInstance()
70 instance_ = std::make_shared<T>(); in GetInstance()
74 return instance_; in GetInstance()
81 if (instance_ != nullptr) { in DestroyInstance()
82 instance_.reset(); in DestroyInstance()
83 instance_ = nullptr; in DestroyInstance()
93 static T* instance_;
[all …]
/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/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/hiviewdfx/hidumper/interfaces/native/innerkits/include/
Ddelayed_sp_singleton.h28 static sptr<T> instance_;
33 sptr<T> DelayedSpSingleton<T>::instance_ = nullptr;
41 if (!instance_) { in GetInstance()
43 if (instance_ == nullptr) { in GetInstance()
44 instance_ = new T(); in GetInstance()
47 return instance_; in GetInstance()
54 if (instance_) { in DestroyInstance()
55 instance_.clear(); in DestroyInstance()
56 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/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/msdp/device_status/utils/include/
Ddevicestatus_delayed_sp_singleton.h41 static sptr<T> instance_;
46 sptr<T> DelayedSpSingleton<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/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/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/theme/screenlock_mgr/frameworks/kitsimpl/src/
Dscreenlock_app_manager.cpp27 sptr<ScreenLockAppManager> ScreenLockAppManager::instance_; member in OHOS::ScreenLock::ScreenLockAppManager
42 if (instance_ == nullptr) { in GetInstance()
44 if (instance_ == nullptr) { in GetInstance()
45 instance_ = new ScreenLockAppManager; in GetInstance()
46 std::lock_guard<std::mutex> guard(instance_->managerProxyLock_); in GetInstance()
47 instance_->screenlockManagerProxy_ = GetScreenLockManagerProxy(); in GetInstance()
50 return instance_; in GetInstance()
Dscreenlock_manager.cpp29 sptr<ScreenLockManager> ScreenLockManager::instance_; member in OHOS::ScreenLock::ScreenLockManager
42 if (instance_ == nullptr) { in GetInstance()
44 if (instance_ == nullptr) { in GetInstance()
45 instance_ = new ScreenLockManager; in GetInstance()
46 std::lock_guard<std::mutex> guard(instance_->managerProxyLock_); in GetInstance()
47 instance_->screenlockManagerProxy_ = GetScreenLockManagerProxy(); in GetInstance()
50 return instance_; in GetInstance()
/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/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/notification/common_event_service/test/systemtest/common/resource/fuzzTest/include/
DfuzzTestManager.h40 if (instance_ == nullptr) { in GetInstance()
41 instance_ = std::shared_ptr<fuzzTestManager>(new fuzzTestManager); in GetInstance()
43 return instance_; in GetInstance()
57 static Ptr instance_; variable
/base/time/time_service/services/time/src/
Dtimer_call_back.cpp22 sptr<TimerCallback> TimerCallback::instance_; member in OHOS::MiscServices::TimerCallback
38 if (instance_ == nullptr) { in GetInstance()
40 if (instance_ == nullptr) { in GetInstance()
41 instance_ = new TimerCallback; in GetInstance()
44 return instance_; in GetInstance()
/base/account/os_account/services/accountmgr/test/mock/common/
Dability_manager_adapter.cpp26 std::shared_ptr<AbilityManagerAdapter> AbilityManagerAdapter::instance_ = nullptr; member in OHOS::AccountSA::AbilityManagerAdapter
32 if (instance_ == nullptr) { in GetInstance()
33 instance_ = std::make_shared<AbilityManagerAdapter>(); in GetInstance()
35 return instance_; in GetInstance()
Dbundle_manager_adapter.cpp25 std::shared_ptr<BundleManagerAdapter> BundleManagerAdapter::instance_ = nullptr; member in OHOS::AccountSA::BundleManagerAdapter
31 if (instance_ == nullptr) { in GetInstance()
32 instance_ = std::make_shared<BundleManagerAdapter>(); in GetInstance()
34 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
26 if (instance_ == nullptr) { in GetInstance()
27 instance_ = new UpdateServiceOnDemand; in GetInstance()
30 return instance_; in GetInstance()
/base/useriam/face_auth/services/src/
Dface_auth_service.cpp65 std::shared_ptr<FaceAuthService> FaceAuthService::instance_ = nullptr; member in OHOS::UserIam::FaceAuth::FaceAuthService
74 if (instance_ == nullptr) { in GetInstance()
76 if (instance_ == nullptr) { in GetInstance()
77 instance_ = Common::MakeShared<FaceAuthService>(); in GetInstance()
78 if (instance_ == nullptr) { in GetInstance()
83 return instance_; in GetInstance()
/base/customization/enterprise_device_management/services/edm/include/
Diplugin_template.h352 std::shared_ptr<CT> instance_; variable
378 if (instance_ == nullptr) { in SetOnHandlePolicyListener()
387 return (instance_.get()->*(entry->second.supplier_))(); in SetOnHandlePolicyListener()
395 if (instance_ == nullptr) { in SetOnHandlePolicyListener()
408 ErrCode result = (instance_.get()->*(entry->second.function_))(handleData); in SetOnHandlePolicyListener()
428 if (instance_ == nullptr || instance_.get() == nullptr) { in SetOnHandlePolicyListener()
449 ErrCode result = (instance_.get()->*(entry->second.biFunction_))(handleData, currentData); in SetOnHandlePolicyListener()
529 if (instance_ == nullptr) { in SetOnHandlePolicyDoneListener()
537 (instance_.get()->*(entry->second.boolConsumer_))(isGlobalChanged); in SetOnHandlePolicyDoneListener()
546 if (instance_ == nullptr) { in SetOnHandlePolicyDoneListener()
[all …]
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/cache/
Dapp_event_cache.cpp25 std::shared_ptr<AppEventCache> AppEventCache::instance_ = nullptr; member in OHOS::HiviewDFX::AppEventCache
29 if (instance_ == nullptr) { in GetInstance()
31 if (instance_ == nullptr) { in GetInstance()
32 instance_ = std::make_shared<AppEventCache>(); in GetInstance()
35 return instance_; in GetInstance()
/base/hiviewdfx/hiappevent/frameworks/native/libhiappevent/watcher/
Dapp_event_watcher_mgr.cpp28 std::shared_ptr<AppEventWatcherMgr> AppEventWatcherMgr::instance_ = nullptr; member in OHOS::HiviewDFX::AppEventWatcherMgr
32 if (instance_ == nullptr) { in GetInstance()
34 if (instance_ == nullptr) { in GetInstance()
35 instance_ = std::make_shared<AppEventWatcherMgr>(); in GetInstance()
38 return instance_; in GetInstance()
/base/customization/enterprise_device_management/services/edm/src/
Dplugin_manager.cpp30 std::shared_ptr<PluginManager> PluginManager::instance_; member in OHOS::EDM::PluginManager
54 if (instance_ == nullptr) { in GetInstance()
56 if (instance_ == nullptr) { in GetInstance()
57 instance_.reset(new (std::nothrow) PluginManager()); in GetInstance()
60 return instance_; in GetInstance()

1234