bool NFCPropertyManager::RegisterCallback(const std::string& strProperty, const PROPERTY_EVENT_FUNCTOR_PTR& cb) { NF_SHARE_PTR<NFIProperty> pProperty = this->GetElement(strProperty); if (pProperty) { pProperty->RegisterCallback(cb); return true; } return false; }
bool NFCObject::AddPropertyCallBack(const std::string& strCriticalName, const PROPERTY_EVENT_FUNCTOR_PTR& cb) { NF_SHARE_PTR<NFIProperty> pProperty = GetPropertyManager()->GetElement(strCriticalName); if (pProperty.get()) { pProperty->RegisterCallback(cb); return true; } return false; }