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

Method OnListModified

trinity/Eve/EveLensflare.cpp:91–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void EveLensflare::OnListModified( long event, ssize_t key, ssize_t key2, IRoot* value, const IList* list )
92{
93 if( list == &m_controllers && ( event & BELIST_LOADING ) == 0 )
94 {
95 switch( event & BELIST_EVENTMASK )
96 {
97 case BELIST_INSERTED:
98 if( ITr2ControllerPtr controller = BlueCastPtr( value ) )
99 {
100 controller->Link( *GetRawRoot() );
101 for( auto it = begin( m_controllerVariables ); it != end( m_controllerVariables ); ++it )
102 {
103 controller->SetVariable( it->first.c_str(), it->second );
104 }
105 }
106 break;
107 case BELIST_REMOVED:
108 if( ITr2ControllerPtr controller = BlueCastPtr( value ) )
109 {
110 controller->Unlink();
111 }
112 break;
113 case BELIST_UNLOADSTART:
114 for( auto& controller : m_controllers )
115 {
116 controller->Unlink();
117 }
118 break;
119 default:
120 break;
121 }
122 }
123}
124
125// --------------------------------------------------------------------------------
126// Description:

Callers

nothing calls this directly

Calls 5

beginFunction · 0.50
endFunction · 0.50
LinkMethod · 0.45
SetVariableMethod · 0.45
UnlinkMethod · 0.45

Tested by

no test coverage detected