void ClangCodeModelClientInterface::dispatch(const MessageEnvelop &messageEnvelop) { switch (messageEnvelop.messageType()) { case MessageType::AliveMessage: alive(); break; case MessageType::EchoMessage: echo(messageEnvelop.message<EchoMessage>()); break; case MessageType::CodeCompletedMessage: codeCompleted(messageEnvelop.message<CodeCompletedMessage>()); break; case MessageType::TranslationUnitDoesNotExistMessage: translationUnitDoesNotExist(messageEnvelop.message<TranslationUnitDoesNotExistMessage>()); break; case MessageType::ProjectPartsDoNotExistMessage: projectPartsDoNotExist(messageEnvelop.message<ProjectPartsDoNotExistMessage>()); break; case MessageType::DocumentAnnotationsChangedMessage: documentAnnotationsChanged(messageEnvelop.message<DocumentAnnotationsChangedMessage>()); break; default: qWarning() << "Unknown ClangCodeModelClientMessage"; } }
void ClangCodeModelServerInterface::dispatch(const MessageEnvelop &messageEnvelop) { switch (messageEnvelop.messageType()) { case MessageType::EndMessage: end(); break; case MessageType::RegisterTranslationUnitForEditorMessage: registerTranslationUnitsForEditor(messageEnvelop.message<RegisterTranslationUnitForEditorMessage>()); break; case MessageType::UpdateTranslationUnitsForEditorMessage: updateTranslationUnitsForEditor(messageEnvelop.message<UpdateTranslationUnitsForEditorMessage>()); break; case MessageType::UnregisterTranslationUnitsForEditorMessage: unregisterTranslationUnitsForEditor(messageEnvelop.message<UnregisterTranslationUnitsForEditorMessage>()); break; case MessageType::RegisterProjectPartsForEditorMessage: registerProjectPartsForEditor(messageEnvelop.message<RegisterProjectPartsForEditorMessage>()); break; case MessageType::UnregisterProjectPartsForEditorMessage: unregisterProjectPartsForEditor(messageEnvelop.message<UnregisterProjectPartsForEditorMessage>()); break; case MessageType::RegisterUnsavedFilesForEditorMessage: registerUnsavedFilesForEditor(messageEnvelop.message<RegisterUnsavedFilesForEditorMessage>()); break; case MessageType::UnregisterUnsavedFilesForEditorMessage: unregisterUnsavedFilesForEditor(messageEnvelop.message<UnregisterUnsavedFilesForEditorMessage>()); break; case MessageType::CompleteCodeMessage: completeCode(messageEnvelop.message<CompleteCodeMessage>()); break; case MessageType::RequestDocumentAnnotationsMessage: requestDocumentAnnotations(messageEnvelop.message<RequestDocumentAnnotationsMessage>()); break; case MessageType::RequestReferencesMessage: requestReferences(messageEnvelop.message<RequestReferencesMessage>()); break; case MessageType::RequestFollowSymbolMessage: requestFollowSymbol(messageEnvelop.message<RequestFollowSymbolMessage>()); break; case MessageType::RequestToolTipMessage: requestToolTip(messageEnvelop.message<RequestToolTipMessage>()); break; case MessageType::UpdateVisibleTranslationUnitsMessage: updateVisibleTranslationUnits(messageEnvelop.message<UpdateVisibleTranslationUnitsMessage>()); break; default: qWarning() << "Unknown ClangCodeModelServerMessage"; } }
void PchManagerServerInterface::dispatch(const MessageEnvelop &messageEnvelop) { switch (messageEnvelop.messageType()) { case MessageType::EndMessage: end(); break; case MessageType::UpdateProjectPartsMessage: updateProjectParts(messageEnvelop.message<UpdateProjectPartsMessage>()); break; case MessageType::RemoveProjectPartsMessage: removeProjectParts(messageEnvelop.message<RemoveProjectPartsMessage>()); break; default: qWarning() << "Unknown IpcClientMessage"; } }
QDebug operator<<(QDebug debug, const MessageEnvelop &messageEnvelop) { debug.nospace() << "MessageEnvelop("; switch (messageEnvelop.messageType()) { case MessageType::EndMessage: qDebug() << "EndMessage()"; break; case MessageType::RegisterTranslationUnitForEditorMessage: qDebug() << messageEnvelop.message<RegisterTranslationUnitForEditorMessage>(); break; case MessageType::UpdateTranslationUnitsForEditorMessage: qDebug() << messageEnvelop.message<UpdateTranslationUnitsForEditorMessage>(); break; case MessageType::UnregisterTranslationUnitsForEditorMessage: qDebug() << messageEnvelop.message<UnregisterTranslationUnitsForEditorMessage>(); break; case MessageType::RegisterProjectPartsForEditorMessage: qDebug() << messageEnvelop.message<RegisterProjectPartsForEditorMessage>(); break; case MessageType::UnregisterProjectPartsForEditorMessage: qDebug() << messageEnvelop.message<UnregisterProjectPartsForEditorMessage>(); break; case MessageType::RegisterUnsavedFilesForEditorMessage: qDebug() << messageEnvelop.message<RegisterUnsavedFilesForEditorMessage>(); break; case MessageType::UnregisterUnsavedFilesForEditorMessage: qDebug() << messageEnvelop.message<UnregisterUnsavedFilesForEditorMessage>(); break; case MessageType::CompleteCodeMessage: qDebug() << messageEnvelop.message<CompleteCodeMessage>(); break; case MessageType::RequestDocumentAnnotationsMessage: qDebug() << messageEnvelop.message<RequestDocumentAnnotationsMessage>(); break; case MessageType::UpdateVisibleTranslationUnitsMessage: qDebug() << messageEnvelop.message<UpdateVisibleTranslationUnitsMessage>(); break; case MessageType::AliveMessage: qDebug() << "AliveMessage()"; break; case MessageType::EchoMessage: qDebug() << messageEnvelop.message<EchoMessage>(); break; case MessageType::CodeCompletedMessage: qDebug() << messageEnvelop.message<CodeCompletedMessage>(); break; case MessageType::TranslationUnitDoesNotExistMessage: qDebug() << messageEnvelop.message<TranslationUnitDoesNotExistMessage>(); break; case MessageType::ProjectPartsDoNotExistMessage: qDebug() << messageEnvelop.message<ProjectPartsDoNotExistMessage>(); break; case MessageType::DocumentAnnotationsChangedMessage: qDebug() << messageEnvelop.message<DocumentAnnotationsChangedMessage>(); break; default: qWarning() << "Unknown Message"; } debug.nospace() << ")"; return debug; }