Logo Search packages:      
Sourcecode: blender version File versions

GHOST_TSuccess GHOST_EventManager::removeConsumer ( GHOST_IEventConsumer consumer  )  [virtual]

Removes a consumer from the list of event consumers.

Parameters:
consumer The consumer removed from the list.
Returns:
Indication as to whether removal has succeeded.

Definition at line 173 of file GHOST_EventManager.cpp.

References m_consumers.

{
      GHOST_TSuccess success;
      GHOST_ASSERT(consumer, "invalid consumer");

      // Check to see whether the consumer is in our list
      TConsumerVector::iterator iter = std::find(m_consumers.begin(), m_consumers.end(), consumer);

      if (iter != m_consumers.end()) {
            // Remove the consumer
            m_consumers.erase(iter);
            success = GHOST_kSuccess;
      }
      else {
            success = GHOST_kFailure;
      }
      return success;
}


Generated by  Doxygen 1.6.0   Back to index