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

Method OnListModified

trinity/Eve/EveMultiEffect.cpp:84–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void EveMultiEffect::OnListModified( long event, ssize_t key, ssize_t key2, IRoot* value, const IList* list )
85{
86 if( list == &m_parameters )
87 {
88 switch( event & BELIST_EVENTMASK )
89 {
90 case BELIST_INSERTED:
91 if( EveMultiEffectParameterPtr parameter = BlueCastPtr( value ) )
92 {
93 parameter->SetOwner( this );
94 }
95 break;
96 case BELIST_REMOVED:
97 if( EveMultiEffectParameterPtr parameter = BlueCastPtr( value ) )
98 {
99 parameter->SetOwner( nullptr );
100 }
101 break;
102 default:
103 break;
104 }
105 }
106 else if( list == &m_bindings )
107 {
108 switch( event & BELIST_EVENTMASK )
109 {
110 case BELIST_INSERTED:
111 if( Tr2DynamicBindingPtr binding = BlueCastPtr( value ) )
112 {
113 binding->SetOwner( this );
114 }
115 break;
116 case BELIST_REMOVED:
117 if( Tr2DynamicBindingPtr binding = BlueCastPtr( value ) )
118 {
119 binding->SetOwner( nullptr );
120 }
121 break;
122 default:
123 break;
124 }
125 }
126 else if( list == &m_controllers && ( event & BELIST_LOADING ) == 0 )
127 {
128 switch( event & BELIST_EVENTMASK )
129 {
130 case BELIST_INSERTED:
131 if( ITr2ControllerPtr controller = BlueCastPtr( value ) )
132 {
133 controller->Link( *GetRawRoot() );
134 }
135 break;
136 case BELIST_REMOVED:
137 if( ITr2ControllerPtr controller = BlueCastPtr( value ) )
138 {
139 controller->Unlink();
140 }
141 break;

Callers

nothing calls this directly

Calls 3

SetOwnerMethod · 0.45
LinkMethod · 0.45
UnlinkMethod · 0.45

Tested by

no test coverage detected