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

Method CreateWeakBinding

trinity/TriValueBinding.cpp:777–795  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

775}
776
777void TriValueBinding::CreateWeakBinding( IRoot* source, const char* sourceAttr, IRoot* dest, const char* destAttr, float scale, const Vector4& offset )
778{
779 if( ITriReroutablePtr rp = BlueCastPtr( GetCurrentDestinationObject() ) )
780 {
781 rp->UnregisterBinding( this );
782 }
783
784 m_sourceAttribute = sourceAttr;
785 m_sourceObject = nullptr;
786 m_sourceObjectWeak = source;
787 m_destinationAttribute = destAttr;
788 m_destinationObject = nullptr;
789 m_destinationObjectWeak = dest;
790 m_scale = scale;
791 m_offset = offset;
792 m_isWeak = true;
793 m_notifyPtr = nullptr;
794 Initialize();
795}
796
797bool TriValueBinding::IsValid() const
798{

Callers 1

LinkMethod · 0.80

Calls 2

InitializeFunction · 0.50
UnregisterBindingMethod · 0.45

Tested by

no test coverage detected