| 227 | } |
| 228 | |
| 229 | void Tr2DynamicBinding::Link() |
| 230 | { |
| 231 | Unlink(); |
| 232 | if( m_owner == nullptr ) |
| 233 | { |
| 234 | return; |
| 235 | } |
| 236 | |
| 237 | auto parameters = m_owner->GetParameterMap(); |
| 238 | |
| 239 | m_destination = ResolveReference( m_destinationObjectPath.c_str(), parameters ); |
| 240 | m_source = ResolveReference( m_sourceObjectPath.c_str(), parameters ); |
| 241 | |
| 242 | if( IsSourceValid() && IsDestinationValid() ) |
| 243 | { |
| 244 | m_binding.CreateInstance(); |
| 245 | m_binding->CreateWeakBinding( m_source, m_sourceObjectAttribute.c_str(), m_destination, m_destinationObjectAttribute.c_str(), m_scale ); |
| 246 | if( m_bindingTime == 0 ) |
| 247 | { |
| 248 | m_bindingTime = BeOS->GetCurrentFrameTime() + TimeFromMS( m_bindingDelay ); |
| 249 | } |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | void Tr2DynamicBinding::Unlink() |
| 254 | { |
nothing calls this directly
no test coverage detected