MCPcopy Create free account
hub / github.com/carbonengine/trinity / Link

Method Link

trinity/Tr2DynamicBinding.cpp:229–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229void 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
253void Tr2DynamicBinding::Unlink()
254{

Callers

nothing calls this directly

Calls 4

CreateInstanceMethod · 0.80
CreateWeakBindingMethod · 0.80
ResolveReferenceFunction · 0.70
GetParameterMapMethod · 0.45

Tested by

no test coverage detected