Browse Source

Continue work on addressbook

Alexey Edelev 6 years ago
parent
commit
e9f022f018

+ 12 - 2
examples/addressbook/CMakeLists.txt

@@ -35,6 +35,16 @@ endif()
 find_package(Qt5 COMPONENTS Core Quick Network REQUIRED)
 
 set(EXPECTED_GENERATED_HEADERS 
+    addressbookclient.h
+#    addressbookserver.h
+    address.h
+    contact.h
+    contacts.h
+    globalenums.h
+    job.h
+    listframe.h
+    phonenumber.h
+    simpleresult.h
     globalenums.h
 )
 
@@ -72,10 +82,10 @@ if(WIN32)
     include_directories(${GTEST_INCLUDE_PATHS} "/")
 endif()
 
-file(GLOB SOURCES main.cpp)
+file(GLOB SOURCES main.cpp addressbookengine.cpp universallistmodel.cpp universallistmodelbase.cpp testnesting.cpp nestedobject.cpp)
 
 set(addressbook "addressbook_example")
-add_executable(${addressbook} ${SOURCES} ${GENERATED_SOURCES})
+add_executable(${addressbook} ${SOURCES} ${GENERATED_SOURCES} resources.qrc)
 if(WIN32)
     target_link_libraries(${addressbook} qtgrpc Qt5::Quick)
 elseif(UNIX)

+ 43 - 0
examples/addressbook/addressbookengine.cpp

@@ -0,0 +1,43 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2019 Alexey Edelev <semlanik@gmail.com>
+ *
+ * This file is part of qtprotobuf project https://git.semlanik.org/semlanik/qtprotobuf
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this
+ * software and associated documentation files (the "Software"), to deal in the Software
+ * without restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software, and
+ * to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies
+ * or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+ * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include "addressbookengine.h"
+#include "addressbookclient.h"
+#include <http2channel.h>
+
+#include <QDebug>
+
+using namespace qtprotobuf::examples;
+
+AddressBookEngine::AddressBookEngine() : QObject()
+  , m_client(new AddressBookClient)
+  , m_contacts(new ContactsListModel(this))
+{
+    Contacts tmp;
+    std::shared_ptr<qtprotobuf::AbstractChannel> channel(new qtprotobuf::Http2Channel("localhost", 65001));
+    m_client->attachChannel(channel);
+    m_client->getContacts(ListFrame(), tmp);
+    m_contacts->reset(tmp.list());
+}

+ 59 - 0
examples/addressbook/addressbookengine.h

@@ -0,0 +1,59 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2019 Alexey Edelev <semlanik@gmail.com>
+ *
+ * This file is part of qtprotobuf project https://git.semlanik.org/semlanik/qtprotobuf
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this
+ * software and associated documentation files (the "Software"), to deal in the Software
+ * without restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software, and
+ * to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies
+ * or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+ * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#pragma once
+
+#include <QObject>
+#include "contacts.h"
+#include "universallistmodel.h"
+
+namespace qtprotobuf { namespace examples {
+class AddressBookClient;
+} }
+
+using ContactsListModel = UniversalListModel<qtprotobuf::examples::Contact>;
+
+class AddressBookEngine : public QObject
+{
+    Q_OBJECT
+    Q_PROPERTY(ContactsListModel *contacts READ contacts NOTIFY contactsChanged)
+public:
+    AddressBookEngine();
+
+    ContactsListModel *contacts() const
+    {
+        return m_contacts;
+    }
+
+signals:
+    void contactsChanged();
+
+private:
+    qtprotobuf::examples::AddressBookClient *m_client;
+    ContactsListModel *m_contacts;
+    qtprotobuf::examples::ContactList m_container;
+};
+
+Q_DECLARE_METATYPE(ContactsListModel*)

+ 36 - 3
examples/addressbook/main.cpp

@@ -27,17 +27,50 @@
 
 #include <QGuiApplication>
 #include <QQmlApplicationEngine>
+#include <QQmlContext>
 
-#include "contacts.h"
+#include <qtprotobuf.h>
+#include "addressbookengine.h"
+#include <contacts.h>
+#include <contact.h>
+
+#include "nestedobject.h"
+#include "testnesting.h"
+#include <QMetaProperty>
+#include<QMetaObject>
+
+using namespace qtprotobuf::examples;
 
 int main(int argc, char *argv[])
 {
     QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+    qtprotobuf::QtProtobuf::init();
+    Contact::registerTypes();
+    Contacts::registerTypes();
+    Job::registerTypes();
+    Address::registerTypes();
+
+    qRegisterMetaType<NestedObject>("NestedObject");
+    qRegisterMetaType<TestNesting>("TestNesting");
+    qmlRegisterType<NestedObject>("qtprotobuf.examples.addressbook", 1, 0, "NestedObject");
+    qmlRegisterType<TestNesting>("qtprotobuf.examples.addressbook", 1, 0, "TestNesting");
 
-    QGuiApplication app(argc, argv);
 
+    TestNesting test;
+    qDebug() << "test.property" << TestNesting::staticMetaObject.property(1).userType();
+    qDebug() << "NestedObject metatypeid" << qMetaTypeId<NestedObject*>();
+    qmlRegisterType<ContactsListModel>("examples.addressbook", 1, 0, "ContactsListModel");
+    qmlRegisterType<qtprotobuf::examples::Job>("qtprotobuf.examples.addressbook", 1, 0, "Job");
+    qmlRegisterType<qtprotobuf::examples::Address>("qtprotobuf.examples.addressbook", 1, 0, "Address");
+    qmlRegisterType<qtprotobuf::examples::Contact>("qtprotobuf.examples.addressbook", 1, 0, "Contact");
+    qmlRegisterType<qtprotobuf::examples::Contacts>("qtprotobuf.examples.addressbook", 1, 0, "Contacts");
+
+    QGuiApplication app(argc, argv);
+    AddressBookEngine abEngine;
     QQmlApplicationEngine engine;
-    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
+
+    engine.rootContext()->setContextProperty("abEngine", &abEngine);
+    engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
     if (engine.rootObjects().isEmpty())
         return -1;
 

+ 2 - 2
examples/addressbook/proto/addressbook.proto

@@ -75,8 +75,8 @@ message ListFrame {
 }
 
 service AddressBook {
-    rpc addContact(Contact) returns (SimpleResult) {}
-    rpc removeContact(Contact) returns (SimpleResult) {}
+    rpc addContact(Contact) returns (Contacts) {}
+    rpc removeContact(Contact) returns (Contacts) {}
     rpc getContacts(ListFrame) returns (Contacts) {}
     rpc makeCall(Contact) returns (SimpleResult) {}
     rpc navigateTo(Address) returns (SimpleResult) {}

+ 96 - 0
examples/addressbook/qml/ContactList.qml

@@ -0,0 +1,96 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2019 Alexey Edelev <semlanik@gmail.com>
+ *
+ * This file is part of qtprotobuf project https://git.semlanik.org/semlanik/qtprotobuf
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this
+ * software and associated documentation files (the "Software"), to deal in the Software
+ * without restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software, and
+ * to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies
+ * or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+ * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+import QtQuick 2.9
+import QtQuick.Controls.Material 2.9
+import QtQuick.Layouts 1.1
+import qtprotobuf.examples.addressbook 1.0
+
+ListView {
+    id: contactList
+    anchors.fill: parent
+    delegate: Rectangle {
+        id: contactDelegate
+        property Contact contact: model.modelData
+        color: "#81D4FA"
+        width: contactList.width
+        height: 80
+        ColumnLayout {
+            anchors.fill: parent
+            anchors.margins: 10
+            Row {
+                Layout.alignment: Qt.AlignVCenter
+                Text {
+                    id: firstName
+                    color: "#FFFFFF"
+                    text: contactDelegate.contact.firstName
+                    font.pointSize: 12
+                }
+                Text {
+                    id: middleName
+                    anchors.verticalCenter: parent.verticalCenter
+                    color: "#FFFFFF"
+                    text: contactDelegate.contact.middleName
+                    font.pointSize: 12
+                }
+                Text {
+                    id: lastName
+                    anchors.verticalCenter: parent.verticalCenter
+                    color: "#FFFFFF"
+                    text: contactDelegate.contact.lastName
+                    font.pointSize: 12
+                }
+            }
+            Row {
+                Layout.alignment: Qt.AlignVCenter
+                Text {
+                    id: job
+                    color: "#EEEEEE"
+                    text: contactDelegate.contact.job.title
+                    font.pointSize: 12
+                    Component.onCompleted: {
+                        console.log('contactDelegate.contact.job: ' + contactDelegate.contact.job.title);
+                    }
+                }
+            }
+        }
+        Rectangle {
+            color:"#EEEEEE"
+            anchors.left: parent.left
+            anchors.right: parent.right
+            height: 2
+        }
+
+        Rectangle {
+            color:"#EEEEEE"
+            anchors.left: parent.left
+            anchors.right: parent.right
+            anchors.top: parent.bottom
+            height: 2
+            visible: (contactList.count - 1) === model.index
+        }
+    }
+}
+

+ 71 - 0
examples/addressbook/qml/main.qml

@@ -0,0 +1,71 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2019 Alexey Edelev <semlanik@gmail.com>
+ *
+ * This file is part of qtprotobuf project https://git.semlanik.org/semlanik/qtprotobuf
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this
+ * software and associated documentation files (the "Software"), to deal in the Software
+ * without restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software, and
+ * to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies
+ * or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+ * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+import QtQuick 2.9
+import QtQuick.Controls 2.9
+import QtQuick.Controls.Material 2.9
+import qtprotobuf.examples.addressbook 1.0
+import examples.addressbook 1.0
+
+ApplicationWindow {
+    Material.theme: Material.Light
+    Material.accent: Material.Blue
+    visible: true
+    width: 640
+    height: 480
+    title: qsTr("QtProtobuf Address Book Example")
+    Rectangle {
+        anchors.fill: parent
+        color: "#81D4FA"
+    }
+
+    TestNesting {
+        id: test
+        nested: NestedObject {
+            title: "qqq"
+        }
+        Component.onCompleted: {
+            console.log("test.nested " + test.nested.title)
+        }
+    }
+
+//    NestedObject {
+//        id: nested
+//        title: "qqq"
+//        Component.onCompleted: {
+//            console.log("test.nested " + nested.title)
+//        }
+//    }
+
+    ContactList {
+        model: abEngine.contacts
+        Component.onCompleted: {
+            console.log("abEngine.contacts.list.length " + abEngine.contacts.count)
+        }
+    }
+}
+
+
+

+ 6 - 0
examples/addressbook/resources.qrc

@@ -0,0 +1,6 @@
+<RCC>
+    <qresource prefix="/">
+        <file>qml/main.qml</file>
+        <file>qml/ContactList.qml</file>
+    </qresource>
+</RCC>

+ 1 - 0
examples/addressbook/universallistmodel.cpp

@@ -0,0 +1 @@
+#include "universallistmodel.h"

+ 201 - 0
examples/addressbook/universallistmodel.h

@@ -0,0 +1,201 @@
+#pragma once
+
+#include <universallistmodelbase.h>
+
+#include <QObject>
+#include <QList>
+#include <QHash>
+#include <QPointer>
+#include <QMetaProperty>
+#include <QMetaObject>
+
+#include <QDebug>
+
+
+/*!
+ * \brief Universal list model is QObject-base list model abstraction.
+ * It exposes all objects properties as data-roles.
+ */
+template <typename T>
+class UniversalListModel : public UniversalListModelBase
+{
+public:
+    UniversalListModel(QObject* parent = 0) : UniversalListModelBase(parent) {}
+    ~UniversalListModel() {
+        clear();
+    }
+
+    int rowCount(const QModelIndex &parent) const override {
+        Q_UNUSED(parent)
+        return count();
+    }
+
+    int count() const override {
+        return m_container.count();
+    }
+
+    QHash<int, QByteArray> roleNames() const override {
+        if(s_roleNames.isEmpty()) {
+            int propertyCount = T::staticMetaObject.propertyCount();
+            for(int i = 1; i < propertyCount; i++) {
+                s_roleNames.insert(Qt::UserRole + i, T::staticMetaObject.property(i).name());
+            }
+            s_roleNames[propertyCount] = "modelData";
+        }
+        return s_roleNames;
+    }
+
+    QVariant data(const QModelIndex &index, int role) const override
+    {
+        int row = index.row();
+
+        if(row < 0 || row >= m_container.count() || m_container.at(row).isNull()) {
+            return QVariant();
+        }
+
+        T* dataPtr = m_container.at(row).data();
+
+        if(s_roleNames.value(role) == "modelData") {
+            return QVariant::fromValue(dataPtr);
+        }
+        return dataPtr->property(s_roleNames.value(role));
+    }
+
+    /*!
+     * \brief append
+     * \param value
+     * \return
+     */
+    int append(T* value) {
+        Q_ASSERT_X(value != nullptr, fullTemplateName(), "Trying to add member of NULL");
+
+        if(m_container.indexOf(value) >= 0) {
+#ifdef DEBUG
+            qDebug() << fullTemplateName() << "Member already exists";
+#endif
+            return -1;
+        }
+        beginInsertRows(QModelIndex(), m_container.count(), m_container.count());
+        m_container.append(QPointer<T>(value));
+        emit countChanged();
+        endInsertRows();
+        return m_container.count() - 1;
+    }
+
+    /*!
+     * \brief prepend
+     * \param value
+     * \return
+     */
+    int prepend(T* value) {
+        Q_ASSERT_X(value != nullptr, fullTemplateName(), "Trying to add member of NULL");
+
+        if(m_container.indexOf(value) >= 0) {
+#ifdef DEBUG
+            qDebug() << fullTemplateName() << "Member already exists";
+#endif
+            return -1;
+        }
+        beginInsertRows(QModelIndex(), 0, 0);
+        m_container.prepend(QPointer<T>(value));
+        emit countChanged();
+        endInsertRows();
+        return 0;
+    }
+
+    /*!
+     * \brief remove
+     * \param value
+     */
+    void remove(T* value) {
+        Q_ASSERT_X(value != nullptr, fullTemplateName(), ": Trying to remove member of NULL");
+
+        int valueIndex = m_container.indexOf(value);
+
+        remove(valueIndex);
+    }
+
+    void remove(int valueIndex) override {
+        if(valueIndex >= 0) {
+            beginRemoveRows(QModelIndex(), valueIndex, valueIndex);
+            m_container.removeAt(valueIndex);
+            emit countChanged();
+            endRemoveRows();
+        }
+    }
+
+    /*!
+     * \brief Resets container with new container passed as parameter
+     * \param container a data for model. Should contain QPointer's to objects.
+     * Passing empty container makes model empty. This method should be used to cleanup model.
+     */
+    void reset(const QList<QPointer<T> >& container) {
+        beginResetModel();
+        clear();
+        m_container = container;
+        emit countChanged();
+        endResetModel();
+    }
+
+    /*!
+     * \brief Returns the item at index position i in the list. i must be a valid index position in the list (i.e., 0 <= i < rowCount()).
+     * This function is very fast (constant time).
+     * \param i index of looking object
+     * \return Object at provided index
+     */
+    T* at(int i) const {
+        return m_container.at(i);
+    }
+
+    /*!
+     * \brief Looking for index of objec
+     * \param value
+     * \return
+     */
+    int indexOf(T* value) const {
+        return m_container.indexOf(value);
+    }
+
+    /*!
+     * \brief findByProperty method finds item in internal container property of that is provided value
+     * \param propertyName Latin1 name of looking property
+     * \param value property of corresponded type inside QVariant container
+     * \return
+     */
+    QPointer<T> findByProperty(const char* propertyName, const QVariant& value) const {
+        auto iter = std::find_if(m_container.begin(), m_container.end(), [=](const QPointer<T> &item) -> bool {
+            return item->property(propertyName) == value;
+        });
+
+        if(iter != m_container.end()) {
+            return *iter;
+        }
+        return QPointer<T>();
+    }
+
+    /*!
+     * \brief container returns internal container
+     * \return
+     */
+    QList<QPointer<T> > container() const {
+        return m_container;
+    }
+
+protected:
+    void clear() {
+        m_container.clear();
+        emit countChanged();
+    }
+
+    QList<QPointer<T> > m_container;
+    static QHash<int, QByteArray> s_roleNames;
+
+
+private:
+    static QByteArray fullTemplateName() { //Debug helper
+        return QString("UniversalListModel<%1>").arg(T::staticMetaObject.className()).toLatin1();
+    }
+};
+
+template<typename T>
+QHash<int, QByteArray> UniversalListModel<T>::s_roleNames;

+ 6 - 0
examples/addressbook/universallistmodelbase.cpp

@@ -0,0 +1,6 @@
+#include "universallistmodelbase.h"
+
+UniversalListModelBase::UniversalListModelBase(QObject *parent) : QAbstractListModel(parent)
+{
+
+}

+ 24 - 0
examples/addressbook/universallistmodelbase.h

@@ -0,0 +1,24 @@
+#pragma once
+
+#include <QAbstractListModel>
+/*!
+ * \brief The UniversalListModelBase class to make prossible properties definition for UniversalListModel
+ * This class should not be used as is, but leaves this possibility.
+ */
+class UniversalListModelBase : public QAbstractListModel
+{
+    Q_OBJECT
+    Q_PROPERTY(int count READ count NOTIFY countChanged)
+public:
+    explicit UniversalListModelBase(QObject *parent = nullptr);
+
+    /*!
+     * \brief count property that declares row count of UniversalListModel
+     * \return
+     */
+    virtual int count() const = 0;
+    Q_INVOKABLE virtual void remove(int valueIndex) = 0;
+
+signals:
+    void countChanged();
+};

+ 10 - 0
examples/addressbookserver/CMakeLists.txt

@@ -0,0 +1,10 @@
+find_package(Protobuf)
+
+file(GLOB HEADERS ${TESTS_OUT_DIR}/*.h)
+file(GLOB SOURCES main.cpp)
+file(GLOB GENERATED_SOURCES addressbook.pb.cc addressbook.grpc.pb.cc)
+
+set(ADDRESSBOOK_SERVER "address_servers")
+
+add_executable(${ADDRESSBOOK_SERVER} ${SOURCES} ${GENERATED_SOURCES})
+target_link_libraries(${ADDRESSBOOK_SERVER} protobuf grpc++)

+ 170 - 0
examples/addressbookserver/addressbook.grpc.pb.cc

@@ -0,0 +1,170 @@
+// Generated by the gRPC C++ plugin.
+// If you make any local change, they will be lost.
+// source: addressbook.proto
+
+#include "addressbook.pb.h"
+#include "addressbook.grpc.pb.h"
+
+#include <grpcpp/impl/codegen/async_stream.h>
+#include <grpcpp/impl/codegen/async_unary_call.h>
+#include <grpcpp/impl/codegen/channel_interface.h>
+#include <grpcpp/impl/codegen/client_unary_call.h>
+#include <grpcpp/impl/codegen/method_handler_impl.h>
+#include <grpcpp/impl/codegen/rpc_service_method.h>
+#include <grpcpp/impl/codegen/service_type.h>
+#include <grpcpp/impl/codegen/sync_stream.h>
+namespace qtprotobuf {
+namespace examples {
+
+static const char* AddressBook_method_names[] = {
+  "/qtprotobuf.examples.AddressBook/addContact",
+  "/qtprotobuf.examples.AddressBook/removeContact",
+  "/qtprotobuf.examples.AddressBook/getContacts",
+  "/qtprotobuf.examples.AddressBook/makeCall",
+  "/qtprotobuf.examples.AddressBook/navigateTo",
+};
+
+std::unique_ptr< AddressBook::Stub> AddressBook::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) {
+  (void)options;
+  std::unique_ptr< AddressBook::Stub> stub(new AddressBook::Stub(channel));
+  return stub;
+}
+
+AddressBook::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel)
+  : channel_(channel), rpcmethod_addContact_(AddressBook_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
+  , rpcmethod_removeContact_(AddressBook_method_names[1], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
+  , rpcmethod_getContacts_(AddressBook_method_names[2], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
+  , rpcmethod_makeCall_(AddressBook_method_names[3], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
+  , rpcmethod_navigateTo_(AddressBook_method_names[4], ::grpc::internal::RpcMethod::NORMAL_RPC, channel)
+  {}
+
+::grpc::Status AddressBook::Stub::addContact(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::qtprotobuf::examples::Contacts* response) {
+  return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_addContact_, context, request, response);
+}
+
+::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>* AddressBook::Stub::AsyncaddContactRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncResponseReaderFactory< ::qtprotobuf::examples::Contacts>::Create(channel_.get(), cq, rpcmethod_addContact_, context, request, true);
+}
+
+::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>* AddressBook::Stub::PrepareAsyncaddContactRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncResponseReaderFactory< ::qtprotobuf::examples::Contacts>::Create(channel_.get(), cq, rpcmethod_addContact_, context, request, false);
+}
+
+::grpc::Status AddressBook::Stub::removeContact(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::qtprotobuf::examples::Contacts* response) {
+  return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_removeContact_, context, request, response);
+}
+
+::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>* AddressBook::Stub::AsyncremoveContactRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncResponseReaderFactory< ::qtprotobuf::examples::Contacts>::Create(channel_.get(), cq, rpcmethod_removeContact_, context, request, true);
+}
+
+::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>* AddressBook::Stub::PrepareAsyncremoveContactRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncResponseReaderFactory< ::qtprotobuf::examples::Contacts>::Create(channel_.get(), cq, rpcmethod_removeContact_, context, request, false);
+}
+
+::grpc::Status AddressBook::Stub::getContacts(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::qtprotobuf::examples::Contacts* response) {
+  return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_getContacts_, context, request, response);
+}
+
+::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>* AddressBook::Stub::AsyncgetContactsRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncResponseReaderFactory< ::qtprotobuf::examples::Contacts>::Create(channel_.get(), cq, rpcmethod_getContacts_, context, request, true);
+}
+
+::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>* AddressBook::Stub::PrepareAsyncgetContactsRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncResponseReaderFactory< ::qtprotobuf::examples::Contacts>::Create(channel_.get(), cq, rpcmethod_getContacts_, context, request, false);
+}
+
+::grpc::Status AddressBook::Stub::makeCall(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::qtprotobuf::examples::SimpleResult* response) {
+  return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_makeCall_, context, request, response);
+}
+
+::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>* AddressBook::Stub::AsyncmakeCallRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncResponseReaderFactory< ::qtprotobuf::examples::SimpleResult>::Create(channel_.get(), cq, rpcmethod_makeCall_, context, request, true);
+}
+
+::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>* AddressBook::Stub::PrepareAsyncmakeCallRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncResponseReaderFactory< ::qtprotobuf::examples::SimpleResult>::Create(channel_.get(), cq, rpcmethod_makeCall_, context, request, false);
+}
+
+::grpc::Status AddressBook::Stub::navigateTo(::grpc::ClientContext* context, const ::qtprotobuf::examples::Address& request, ::qtprotobuf::examples::SimpleResult* response) {
+  return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_navigateTo_, context, request, response);
+}
+
+::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>* AddressBook::Stub::AsyncnavigateToRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Address& request, ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncResponseReaderFactory< ::qtprotobuf::examples::SimpleResult>::Create(channel_.get(), cq, rpcmethod_navigateTo_, context, request, true);
+}
+
+::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>* AddressBook::Stub::PrepareAsyncnavigateToRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Address& request, ::grpc::CompletionQueue* cq) {
+  return ::grpc::internal::ClientAsyncResponseReaderFactory< ::qtprotobuf::examples::SimpleResult>::Create(channel_.get(), cq, rpcmethod_navigateTo_, context, request, false);
+}
+
+AddressBook::Service::Service() {
+  AddMethod(new ::grpc::internal::RpcServiceMethod(
+      AddressBook_method_names[0],
+      ::grpc::internal::RpcMethod::NORMAL_RPC,
+      new ::grpc::internal::RpcMethodHandler< AddressBook::Service, ::qtprotobuf::examples::Contact, ::qtprotobuf::examples::Contacts>(
+          std::mem_fn(&AddressBook::Service::addContact), this)));
+  AddMethod(new ::grpc::internal::RpcServiceMethod(
+      AddressBook_method_names[1],
+      ::grpc::internal::RpcMethod::NORMAL_RPC,
+      new ::grpc::internal::RpcMethodHandler< AddressBook::Service, ::qtprotobuf::examples::Contact, ::qtprotobuf::examples::Contacts>(
+          std::mem_fn(&AddressBook::Service::removeContact), this)));
+  AddMethod(new ::grpc::internal::RpcServiceMethod(
+      AddressBook_method_names[2],
+      ::grpc::internal::RpcMethod::NORMAL_RPC,
+      new ::grpc::internal::RpcMethodHandler< AddressBook::Service, ::qtprotobuf::examples::ListFrame, ::qtprotobuf::examples::Contacts>(
+          std::mem_fn(&AddressBook::Service::getContacts), this)));
+  AddMethod(new ::grpc::internal::RpcServiceMethod(
+      AddressBook_method_names[3],
+      ::grpc::internal::RpcMethod::NORMAL_RPC,
+      new ::grpc::internal::RpcMethodHandler< AddressBook::Service, ::qtprotobuf::examples::Contact, ::qtprotobuf::examples::SimpleResult>(
+          std::mem_fn(&AddressBook::Service::makeCall), this)));
+  AddMethod(new ::grpc::internal::RpcServiceMethod(
+      AddressBook_method_names[4],
+      ::grpc::internal::RpcMethod::NORMAL_RPC,
+      new ::grpc::internal::RpcMethodHandler< AddressBook::Service, ::qtprotobuf::examples::Address, ::qtprotobuf::examples::SimpleResult>(
+          std::mem_fn(&AddressBook::Service::navigateTo), this)));
+}
+
+AddressBook::Service::~Service() {
+}
+
+::grpc::Status AddressBook::Service::addContact(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::Contacts* response) {
+  (void) context;
+  (void) request;
+  (void) response;
+  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+}
+
+::grpc::Status AddressBook::Service::removeContact(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::Contacts* response) {
+  (void) context;
+  (void) request;
+  (void) response;
+  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+}
+
+::grpc::Status AddressBook::Service::getContacts(::grpc::ServerContext* context, const ::qtprotobuf::examples::ListFrame* request, ::qtprotobuf::examples::Contacts* response) {
+  (void) context;
+  (void) request;
+  (void) response;
+  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+}
+
+::grpc::Status AddressBook::Service::makeCall(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::SimpleResult* response) {
+  (void) context;
+  (void) request;
+  (void) response;
+  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+}
+
+::grpc::Status AddressBook::Service::navigateTo(::grpc::ServerContext* context, const ::qtprotobuf::examples::Address* request, ::qtprotobuf::examples::SimpleResult* response) {
+  (void) context;
+  (void) request;
+  (void) response;
+  return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+}
+
+
+}  // namespace qtprotobuf
+}  // namespace examples
+

+ 574 - 0
examples/addressbookserver/addressbook.grpc.pb.h

@@ -0,0 +1,574 @@
+// Generated by the gRPC C++ plugin.
+// If you make any local change, they will be lost.
+// source: addressbook.proto
+// Original file comments:
+//
+// MIT License
+//
+// Copyright (c) 2019 Alexey Edelev <semlanik@gmail.com>
+//
+// This file is part of qtprotobuf project https://git.semlanik.org/semlanik/qtprotobuf
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this
+// software and associated documentation files (the "Software"), to deal in the Software
+// without restriction, including without limitation the rights to use, copy, modify,
+// merge, publish, distribute, sublicense, and/or sell copies of the Software, and
+// to permit persons to whom the Software is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice shall be included in all copies
+// or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+//
+#ifndef GRPC_addressbook_2eproto__INCLUDED
+#define GRPC_addressbook_2eproto__INCLUDED
+
+#include "addressbook.pb.h"
+
+#include <grpcpp/impl/codegen/async_generic_service.h>
+#include <grpcpp/impl/codegen/async_stream.h>
+#include <grpcpp/impl/codegen/async_unary_call.h>
+#include <grpcpp/impl/codegen/method_handler_impl.h>
+#include <grpcpp/impl/codegen/proto_utils.h>
+#include <grpcpp/impl/codegen/rpc_method.h>
+#include <grpcpp/impl/codegen/service_type.h>
+#include <grpcpp/impl/codegen/status.h>
+#include <grpcpp/impl/codegen/stub_options.h>
+#include <grpcpp/impl/codegen/sync_stream.h>
+
+namespace grpc {
+class CompletionQueue;
+class Channel;
+class ServerCompletionQueue;
+class ServerContext;
+}  // namespace grpc
+
+namespace qtprotobuf {
+namespace examples {
+
+class AddressBook final {
+ public:
+  static constexpr char const* service_full_name() {
+    return "qtprotobuf.examples.AddressBook";
+  }
+  class StubInterface {
+   public:
+    virtual ~StubInterface() {}
+    virtual ::grpc::Status addContact(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::qtprotobuf::examples::Contacts* response) = 0;
+    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>> AsyncaddContact(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>>(AsyncaddContactRaw(context, request, cq));
+    }
+    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>> PrepareAsyncaddContact(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>>(PrepareAsyncaddContactRaw(context, request, cq));
+    }
+    virtual ::grpc::Status removeContact(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::qtprotobuf::examples::Contacts* response) = 0;
+    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>> AsyncremoveContact(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>>(AsyncremoveContactRaw(context, request, cq));
+    }
+    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>> PrepareAsyncremoveContact(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>>(PrepareAsyncremoveContactRaw(context, request, cq));
+    }
+    virtual ::grpc::Status getContacts(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::qtprotobuf::examples::Contacts* response) = 0;
+    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>> AsyncgetContacts(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>>(AsyncgetContactsRaw(context, request, cq));
+    }
+    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>> PrepareAsyncgetContacts(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>>(PrepareAsyncgetContactsRaw(context, request, cq));
+    }
+    virtual ::grpc::Status makeCall(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::qtprotobuf::examples::SimpleResult* response) = 0;
+    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::SimpleResult>> AsyncmakeCall(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::SimpleResult>>(AsyncmakeCallRaw(context, request, cq));
+    }
+    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::SimpleResult>> PrepareAsyncmakeCall(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::SimpleResult>>(PrepareAsyncmakeCallRaw(context, request, cq));
+    }
+    virtual ::grpc::Status navigateTo(::grpc::ClientContext* context, const ::qtprotobuf::examples::Address& request, ::qtprotobuf::examples::SimpleResult* response) = 0;
+    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::SimpleResult>> AsyncnavigateTo(::grpc::ClientContext* context, const ::qtprotobuf::examples::Address& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::SimpleResult>>(AsyncnavigateToRaw(context, request, cq));
+    }
+    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::SimpleResult>> PrepareAsyncnavigateTo(::grpc::ClientContext* context, const ::qtprotobuf::examples::Address& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::SimpleResult>>(PrepareAsyncnavigateToRaw(context, request, cq));
+    }
+  private:
+    virtual ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>* AsyncaddContactRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) = 0;
+    virtual ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>* PrepareAsyncaddContactRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) = 0;
+    virtual ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>* AsyncremoveContactRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) = 0;
+    virtual ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>* PrepareAsyncremoveContactRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) = 0;
+    virtual ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>* AsyncgetContactsRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq) = 0;
+    virtual ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::Contacts>* PrepareAsyncgetContactsRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq) = 0;
+    virtual ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::SimpleResult>* AsyncmakeCallRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) = 0;
+    virtual ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::SimpleResult>* PrepareAsyncmakeCallRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) = 0;
+    virtual ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::SimpleResult>* AsyncnavigateToRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Address& request, ::grpc::CompletionQueue* cq) = 0;
+    virtual ::grpc::ClientAsyncResponseReaderInterface< ::qtprotobuf::examples::SimpleResult>* PrepareAsyncnavigateToRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Address& request, ::grpc::CompletionQueue* cq) = 0;
+  };
+  class Stub final : public StubInterface {
+   public:
+    Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
+    ::grpc::Status addContact(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::qtprotobuf::examples::Contacts* response) override;
+    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>> AsyncaddContact(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>>(AsyncaddContactRaw(context, request, cq));
+    }
+    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>> PrepareAsyncaddContact(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>>(PrepareAsyncaddContactRaw(context, request, cq));
+    }
+    ::grpc::Status removeContact(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::qtprotobuf::examples::Contacts* response) override;
+    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>> AsyncremoveContact(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>>(AsyncremoveContactRaw(context, request, cq));
+    }
+    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>> PrepareAsyncremoveContact(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>>(PrepareAsyncremoveContactRaw(context, request, cq));
+    }
+    ::grpc::Status getContacts(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::qtprotobuf::examples::Contacts* response) override;
+    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>> AsyncgetContacts(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>>(AsyncgetContactsRaw(context, request, cq));
+    }
+    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>> PrepareAsyncgetContacts(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>>(PrepareAsyncgetContactsRaw(context, request, cq));
+    }
+    ::grpc::Status makeCall(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::qtprotobuf::examples::SimpleResult* response) override;
+    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>> AsyncmakeCall(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>>(AsyncmakeCallRaw(context, request, cq));
+    }
+    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>> PrepareAsyncmakeCall(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>>(PrepareAsyncmakeCallRaw(context, request, cq));
+    }
+    ::grpc::Status navigateTo(::grpc::ClientContext* context, const ::qtprotobuf::examples::Address& request, ::qtprotobuf::examples::SimpleResult* response) override;
+    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>> AsyncnavigateTo(::grpc::ClientContext* context, const ::qtprotobuf::examples::Address& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>>(AsyncnavigateToRaw(context, request, cq));
+    }
+    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>> PrepareAsyncnavigateTo(::grpc::ClientContext* context, const ::qtprotobuf::examples::Address& request, ::grpc::CompletionQueue* cq) {
+      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>>(PrepareAsyncnavigateToRaw(context, request, cq));
+    }
+
+   private:
+    std::shared_ptr< ::grpc::ChannelInterface> channel_;
+    ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>* AsyncaddContactRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) override;
+    ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>* PrepareAsyncaddContactRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) override;
+    ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>* AsyncremoveContactRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) override;
+    ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>* PrepareAsyncremoveContactRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) override;
+    ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>* AsyncgetContactsRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq) override;
+    ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::Contacts>* PrepareAsyncgetContactsRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq) override;
+    ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>* AsyncmakeCallRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) override;
+    ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>* PrepareAsyncmakeCallRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Contact& request, ::grpc::CompletionQueue* cq) override;
+    ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>* AsyncnavigateToRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Address& request, ::grpc::CompletionQueue* cq) override;
+    ::grpc::ClientAsyncResponseReader< ::qtprotobuf::examples::SimpleResult>* PrepareAsyncnavigateToRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::Address& request, ::grpc::CompletionQueue* cq) override;
+    const ::grpc::internal::RpcMethod rpcmethod_addContact_;
+    const ::grpc::internal::RpcMethod rpcmethod_removeContact_;
+    const ::grpc::internal::RpcMethod rpcmethod_getContacts_;
+    const ::grpc::internal::RpcMethod rpcmethod_makeCall_;
+    const ::grpc::internal::RpcMethod rpcmethod_navigateTo_;
+  };
+  static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
+
+  class Service : public ::grpc::Service {
+   public:
+    Service();
+    virtual ~Service();
+    virtual ::grpc::Status addContact(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::Contacts* response);
+    virtual ::grpc::Status removeContact(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::Contacts* response);
+    virtual ::grpc::Status getContacts(::grpc::ServerContext* context, const ::qtprotobuf::examples::ListFrame* request, ::qtprotobuf::examples::Contacts* response);
+    virtual ::grpc::Status makeCall(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::SimpleResult* response);
+    virtual ::grpc::Status navigateTo(::grpc::ServerContext* context, const ::qtprotobuf::examples::Address* request, ::qtprotobuf::examples::SimpleResult* response);
+  };
+  template <class BaseClass>
+  class WithAsyncMethod_addContact : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithAsyncMethod_addContact() {
+      ::grpc::Service::MarkMethodAsync(0);
+    }
+    ~WithAsyncMethod_addContact() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status addContact(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::Contacts* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    void RequestaddContact(::grpc::ServerContext* context, ::qtprotobuf::examples::Contact* request, ::grpc::ServerAsyncResponseWriter< ::qtprotobuf::examples::Contacts>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+      ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
+    }
+  };
+  template <class BaseClass>
+  class WithAsyncMethod_removeContact : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithAsyncMethod_removeContact() {
+      ::grpc::Service::MarkMethodAsync(1);
+    }
+    ~WithAsyncMethod_removeContact() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status removeContact(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::Contacts* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    void RequestremoveContact(::grpc::ServerContext* context, ::qtprotobuf::examples::Contact* request, ::grpc::ServerAsyncResponseWriter< ::qtprotobuf::examples::Contacts>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+      ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag);
+    }
+  };
+  template <class BaseClass>
+  class WithAsyncMethod_getContacts : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithAsyncMethod_getContacts() {
+      ::grpc::Service::MarkMethodAsync(2);
+    }
+    ~WithAsyncMethod_getContacts() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status getContacts(::grpc::ServerContext* context, const ::qtprotobuf::examples::ListFrame* request, ::qtprotobuf::examples::Contacts* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    void RequestgetContacts(::grpc::ServerContext* context, ::qtprotobuf::examples::ListFrame* request, ::grpc::ServerAsyncResponseWriter< ::qtprotobuf::examples::Contacts>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+      ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag);
+    }
+  };
+  template <class BaseClass>
+  class WithAsyncMethod_makeCall : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithAsyncMethod_makeCall() {
+      ::grpc::Service::MarkMethodAsync(3);
+    }
+    ~WithAsyncMethod_makeCall() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status makeCall(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::SimpleResult* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    void RequestmakeCall(::grpc::ServerContext* context, ::qtprotobuf::examples::Contact* request, ::grpc::ServerAsyncResponseWriter< ::qtprotobuf::examples::SimpleResult>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+      ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag);
+    }
+  };
+  template <class BaseClass>
+  class WithAsyncMethod_navigateTo : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithAsyncMethod_navigateTo() {
+      ::grpc::Service::MarkMethodAsync(4);
+    }
+    ~WithAsyncMethod_navigateTo() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status navigateTo(::grpc::ServerContext* context, const ::qtprotobuf::examples::Address* request, ::qtprotobuf::examples::SimpleResult* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    void RequestnavigateTo(::grpc::ServerContext* context, ::qtprotobuf::examples::Address* request, ::grpc::ServerAsyncResponseWriter< ::qtprotobuf::examples::SimpleResult>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+      ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag);
+    }
+  };
+  typedef WithAsyncMethod_addContact<WithAsyncMethod_removeContact<WithAsyncMethod_getContacts<WithAsyncMethod_makeCall<WithAsyncMethod_navigateTo<Service > > > > > AsyncService;
+  template <class BaseClass>
+  class WithGenericMethod_addContact : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithGenericMethod_addContact() {
+      ::grpc::Service::MarkMethodGeneric(0);
+    }
+    ~WithGenericMethod_addContact() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status addContact(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::Contacts* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+  };
+  template <class BaseClass>
+  class WithGenericMethod_removeContact : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithGenericMethod_removeContact() {
+      ::grpc::Service::MarkMethodGeneric(1);
+    }
+    ~WithGenericMethod_removeContact() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status removeContact(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::Contacts* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+  };
+  template <class BaseClass>
+  class WithGenericMethod_getContacts : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithGenericMethod_getContacts() {
+      ::grpc::Service::MarkMethodGeneric(2);
+    }
+    ~WithGenericMethod_getContacts() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status getContacts(::grpc::ServerContext* context, const ::qtprotobuf::examples::ListFrame* request, ::qtprotobuf::examples::Contacts* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+  };
+  template <class BaseClass>
+  class WithGenericMethod_makeCall : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithGenericMethod_makeCall() {
+      ::grpc::Service::MarkMethodGeneric(3);
+    }
+    ~WithGenericMethod_makeCall() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status makeCall(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::SimpleResult* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+  };
+  template <class BaseClass>
+  class WithGenericMethod_navigateTo : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithGenericMethod_navigateTo() {
+      ::grpc::Service::MarkMethodGeneric(4);
+    }
+    ~WithGenericMethod_navigateTo() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status navigateTo(::grpc::ServerContext* context, const ::qtprotobuf::examples::Address* request, ::qtprotobuf::examples::SimpleResult* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+  };
+  template <class BaseClass>
+  class WithRawMethod_addContact : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithRawMethod_addContact() {
+      ::grpc::Service::MarkMethodRaw(0);
+    }
+    ~WithRawMethod_addContact() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status addContact(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::Contacts* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    void RequestaddContact(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+      ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
+    }
+  };
+  template <class BaseClass>
+  class WithRawMethod_removeContact : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithRawMethod_removeContact() {
+      ::grpc::Service::MarkMethodRaw(1);
+    }
+    ~WithRawMethod_removeContact() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status removeContact(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::Contacts* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    void RequestremoveContact(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+      ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag);
+    }
+  };
+  template <class BaseClass>
+  class WithRawMethod_getContacts : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithRawMethod_getContacts() {
+      ::grpc::Service::MarkMethodRaw(2);
+    }
+    ~WithRawMethod_getContacts() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status getContacts(::grpc::ServerContext* context, const ::qtprotobuf::examples::ListFrame* request, ::qtprotobuf::examples::Contacts* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    void RequestgetContacts(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+      ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag);
+    }
+  };
+  template <class BaseClass>
+  class WithRawMethod_makeCall : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithRawMethod_makeCall() {
+      ::grpc::Service::MarkMethodRaw(3);
+    }
+    ~WithRawMethod_makeCall() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status makeCall(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::SimpleResult* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    void RequestmakeCall(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+      ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag);
+    }
+  };
+  template <class BaseClass>
+  class WithRawMethod_navigateTo : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithRawMethod_navigateTo() {
+      ::grpc::Service::MarkMethodRaw(4);
+    }
+    ~WithRawMethod_navigateTo() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable synchronous version of this method
+    ::grpc::Status navigateTo(::grpc::ServerContext* context, const ::qtprotobuf::examples::Address* request, ::qtprotobuf::examples::SimpleResult* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    void RequestnavigateTo(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
+      ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag);
+    }
+  };
+  template <class BaseClass>
+  class WithStreamedUnaryMethod_addContact : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithStreamedUnaryMethod_addContact() {
+      ::grpc::Service::MarkMethodStreamed(0,
+        new ::grpc::internal::StreamedUnaryHandler< ::qtprotobuf::examples::Contact, ::qtprotobuf::examples::Contacts>(std::bind(&WithStreamedUnaryMethod_addContact<BaseClass>::StreamedaddContact, this, std::placeholders::_1, std::placeholders::_2)));
+    }
+    ~WithStreamedUnaryMethod_addContact() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable regular version of this method
+    ::grpc::Status addContact(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::Contacts* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    // replace default version of method with streamed unary
+    virtual ::grpc::Status StreamedaddContact(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::qtprotobuf::examples::Contact,::qtprotobuf::examples::Contacts>* server_unary_streamer) = 0;
+  };
+  template <class BaseClass>
+  class WithStreamedUnaryMethod_removeContact : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithStreamedUnaryMethod_removeContact() {
+      ::grpc::Service::MarkMethodStreamed(1,
+        new ::grpc::internal::StreamedUnaryHandler< ::qtprotobuf::examples::Contact, ::qtprotobuf::examples::Contacts>(std::bind(&WithStreamedUnaryMethod_removeContact<BaseClass>::StreamedremoveContact, this, std::placeholders::_1, std::placeholders::_2)));
+    }
+    ~WithStreamedUnaryMethod_removeContact() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable regular version of this method
+    ::grpc::Status removeContact(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::Contacts* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    // replace default version of method with streamed unary
+    virtual ::grpc::Status StreamedremoveContact(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::qtprotobuf::examples::Contact,::qtprotobuf::examples::Contacts>* server_unary_streamer) = 0;
+  };
+  template <class BaseClass>
+  class WithStreamedUnaryMethod_getContacts : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithStreamedUnaryMethod_getContacts() {
+      ::grpc::Service::MarkMethodStreamed(2,
+        new ::grpc::internal::StreamedUnaryHandler< ::qtprotobuf::examples::ListFrame, ::qtprotobuf::examples::Contacts>(std::bind(&WithStreamedUnaryMethod_getContacts<BaseClass>::StreamedgetContacts, this, std::placeholders::_1, std::placeholders::_2)));
+    }
+    ~WithStreamedUnaryMethod_getContacts() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable regular version of this method
+    ::grpc::Status getContacts(::grpc::ServerContext* context, const ::qtprotobuf::examples::ListFrame* request, ::qtprotobuf::examples::Contacts* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    // replace default version of method with streamed unary
+    virtual ::grpc::Status StreamedgetContacts(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::qtprotobuf::examples::ListFrame,::qtprotobuf::examples::Contacts>* server_unary_streamer) = 0;
+  };
+  template <class BaseClass>
+  class WithStreamedUnaryMethod_makeCall : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithStreamedUnaryMethod_makeCall() {
+      ::grpc::Service::MarkMethodStreamed(3,
+        new ::grpc::internal::StreamedUnaryHandler< ::qtprotobuf::examples::Contact, ::qtprotobuf::examples::SimpleResult>(std::bind(&WithStreamedUnaryMethod_makeCall<BaseClass>::StreamedmakeCall, this, std::placeholders::_1, std::placeholders::_2)));
+    }
+    ~WithStreamedUnaryMethod_makeCall() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable regular version of this method
+    ::grpc::Status makeCall(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::SimpleResult* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    // replace default version of method with streamed unary
+    virtual ::grpc::Status StreamedmakeCall(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::qtprotobuf::examples::Contact,::qtprotobuf::examples::SimpleResult>* server_unary_streamer) = 0;
+  };
+  template <class BaseClass>
+  class WithStreamedUnaryMethod_navigateTo : public BaseClass {
+   private:
+    void BaseClassMustBeDerivedFromService(const Service *service) {}
+   public:
+    WithStreamedUnaryMethod_navigateTo() {
+      ::grpc::Service::MarkMethodStreamed(4,
+        new ::grpc::internal::StreamedUnaryHandler< ::qtprotobuf::examples::Address, ::qtprotobuf::examples::SimpleResult>(std::bind(&WithStreamedUnaryMethod_navigateTo<BaseClass>::StreamednavigateTo, this, std::placeholders::_1, std::placeholders::_2)));
+    }
+    ~WithStreamedUnaryMethod_navigateTo() override {
+      BaseClassMustBeDerivedFromService(this);
+    }
+    // disable regular version of this method
+    ::grpc::Status navigateTo(::grpc::ServerContext* context, const ::qtprotobuf::examples::Address* request, ::qtprotobuf::examples::SimpleResult* response) override {
+      abort();
+      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
+    }
+    // replace default version of method with streamed unary
+    virtual ::grpc::Status StreamednavigateTo(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::qtprotobuf::examples::Address,::qtprotobuf::examples::SimpleResult>* server_unary_streamer) = 0;
+  };
+  typedef WithStreamedUnaryMethod_addContact<WithStreamedUnaryMethod_removeContact<WithStreamedUnaryMethod_getContacts<WithStreamedUnaryMethod_makeCall<WithStreamedUnaryMethod_navigateTo<Service > > > > > StreamedUnaryService;
+  typedef Service SplitStreamedService;
+  typedef WithStreamedUnaryMethod_addContact<WithStreamedUnaryMethod_removeContact<WithStreamedUnaryMethod_getContacts<WithStreamedUnaryMethod_makeCall<WithStreamedUnaryMethod_navigateTo<Service > > > > > StreamedService;
+};
+
+}  // namespace examples
+}  // namespace qtprotobuf
+
+
+#endif  // GRPC_addressbook_2eproto__INCLUDED

+ 2750 - 0
examples/addressbookserver/addressbook.pb.cc

@@ -0,0 +1,2750 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: addressbook.proto
+
+#include "addressbook.pb.h"
+
+#include <algorithm>
+
+#include <google/protobuf/stubs/common.h>
+#include <google/protobuf/stubs/port.h>
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/wire_format_lite_inl.h>
+#include <google/protobuf/descriptor.h>
+#include <google/protobuf/generated_message_reflection.h>
+#include <google/protobuf/reflection_ops.h>
+#include <google/protobuf/wire_format.h>
+// This is a temporary google only hack
+#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
+#include "third_party/protobuf/version.h"
+#endif
+// @@protoc_insertion_point(includes)
+
+namespace protobuf_addressbook_2eproto {
+extern PROTOBUF_INTERNAL_EXPORT_protobuf_addressbook_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Address;
+extern PROTOBUF_INTERNAL_EXPORT_protobuf_addressbook_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PhoneNumber;
+extern PROTOBUF_INTERNAL_EXPORT_protobuf_addressbook_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Contact_PhonesEntry_DoNotUse;
+extern PROTOBUF_INTERNAL_EXPORT_protobuf_addressbook_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Job;
+extern PROTOBUF_INTERNAL_EXPORT_protobuf_addressbook_2eproto ::google::protobuf::internal::SCCInfo<3> scc_info_Contact;
+}  // namespace protobuf_addressbook_2eproto
+namespace qtprotobuf {
+namespace examples {
+class PhoneNumberDefaultTypeInternal {
+ public:
+  ::google::protobuf::internal::ExplicitlyConstructed<PhoneNumber>
+      _instance;
+} _PhoneNumber_default_instance_;
+class AddressDefaultTypeInternal {
+ public:
+  ::google::protobuf::internal::ExplicitlyConstructed<Address>
+      _instance;
+} _Address_default_instance_;
+class JobDefaultTypeInternal {
+ public:
+  ::google::protobuf::internal::ExplicitlyConstructed<Job>
+      _instance;
+} _Job_default_instance_;
+class Contact_PhonesEntry_DoNotUseDefaultTypeInternal {
+ public:
+  ::google::protobuf::internal::ExplicitlyConstructed<Contact_PhonesEntry_DoNotUse>
+      _instance;
+} _Contact_PhonesEntry_DoNotUse_default_instance_;
+class ContactDefaultTypeInternal {
+ public:
+  ::google::protobuf::internal::ExplicitlyConstructed<Contact>
+      _instance;
+} _Contact_default_instance_;
+class ContactsDefaultTypeInternal {
+ public:
+  ::google::protobuf::internal::ExplicitlyConstructed<Contacts>
+      _instance;
+} _Contacts_default_instance_;
+class SimpleResultDefaultTypeInternal {
+ public:
+  ::google::protobuf::internal::ExplicitlyConstructed<SimpleResult>
+      _instance;
+} _SimpleResult_default_instance_;
+class ListFrameDefaultTypeInternal {
+ public:
+  ::google::protobuf::internal::ExplicitlyConstructed<ListFrame>
+      _instance;
+} _ListFrame_default_instance_;
+}  // namespace examples
+}  // namespace qtprotobuf
+namespace protobuf_addressbook_2eproto {
+static void InitDefaultsPhoneNumber() {
+  GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+  {
+    void* ptr = &::qtprotobuf::examples::_PhoneNumber_default_instance_;
+    new (ptr) ::qtprotobuf::examples::PhoneNumber();
+    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+  }
+  ::qtprotobuf::examples::PhoneNumber::InitAsDefaultInstance();
+}
+
+::google::protobuf::internal::SCCInfo<0> scc_info_PhoneNumber =
+    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPhoneNumber}, {}};
+
+static void InitDefaultsAddress() {
+  GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+  {
+    void* ptr = &::qtprotobuf::examples::_Address_default_instance_;
+    new (ptr) ::qtprotobuf::examples::Address();
+    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+  }
+  ::qtprotobuf::examples::Address::InitAsDefaultInstance();
+}
+
+::google::protobuf::internal::SCCInfo<0> scc_info_Address =
+    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAddress}, {}};
+
+static void InitDefaultsJob() {
+  GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+  {
+    void* ptr = &::qtprotobuf::examples::_Job_default_instance_;
+    new (ptr) ::qtprotobuf::examples::Job();
+    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+  }
+  ::qtprotobuf::examples::Job::InitAsDefaultInstance();
+}
+
+::google::protobuf::internal::SCCInfo<1> scc_info_Job =
+    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsJob}, {
+      &protobuf_addressbook_2eproto::scc_info_Address.base,}};
+
+static void InitDefaultsContact_PhonesEntry_DoNotUse() {
+  GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+  {
+    void* ptr = &::qtprotobuf::examples::_Contact_PhonesEntry_DoNotUse_default_instance_;
+    new (ptr) ::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse();
+  }
+  ::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse::InitAsDefaultInstance();
+}
+
+::google::protobuf::internal::SCCInfo<1> scc_info_Contact_PhonesEntry_DoNotUse =
+    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsContact_PhonesEntry_DoNotUse}, {
+      &protobuf_addressbook_2eproto::scc_info_PhoneNumber.base,}};
+
+static void InitDefaultsContact() {
+  GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+  {
+    void* ptr = &::qtprotobuf::examples::_Contact_default_instance_;
+    new (ptr) ::qtprotobuf::examples::Contact();
+    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+  }
+  ::qtprotobuf::examples::Contact::InitAsDefaultInstance();
+}
+
+::google::protobuf::internal::SCCInfo<3> scc_info_Contact =
+    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsContact}, {
+      &protobuf_addressbook_2eproto::scc_info_Contact_PhonesEntry_DoNotUse.base,
+      &protobuf_addressbook_2eproto::scc_info_Address.base,
+      &protobuf_addressbook_2eproto::scc_info_Job.base,}};
+
+static void InitDefaultsContacts() {
+  GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+  {
+    void* ptr = &::qtprotobuf::examples::_Contacts_default_instance_;
+    new (ptr) ::qtprotobuf::examples::Contacts();
+    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+  }
+  ::qtprotobuf::examples::Contacts::InitAsDefaultInstance();
+}
+
+::google::protobuf::internal::SCCInfo<1> scc_info_Contacts =
+    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsContacts}, {
+      &protobuf_addressbook_2eproto::scc_info_Contact.base,}};
+
+static void InitDefaultsSimpleResult() {
+  GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+  {
+    void* ptr = &::qtprotobuf::examples::_SimpleResult_default_instance_;
+    new (ptr) ::qtprotobuf::examples::SimpleResult();
+    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+  }
+  ::qtprotobuf::examples::SimpleResult::InitAsDefaultInstance();
+}
+
+::google::protobuf::internal::SCCInfo<0> scc_info_SimpleResult =
+    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSimpleResult}, {}};
+
+static void InitDefaultsListFrame() {
+  GOOGLE_PROTOBUF_VERIFY_VERSION;
+
+  {
+    void* ptr = &::qtprotobuf::examples::_ListFrame_default_instance_;
+    new (ptr) ::qtprotobuf::examples::ListFrame();
+    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
+  }
+  ::qtprotobuf::examples::ListFrame::InitAsDefaultInstance();
+}
+
+::google::protobuf::internal::SCCInfo<0> scc_info_ListFrame =
+    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsListFrame}, {}};
+
+void InitDefaults() {
+  ::google::protobuf::internal::InitSCC(&scc_info_PhoneNumber.base);
+  ::google::protobuf::internal::InitSCC(&scc_info_Address.base);
+  ::google::protobuf::internal::InitSCC(&scc_info_Job.base);
+  ::google::protobuf::internal::InitSCC(&scc_info_Contact_PhonesEntry_DoNotUse.base);
+  ::google::protobuf::internal::InitSCC(&scc_info_Contact.base);
+  ::google::protobuf::internal::InitSCC(&scc_info_Contacts.base);
+  ::google::protobuf::internal::InitSCC(&scc_info_SimpleResult.base);
+  ::google::protobuf::internal::InitSCC(&scc_info_ListFrame.base);
+}
+
+::google::protobuf::Metadata file_level_metadata[8];
+const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
+
+const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+  ~0u,  // no _has_bits_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::PhoneNumber, _internal_metadata_),
+  ~0u,  // no _extensions_
+  ~0u,  // no _oneof_case_
+  ~0u,  // no _weak_field_map_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::PhoneNumber, countrycode_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::PhoneNumber, number_),
+  ~0u,  // no _has_bits_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Address, _internal_metadata_),
+  ~0u,  // no _extensions_
+  ~0u,  // no _oneof_case_
+  ~0u,  // no _weak_field_map_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Address, zipcode_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Address, streetaddress1_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Address, streetaddress2_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Address, state_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Address, country_),
+  ~0u,  // no _has_bits_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Job, _internal_metadata_),
+  ~0u,  // no _extensions_
+  ~0u,  // no _oneof_case_
+  ~0u,  // no _weak_field_map_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Job, title_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Job, officeaddress_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse, _has_bits_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse, _internal_metadata_),
+  ~0u,  // no _extensions_
+  ~0u,  // no _oneof_case_
+  ~0u,  // no _weak_field_map_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse, key_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse, value_),
+  0,
+  1,
+  ~0u,  // no _has_bits_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact, _internal_metadata_),
+  ~0u,  // no _extensions_
+  ~0u,  // no _oneof_case_
+  ~0u,  // no _weak_field_map_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact, firstname_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact, lastname_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact, middlename_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact, phones_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact, address_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contact, job_),
+  ~0u,  // no _has_bits_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contacts, _internal_metadata_),
+  ~0u,  // no _extensions_
+  ~0u,  // no _oneof_case_
+  ~0u,  // no _weak_field_map_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::Contacts, list_),
+  ~0u,  // no _has_bits_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::SimpleResult, _internal_metadata_),
+  ~0u,  // no _extensions_
+  ~0u,  // no _oneof_case_
+  ~0u,  // no _weak_field_map_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::SimpleResult, ok_),
+  ~0u,  // no _has_bits_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::ListFrame, _internal_metadata_),
+  ~0u,  // no _extensions_
+  ~0u,  // no _oneof_case_
+  ~0u,  // no _weak_field_map_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::ListFrame, start_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::qtprotobuf::examples::ListFrame, end_),
+};
+static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+  { 0, -1, sizeof(::qtprotobuf::examples::PhoneNumber)},
+  { 7, -1, sizeof(::qtprotobuf::examples::Address)},
+  { 17, -1, sizeof(::qtprotobuf::examples::Job)},
+  { 24, 31, sizeof(::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse)},
+  { 33, -1, sizeof(::qtprotobuf::examples::Contact)},
+  { 44, -1, sizeof(::qtprotobuf::examples::Contacts)},
+  { 50, -1, sizeof(::qtprotobuf::examples::SimpleResult)},
+  { 56, -1, sizeof(::qtprotobuf::examples::ListFrame)},
+};
+
+static ::google::protobuf::Message const * const file_default_instances[] = {
+  reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_PhoneNumber_default_instance_),
+  reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_Address_default_instance_),
+  reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_Job_default_instance_),
+  reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_Contact_PhonesEntry_DoNotUse_default_instance_),
+  reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_Contact_default_instance_),
+  reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_Contacts_default_instance_),
+  reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_SimpleResult_default_instance_),
+  reinterpret_cast<const ::google::protobuf::Message*>(&::qtprotobuf::examples::_ListFrame_default_instance_),
+};
+
+void protobuf_AssignDescriptors() {
+  AddDescriptors();
+  AssignDescriptors(
+      "addressbook.proto", schemas, file_default_instances, TableStruct::offsets,
+      file_level_metadata, file_level_enum_descriptors, NULL);
+}
+
+void protobuf_AssignDescriptorsOnce() {
+  static ::google::protobuf::internal::once_flag once;
+  ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
+}
+
+void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
+void protobuf_RegisterTypes(const ::std::string&) {
+  protobuf_AssignDescriptorsOnce();
+  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 8);
+}
+
+void AddDescriptorsImpl() {
+  InitDefaults();
+  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
+      "\n\021addressbook.proto\022\023qtprotobuf.examples"
+      "\"2\n\013PhoneNumber\022\023\n\013countryCode\030\001 \001(\r\022\016\n\006"
+      "number\030\002 \003(\004\"j\n\007Address\022\017\n\007zipCode\030\001 \001(\004"
+      "\022\026\n\016streetAddress1\030\002 \001(\t\022\026\n\016streetAddres"
+      "s2\030\003 \001(\t\022\r\n\005state\030\004 \001(\t\022\017\n\007country\030\005 \001(\r"
+      "\"I\n\003Job\022\r\n\005title\030\001 \001(\t\0223\n\rofficeAddress\030"
+      "\002 \001(\0132\034.qtprotobuf.examples.Address\"\333\002\n\007"
+      "Contact\022\021\n\tfirstName\030\001 \001(\t\022\020\n\010lastName\030\002"
+      " \001(\t\022\022\n\nmiddleName\030\003 \001(\t\0228\n\006phones\030\004 \003(\013"
+      "2(.qtprotobuf.examples.Contact.PhonesEnt"
+      "ry\022-\n\007address\030\005 \001(\0132\034.qtprotobuf.example"
+      "s.Address\022%\n\003job\030\006 \001(\0132\030.qtprotobuf.exam"
+      "ples.Job\032O\n\013PhonesEntry\022\013\n\003key\030\001 \001(\005\022/\n\005"
+      "value\030\002 \001(\0132 .qtprotobuf.examples.PhoneN"
+      "umber:\0028\001\"6\n\tPhoneType\022\010\n\004Home\020\000\022\010\n\004Work"
+      "\020\001\022\n\n\006Mobile\020\002\022\t\n\005Other\020\003\"6\n\010Contacts\022*\n"
+      "\004list\030\001 \003(\0132\034.qtprotobuf.examples.Contac"
+      "t\"\032\n\014SimpleResult\022\n\n\002ok\030\001 \001(\010\"\'\n\tListFra"
+      "me\022\r\n\005start\030\001 \001(\021\022\013\n\003end\030\002 \001(\0212\232\003\n\013Addre"
+      "ssBook\022K\n\naddContact\022\034.qtprotobuf.exampl"
+      "es.Contact\032\035.qtprotobuf.examples.Contact"
+      "s\"\000\022N\n\rremoveContact\022\034.qtprotobuf.exampl"
+      "es.Contact\032\035.qtprotobuf.examples.Contact"
+      "s\"\000\022N\n\013getContacts\022\036.qtprotobuf.examples"
+      ".ListFrame\032\035.qtprotobuf.examples.Contact"
+      "s\"\000\022M\n\010makeCall\022\034.qtprotobuf.examples.Co"
+      "ntact\032!.qtprotobuf.examples.SimpleResult"
+      "\"\000\022O\n\nnavigateTo\022\034.qtprotobuf.examples.A"
+      "ddress\032!.qtprotobuf.examples.SimpleResul"
+      "t\"\000b\006proto3"
+  };
+  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
+      descriptor, 1171);
+  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
+    "addressbook.proto", &protobuf_RegisterTypes);
+}
+
+void AddDescriptors() {
+  static ::google::protobuf::internal::once_flag once;
+  ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
+}
+// Force AddDescriptors() to be called at dynamic initialization time.
+struct StaticDescriptorInitializer {
+  StaticDescriptorInitializer() {
+    AddDescriptors();
+  }
+} static_descriptor_initializer;
+}  // namespace protobuf_addressbook_2eproto
+namespace qtprotobuf {
+namespace examples {
+const ::google::protobuf::EnumDescriptor* Contact_PhoneType_descriptor() {
+  protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return protobuf_addressbook_2eproto::file_level_enum_descriptors[0];
+}
+bool Contact_PhoneType_IsValid(int value) {
+  switch (value) {
+    case 0:
+    case 1:
+    case 2:
+    case 3:
+      return true;
+    default:
+      return false;
+  }
+}
+
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const Contact_PhoneType Contact::Home;
+const Contact_PhoneType Contact::Work;
+const Contact_PhoneType Contact::Mobile;
+const Contact_PhoneType Contact::Other;
+const Contact_PhoneType Contact::PhoneType_MIN;
+const Contact_PhoneType Contact::PhoneType_MAX;
+const int Contact::PhoneType_ARRAYSIZE;
+#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+// ===================================================================
+
+void PhoneNumber::InitAsDefaultInstance() {
+}
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int PhoneNumber::kCountryCodeFieldNumber;
+const int PhoneNumber::kNumberFieldNumber;
+#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+PhoneNumber::PhoneNumber()
+  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  ::google::protobuf::internal::InitSCC(
+      &protobuf_addressbook_2eproto::scc_info_PhoneNumber.base);
+  SharedCtor();
+  // @@protoc_insertion_point(constructor:qtprotobuf.examples.PhoneNumber)
+}
+PhoneNumber::PhoneNumber(const PhoneNumber& from)
+  : ::google::protobuf::Message(),
+      _internal_metadata_(NULL),
+      number_(from.number_) {
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  countrycode_ = from.countrycode_;
+  // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.PhoneNumber)
+}
+
+void PhoneNumber::SharedCtor() {
+  countrycode_ = 0u;
+}
+
+PhoneNumber::~PhoneNumber() {
+  // @@protoc_insertion_point(destructor:qtprotobuf.examples.PhoneNumber)
+  SharedDtor();
+}
+
+void PhoneNumber::SharedDtor() {
+}
+
+void PhoneNumber::SetCachedSize(int size) const {
+  _cached_size_.Set(size);
+}
+const ::google::protobuf::Descriptor* PhoneNumber::descriptor() {
+  ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
+}
+
+const PhoneNumber& PhoneNumber::default_instance() {
+  ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_PhoneNumber.base);
+  return *internal_default_instance();
+}
+
+
+void PhoneNumber::Clear() {
+// @@protoc_insertion_point(message_clear_start:qtprotobuf.examples.PhoneNumber)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  // Prevent compiler warnings about cached_has_bits being unused
+  (void) cached_has_bits;
+
+  number_.Clear();
+  countrycode_ = 0u;
+  _internal_metadata_.Clear();
+}
+
+bool PhoneNumber::MergePartialFromCodedStream(
+    ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+  ::google::protobuf::uint32 tag;
+  // @@protoc_insertion_point(parse_start:qtprotobuf.examples.PhoneNumber)
+  for (;;) {
+    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    tag = p.first;
+    if (!p.second) goto handle_unusual;
+    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+      // uint32 countryCode = 1;
+      case 1: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
+
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
+                 input, &countrycode_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // repeated uint64 number = 2;
+      case 2: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
+                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
+                 input, this->mutable_number())));
+        } else if (
+            static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
+          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
+                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
+                 1, 18u, input, this->mutable_number())));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      default: {
+      handle_unusual:
+        if (tag == 0) {
+          goto success;
+        }
+        DO_(::google::protobuf::internal::WireFormat::SkipField(
+              input, tag, _internal_metadata_.mutable_unknown_fields()));
+        break;
+      }
+    }
+  }
+success:
+  // @@protoc_insertion_point(parse_success:qtprotobuf.examples.PhoneNumber)
+  return true;
+failure:
+  // @@protoc_insertion_point(parse_failure:qtprotobuf.examples.PhoneNumber)
+  return false;
+#undef DO_
+}
+
+void PhoneNumber::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // @@protoc_insertion_point(serialize_start:qtprotobuf.examples.PhoneNumber)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  // uint32 countryCode = 1;
+  if (this->countrycode() != 0) {
+    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->countrycode(), output);
+  }
+
+  // repeated uint64 number = 2;
+  if (this->number_size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
+    output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
+        _number_cached_byte_size_));
+  }
+  for (int i = 0, n = this->number_size(); i < n; i++) {
+    ::google::protobuf::internal::WireFormatLite::WriteUInt64NoTag(
+      this->number(i), output);
+  }
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
+  }
+  // @@protoc_insertion_point(serialize_end:qtprotobuf.examples.PhoneNumber)
+}
+
+::google::protobuf::uint8* PhoneNumber::InternalSerializeWithCachedSizesToArray(
+    bool deterministic, ::google::protobuf::uint8* target) const {
+  (void)deterministic; // Unused
+  // @@protoc_insertion_point(serialize_to_array_start:qtprotobuf.examples.PhoneNumber)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  // uint32 countryCode = 1;
+  if (this->countrycode() != 0) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->countrycode(), target);
+  }
+
+  // repeated uint64 number = 2;
+  if (this->number_size() > 0) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
+      2,
+      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
+      target);
+    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
+        static_cast< ::google::protobuf::int32>(
+            _number_cached_byte_size_), target);
+    target = ::google::protobuf::internal::WireFormatLite::
+      WriteUInt64NoTagToArray(this->number_, target);
+  }
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
+  }
+  // @@protoc_insertion_point(serialize_to_array_end:qtprotobuf.examples.PhoneNumber)
+  return target;
+}
+
+size_t PhoneNumber::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:qtprotobuf.examples.PhoneNumber)
+  size_t total_size = 0;
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    total_size +=
+      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
+  }
+  // repeated uint64 number = 2;
+  {
+    size_t data_size = ::google::protobuf::internal::WireFormatLite::
+      UInt64Size(this->number_);
+    if (data_size > 0) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::Int32Size(
+            static_cast< ::google::protobuf::int32>(data_size));
+    }
+    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
+    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+    _number_cached_byte_size_ = cached_size;
+    GOOGLE_SAFE_CONCURRENT_WRITES_END();
+    total_size += data_size;
+  }
+
+  // uint32 countryCode = 1;
+  if (this->countrycode() != 0) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::UInt32Size(
+        this->countrycode());
+  }
+
+  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+  SetCachedSize(cached_size);
+  return total_size;
+}
+
+void PhoneNumber::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:qtprotobuf.examples.PhoneNumber)
+  GOOGLE_DCHECK_NE(&from, this);
+  const PhoneNumber* source =
+      ::google::protobuf::internal::DynamicCastToGenerated<const PhoneNumber>(
+          &from);
+  if (source == NULL) {
+  // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobuf.examples.PhoneNumber)
+    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+  } else {
+  // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobuf.examples.PhoneNumber)
+    MergeFrom(*source);
+  }
+}
+
+void PhoneNumber::MergeFrom(const PhoneNumber& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:qtprotobuf.examples.PhoneNumber)
+  GOOGLE_DCHECK_NE(&from, this);
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  number_.MergeFrom(from.number_);
+  if (from.countrycode() != 0) {
+    set_countrycode(from.countrycode());
+  }
+}
+
+void PhoneNumber::CopyFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:qtprotobuf.examples.PhoneNumber)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+void PhoneNumber::CopyFrom(const PhoneNumber& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:qtprotobuf.examples.PhoneNumber)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool PhoneNumber::IsInitialized() const {
+  return true;
+}
+
+void PhoneNumber::Swap(PhoneNumber* other) {
+  if (other == this) return;
+  InternalSwap(other);
+}
+void PhoneNumber::InternalSwap(PhoneNumber* other) {
+  using std::swap;
+  number_.InternalSwap(&other->number_);
+  swap(countrycode_, other->countrycode_);
+  _internal_metadata_.Swap(&other->_internal_metadata_);
+}
+
+::google::protobuf::Metadata PhoneNumber::GetMetadata() const {
+  protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
+}
+
+
+// ===================================================================
+
+void Address::InitAsDefaultInstance() {
+}
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int Address::kZipCodeFieldNumber;
+const int Address::kStreetAddress1FieldNumber;
+const int Address::kStreetAddress2FieldNumber;
+const int Address::kStateFieldNumber;
+const int Address::kCountryFieldNumber;
+#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+Address::Address()
+  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  ::google::protobuf::internal::InitSCC(
+      &protobuf_addressbook_2eproto::scc_info_Address.base);
+  SharedCtor();
+  // @@protoc_insertion_point(constructor:qtprotobuf.examples.Address)
+}
+Address::Address(const Address& from)
+  : ::google::protobuf::Message(),
+      _internal_metadata_(NULL) {
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  streetaddress1_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (from.streetaddress1().size() > 0) {
+    streetaddress1_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.streetaddress1_);
+  }
+  streetaddress2_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (from.streetaddress2().size() > 0) {
+    streetaddress2_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.streetaddress2_);
+  }
+  state_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (from.state().size() > 0) {
+    state_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.state_);
+  }
+  ::memcpy(&zipcode_, &from.zipcode_,
+    static_cast<size_t>(reinterpret_cast<char*>(&country_) -
+    reinterpret_cast<char*>(&zipcode_)) + sizeof(country_));
+  // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.Address)
+}
+
+void Address::SharedCtor() {
+  streetaddress1_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  streetaddress2_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  state_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  ::memset(&zipcode_, 0, static_cast<size_t>(
+      reinterpret_cast<char*>(&country_) -
+      reinterpret_cast<char*>(&zipcode_)) + sizeof(country_));
+}
+
+Address::~Address() {
+  // @@protoc_insertion_point(destructor:qtprotobuf.examples.Address)
+  SharedDtor();
+}
+
+void Address::SharedDtor() {
+  streetaddress1_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  streetaddress2_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  state_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+
+void Address::SetCachedSize(int size) const {
+  _cached_size_.Set(size);
+}
+const ::google::protobuf::Descriptor* Address::descriptor() {
+  ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
+}
+
+const Address& Address::default_instance() {
+  ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_Address.base);
+  return *internal_default_instance();
+}
+
+
+void Address::Clear() {
+// @@protoc_insertion_point(message_clear_start:qtprotobuf.examples.Address)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  // Prevent compiler warnings about cached_has_bits being unused
+  (void) cached_has_bits;
+
+  streetaddress1_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  streetaddress2_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  state_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  ::memset(&zipcode_, 0, static_cast<size_t>(
+      reinterpret_cast<char*>(&country_) -
+      reinterpret_cast<char*>(&zipcode_)) + sizeof(country_));
+  _internal_metadata_.Clear();
+}
+
+bool Address::MergePartialFromCodedStream(
+    ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+  ::google::protobuf::uint32 tag;
+  // @@protoc_insertion_point(parse_start:qtprotobuf.examples.Address)
+  for (;;) {
+    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    tag = p.first;
+    if (!p.second) goto handle_unusual;
+    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+      // uint64 zipCode = 1;
+      case 1: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
+
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
+                 input, &zipcode_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // string streetAddress1 = 2;
+      case 2: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_streetaddress1()));
+          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+            this->streetaddress1().data(), static_cast<int>(this->streetaddress1().length()),
+            ::google::protobuf::internal::WireFormatLite::PARSE,
+            "qtprotobuf.examples.Address.streetAddress1"));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // string streetAddress2 = 3;
+      case 3: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_streetaddress2()));
+          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+            this->streetaddress2().data(), static_cast<int>(this->streetaddress2().length()),
+            ::google::protobuf::internal::WireFormatLite::PARSE,
+            "qtprotobuf.examples.Address.streetAddress2"));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // string state = 4;
+      case 4: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_state()));
+          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+            this->state().data(), static_cast<int>(this->state().length()),
+            ::google::protobuf::internal::WireFormatLite::PARSE,
+            "qtprotobuf.examples.Address.state"));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // uint32 country = 5;
+      case 5: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
+
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
+                 input, &country_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      default: {
+      handle_unusual:
+        if (tag == 0) {
+          goto success;
+        }
+        DO_(::google::protobuf::internal::WireFormat::SkipField(
+              input, tag, _internal_metadata_.mutable_unknown_fields()));
+        break;
+      }
+    }
+  }
+success:
+  // @@protoc_insertion_point(parse_success:qtprotobuf.examples.Address)
+  return true;
+failure:
+  // @@protoc_insertion_point(parse_failure:qtprotobuf.examples.Address)
+  return false;
+#undef DO_
+}
+
+void Address::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // @@protoc_insertion_point(serialize_start:qtprotobuf.examples.Address)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  // uint64 zipCode = 1;
+  if (this->zipcode() != 0) {
+    ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->zipcode(), output);
+  }
+
+  // string streetAddress1 = 2;
+  if (this->streetaddress1().size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+      this->streetaddress1().data(), static_cast<int>(this->streetaddress1().length()),
+      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+      "qtprotobuf.examples.Address.streetAddress1");
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      2, this->streetaddress1(), output);
+  }
+
+  // string streetAddress2 = 3;
+  if (this->streetaddress2().size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+      this->streetaddress2().data(), static_cast<int>(this->streetaddress2().length()),
+      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+      "qtprotobuf.examples.Address.streetAddress2");
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      3, this->streetaddress2(), output);
+  }
+
+  // string state = 4;
+  if (this->state().size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+      this->state().data(), static_cast<int>(this->state().length()),
+      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+      "qtprotobuf.examples.Address.state");
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      4, this->state(), output);
+  }
+
+  // uint32 country = 5;
+  if (this->country() != 0) {
+    ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->country(), output);
+  }
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
+  }
+  // @@protoc_insertion_point(serialize_end:qtprotobuf.examples.Address)
+}
+
+::google::protobuf::uint8* Address::InternalSerializeWithCachedSizesToArray(
+    bool deterministic, ::google::protobuf::uint8* target) const {
+  (void)deterministic; // Unused
+  // @@protoc_insertion_point(serialize_to_array_start:qtprotobuf.examples.Address)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  // uint64 zipCode = 1;
+  if (this->zipcode() != 0) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->zipcode(), target);
+  }
+
+  // string streetAddress1 = 2;
+  if (this->streetaddress1().size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+      this->streetaddress1().data(), static_cast<int>(this->streetaddress1().length()),
+      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+      "qtprotobuf.examples.Address.streetAddress1");
+    target =
+      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+        2, this->streetaddress1(), target);
+  }
+
+  // string streetAddress2 = 3;
+  if (this->streetaddress2().size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+      this->streetaddress2().data(), static_cast<int>(this->streetaddress2().length()),
+      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+      "qtprotobuf.examples.Address.streetAddress2");
+    target =
+      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+        3, this->streetaddress2(), target);
+  }
+
+  // string state = 4;
+  if (this->state().size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+      this->state().data(), static_cast<int>(this->state().length()),
+      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+      "qtprotobuf.examples.Address.state");
+    target =
+      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+        4, this->state(), target);
+  }
+
+  // uint32 country = 5;
+  if (this->country() != 0) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->country(), target);
+  }
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
+  }
+  // @@protoc_insertion_point(serialize_to_array_end:qtprotobuf.examples.Address)
+  return target;
+}
+
+size_t Address::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:qtprotobuf.examples.Address)
+  size_t total_size = 0;
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    total_size +=
+      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
+  }
+  // string streetAddress1 = 2;
+  if (this->streetaddress1().size() > 0) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->streetaddress1());
+  }
+
+  // string streetAddress2 = 3;
+  if (this->streetaddress2().size() > 0) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->streetaddress2());
+  }
+
+  // string state = 4;
+  if (this->state().size() > 0) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->state());
+  }
+
+  // uint64 zipCode = 1;
+  if (this->zipcode() != 0) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::UInt64Size(
+        this->zipcode());
+  }
+
+  // uint32 country = 5;
+  if (this->country() != 0) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::UInt32Size(
+        this->country());
+  }
+
+  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+  SetCachedSize(cached_size);
+  return total_size;
+}
+
+void Address::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:qtprotobuf.examples.Address)
+  GOOGLE_DCHECK_NE(&from, this);
+  const Address* source =
+      ::google::protobuf::internal::DynamicCastToGenerated<const Address>(
+          &from);
+  if (source == NULL) {
+  // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobuf.examples.Address)
+    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+  } else {
+  // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobuf.examples.Address)
+    MergeFrom(*source);
+  }
+}
+
+void Address::MergeFrom(const Address& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:qtprotobuf.examples.Address)
+  GOOGLE_DCHECK_NE(&from, this);
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  if (from.streetaddress1().size() > 0) {
+
+    streetaddress1_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.streetaddress1_);
+  }
+  if (from.streetaddress2().size() > 0) {
+
+    streetaddress2_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.streetaddress2_);
+  }
+  if (from.state().size() > 0) {
+
+    state_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.state_);
+  }
+  if (from.zipcode() != 0) {
+    set_zipcode(from.zipcode());
+  }
+  if (from.country() != 0) {
+    set_country(from.country());
+  }
+}
+
+void Address::CopyFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:qtprotobuf.examples.Address)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+void Address::CopyFrom(const Address& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:qtprotobuf.examples.Address)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool Address::IsInitialized() const {
+  return true;
+}
+
+void Address::Swap(Address* other) {
+  if (other == this) return;
+  InternalSwap(other);
+}
+void Address::InternalSwap(Address* other) {
+  using std::swap;
+  streetaddress1_.Swap(&other->streetaddress1_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+    GetArenaNoVirtual());
+  streetaddress2_.Swap(&other->streetaddress2_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+    GetArenaNoVirtual());
+  state_.Swap(&other->state_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+    GetArenaNoVirtual());
+  swap(zipcode_, other->zipcode_);
+  swap(country_, other->country_);
+  _internal_metadata_.Swap(&other->_internal_metadata_);
+}
+
+::google::protobuf::Metadata Address::GetMetadata() const {
+  protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
+}
+
+
+// ===================================================================
+
+void Job::InitAsDefaultInstance() {
+  ::qtprotobuf::examples::_Job_default_instance_._instance.get_mutable()->officeaddress_ = const_cast< ::qtprotobuf::examples::Address*>(
+      ::qtprotobuf::examples::Address::internal_default_instance());
+}
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int Job::kTitleFieldNumber;
+const int Job::kOfficeAddressFieldNumber;
+#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+Job::Job()
+  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  ::google::protobuf::internal::InitSCC(
+      &protobuf_addressbook_2eproto::scc_info_Job.base);
+  SharedCtor();
+  // @@protoc_insertion_point(constructor:qtprotobuf.examples.Job)
+}
+Job::Job(const Job& from)
+  : ::google::protobuf::Message(),
+      _internal_metadata_(NULL) {
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  title_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (from.title().size() > 0) {
+    title_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.title_);
+  }
+  if (from.has_officeaddress()) {
+    officeaddress_ = new ::qtprotobuf::examples::Address(*from.officeaddress_);
+  } else {
+    officeaddress_ = NULL;
+  }
+  // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.Job)
+}
+
+void Job::SharedCtor() {
+  title_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  officeaddress_ = NULL;
+}
+
+Job::~Job() {
+  // @@protoc_insertion_point(destructor:qtprotobuf.examples.Job)
+  SharedDtor();
+}
+
+void Job::SharedDtor() {
+  title_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (this != internal_default_instance()) delete officeaddress_;
+}
+
+void Job::SetCachedSize(int size) const {
+  _cached_size_.Set(size);
+}
+const ::google::protobuf::Descriptor* Job::descriptor() {
+  ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
+}
+
+const Job& Job::default_instance() {
+  ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_Job.base);
+  return *internal_default_instance();
+}
+
+
+void Job::Clear() {
+// @@protoc_insertion_point(message_clear_start:qtprotobuf.examples.Job)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  // Prevent compiler warnings about cached_has_bits being unused
+  (void) cached_has_bits;
+
+  title_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (GetArenaNoVirtual() == NULL && officeaddress_ != NULL) {
+    delete officeaddress_;
+  }
+  officeaddress_ = NULL;
+  _internal_metadata_.Clear();
+}
+
+bool Job::MergePartialFromCodedStream(
+    ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+  ::google::protobuf::uint32 tag;
+  // @@protoc_insertion_point(parse_start:qtprotobuf.examples.Job)
+  for (;;) {
+    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    tag = p.first;
+    if (!p.second) goto handle_unusual;
+    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+      // string title = 1;
+      case 1: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_title()));
+          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+            this->title().data(), static_cast<int>(this->title().length()),
+            ::google::protobuf::internal::WireFormatLite::PARSE,
+            "qtprotobuf.examples.Job.title"));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // .qtprotobuf.examples.Address officeAddress = 2;
+      case 2: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+               input, mutable_officeaddress()));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      default: {
+      handle_unusual:
+        if (tag == 0) {
+          goto success;
+        }
+        DO_(::google::protobuf::internal::WireFormat::SkipField(
+              input, tag, _internal_metadata_.mutable_unknown_fields()));
+        break;
+      }
+    }
+  }
+success:
+  // @@protoc_insertion_point(parse_success:qtprotobuf.examples.Job)
+  return true;
+failure:
+  // @@protoc_insertion_point(parse_failure:qtprotobuf.examples.Job)
+  return false;
+#undef DO_
+}
+
+void Job::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // @@protoc_insertion_point(serialize_start:qtprotobuf.examples.Job)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  // string title = 1;
+  if (this->title().size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+      this->title().data(), static_cast<int>(this->title().length()),
+      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+      "qtprotobuf.examples.Job.title");
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      1, this->title(), output);
+  }
+
+  // .qtprotobuf.examples.Address officeAddress = 2;
+  if (this->has_officeaddress()) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      2, this->_internal_officeaddress(), output);
+  }
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
+  }
+  // @@protoc_insertion_point(serialize_end:qtprotobuf.examples.Job)
+}
+
+::google::protobuf::uint8* Job::InternalSerializeWithCachedSizesToArray(
+    bool deterministic, ::google::protobuf::uint8* target) const {
+  (void)deterministic; // Unused
+  // @@protoc_insertion_point(serialize_to_array_start:qtprotobuf.examples.Job)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  // string title = 1;
+  if (this->title().size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+      this->title().data(), static_cast<int>(this->title().length()),
+      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+      "qtprotobuf.examples.Job.title");
+    target =
+      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+        1, this->title(), target);
+  }
+
+  // .qtprotobuf.examples.Address officeAddress = 2;
+  if (this->has_officeaddress()) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        2, this->_internal_officeaddress(), deterministic, target);
+  }
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
+  }
+  // @@protoc_insertion_point(serialize_to_array_end:qtprotobuf.examples.Job)
+  return target;
+}
+
+size_t Job::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:qtprotobuf.examples.Job)
+  size_t total_size = 0;
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    total_size +=
+      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
+  }
+  // string title = 1;
+  if (this->title().size() > 0) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->title());
+  }
+
+  // .qtprotobuf.examples.Address officeAddress = 2;
+  if (this->has_officeaddress()) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *officeaddress_);
+  }
+
+  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+  SetCachedSize(cached_size);
+  return total_size;
+}
+
+void Job::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:qtprotobuf.examples.Job)
+  GOOGLE_DCHECK_NE(&from, this);
+  const Job* source =
+      ::google::protobuf::internal::DynamicCastToGenerated<const Job>(
+          &from);
+  if (source == NULL) {
+  // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobuf.examples.Job)
+    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+  } else {
+  // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobuf.examples.Job)
+    MergeFrom(*source);
+  }
+}
+
+void Job::MergeFrom(const Job& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:qtprotobuf.examples.Job)
+  GOOGLE_DCHECK_NE(&from, this);
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  if (from.title().size() > 0) {
+
+    title_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.title_);
+  }
+  if (from.has_officeaddress()) {
+    mutable_officeaddress()->::qtprotobuf::examples::Address::MergeFrom(from.officeaddress());
+  }
+}
+
+void Job::CopyFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:qtprotobuf.examples.Job)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+void Job::CopyFrom(const Job& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:qtprotobuf.examples.Job)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool Job::IsInitialized() const {
+  return true;
+}
+
+void Job::Swap(Job* other) {
+  if (other == this) return;
+  InternalSwap(other);
+}
+void Job::InternalSwap(Job* other) {
+  using std::swap;
+  title_.Swap(&other->title_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+    GetArenaNoVirtual());
+  swap(officeaddress_, other->officeaddress_);
+  _internal_metadata_.Swap(&other->_internal_metadata_);
+}
+
+::google::protobuf::Metadata Job::GetMetadata() const {
+  protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
+}
+
+
+// ===================================================================
+
+Contact_PhonesEntry_DoNotUse::Contact_PhonesEntry_DoNotUse() {}
+Contact_PhonesEntry_DoNotUse::Contact_PhonesEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
+void Contact_PhonesEntry_DoNotUse::MergeFrom(const Contact_PhonesEntry_DoNotUse& other) {
+  MergeFromInternal(other);
+}
+::google::protobuf::Metadata Contact_PhonesEntry_DoNotUse::GetMetadata() const {
+  ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[3];
+}
+void Contact_PhonesEntry_DoNotUse::MergeFrom(
+    const ::google::protobuf::Message& other) {
+  ::google::protobuf::Message::MergeFrom(other);
+}
+
+
+// ===================================================================
+
+void Contact::InitAsDefaultInstance() {
+  ::qtprotobuf::examples::_Contact_default_instance_._instance.get_mutable()->address_ = const_cast< ::qtprotobuf::examples::Address*>(
+      ::qtprotobuf::examples::Address::internal_default_instance());
+  ::qtprotobuf::examples::_Contact_default_instance_._instance.get_mutable()->job_ = const_cast< ::qtprotobuf::examples::Job*>(
+      ::qtprotobuf::examples::Job::internal_default_instance());
+}
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int Contact::kFirstNameFieldNumber;
+const int Contact::kLastNameFieldNumber;
+const int Contact::kMiddleNameFieldNumber;
+const int Contact::kPhonesFieldNumber;
+const int Contact::kAddressFieldNumber;
+const int Contact::kJobFieldNumber;
+#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+Contact::Contact()
+  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  ::google::protobuf::internal::InitSCC(
+      &protobuf_addressbook_2eproto::scc_info_Contact.base);
+  SharedCtor();
+  // @@protoc_insertion_point(constructor:qtprotobuf.examples.Contact)
+}
+Contact::Contact(const Contact& from)
+  : ::google::protobuf::Message(),
+      _internal_metadata_(NULL) {
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  phones_.MergeFrom(from.phones_);
+  firstname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (from.firstname().size() > 0) {
+    firstname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.firstname_);
+  }
+  lastname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (from.lastname().size() > 0) {
+    lastname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.lastname_);
+  }
+  middlename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (from.middlename().size() > 0) {
+    middlename_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.middlename_);
+  }
+  if (from.has_address()) {
+    address_ = new ::qtprotobuf::examples::Address(*from.address_);
+  } else {
+    address_ = NULL;
+  }
+  if (from.has_job()) {
+    job_ = new ::qtprotobuf::examples::Job(*from.job_);
+  } else {
+    job_ = NULL;
+  }
+  // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.Contact)
+}
+
+void Contact::SharedCtor() {
+  firstname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  lastname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  middlename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  ::memset(&address_, 0, static_cast<size_t>(
+      reinterpret_cast<char*>(&job_) -
+      reinterpret_cast<char*>(&address_)) + sizeof(job_));
+}
+
+Contact::~Contact() {
+  // @@protoc_insertion_point(destructor:qtprotobuf.examples.Contact)
+  SharedDtor();
+}
+
+void Contact::SharedDtor() {
+  firstname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  lastname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  middlename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (this != internal_default_instance()) delete address_;
+  if (this != internal_default_instance()) delete job_;
+}
+
+void Contact::SetCachedSize(int size) const {
+  _cached_size_.Set(size);
+}
+const ::google::protobuf::Descriptor* Contact::descriptor() {
+  ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
+}
+
+const Contact& Contact::default_instance() {
+  ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_Contact.base);
+  return *internal_default_instance();
+}
+
+
+void Contact::Clear() {
+// @@protoc_insertion_point(message_clear_start:qtprotobuf.examples.Contact)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  // Prevent compiler warnings about cached_has_bits being unused
+  (void) cached_has_bits;
+
+  phones_.Clear();
+  firstname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  lastname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  middlename_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  if (GetArenaNoVirtual() == NULL && address_ != NULL) {
+    delete address_;
+  }
+  address_ = NULL;
+  if (GetArenaNoVirtual() == NULL && job_ != NULL) {
+    delete job_;
+  }
+  job_ = NULL;
+  _internal_metadata_.Clear();
+}
+
+bool Contact::MergePartialFromCodedStream(
+    ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+  ::google::protobuf::uint32 tag;
+  // @@protoc_insertion_point(parse_start:qtprotobuf.examples.Contact)
+  for (;;) {
+    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    tag = p.first;
+    if (!p.second) goto handle_unusual;
+    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+      // string firstName = 1;
+      case 1: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_firstname()));
+          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+            this->firstname().data(), static_cast<int>(this->firstname().length()),
+            ::google::protobuf::internal::WireFormatLite::PARSE,
+            "qtprotobuf.examples.Contact.firstName"));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // string lastName = 2;
+      case 2: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_lastname()));
+          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+            this->lastname().data(), static_cast<int>(this->lastname().length()),
+            ::google::protobuf::internal::WireFormatLite::PARSE,
+            "qtprotobuf.examples.Contact.lastName"));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // string middleName = 3;
+      case 3: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_middlename()));
+          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+            this->middlename().data(), static_cast<int>(this->middlename().length()),
+            ::google::protobuf::internal::WireFormatLite::PARSE,
+            "qtprotobuf.examples.Contact.middleName"));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // map<int32, .qtprotobuf.examples.PhoneNumber> phones = 4;
+      case 4: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
+          Contact_PhonesEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
+              Contact_PhonesEntry_DoNotUse,
+              ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber,
+              ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
+              ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
+              0 >,
+            ::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber > > parser(&phones_);
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+              input, &parser));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // .qtprotobuf.examples.Address address = 5;
+      case 5: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+               input, mutable_address()));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // .qtprotobuf.examples.Job job = 6;
+      case 6: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+               input, mutable_job()));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      default: {
+      handle_unusual:
+        if (tag == 0) {
+          goto success;
+        }
+        DO_(::google::protobuf::internal::WireFormat::SkipField(
+              input, tag, _internal_metadata_.mutable_unknown_fields()));
+        break;
+      }
+    }
+  }
+success:
+  // @@protoc_insertion_point(parse_success:qtprotobuf.examples.Contact)
+  return true;
+failure:
+  // @@protoc_insertion_point(parse_failure:qtprotobuf.examples.Contact)
+  return false;
+#undef DO_
+}
+
+void Contact::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // @@protoc_insertion_point(serialize_start:qtprotobuf.examples.Contact)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  // string firstName = 1;
+  if (this->firstname().size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+      this->firstname().data(), static_cast<int>(this->firstname().length()),
+      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+      "qtprotobuf.examples.Contact.firstName");
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      1, this->firstname(), output);
+  }
+
+  // string lastName = 2;
+  if (this->lastname().size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+      this->lastname().data(), static_cast<int>(this->lastname().length()),
+      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+      "qtprotobuf.examples.Contact.lastName");
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      2, this->lastname(), output);
+  }
+
+  // string middleName = 3;
+  if (this->middlename().size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+      this->middlename().data(), static_cast<int>(this->middlename().length()),
+      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+      "qtprotobuf.examples.Contact.middleName");
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      3, this->middlename(), output);
+  }
+
+  // map<int32, .qtprotobuf.examples.PhoneNumber> phones = 4;
+  if (!this->phones().empty()) {
+    typedef ::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::const_pointer
+        ConstPtr;
+    typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
+    typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
+
+    if (output->IsSerializationDeterministic() &&
+        this->phones().size() > 1) {
+      ::std::unique_ptr<SortItem[]> items(
+          new SortItem[this->phones().size()]);
+      typedef ::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::size_type size_type;
+      size_type n = 0;
+      for (::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::const_iterator
+          it = this->phones().begin();
+          it != this->phones().end(); ++it, ++n) {
+        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
+      }
+      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
+      ::std::unique_ptr<Contact_PhonesEntry_DoNotUse> entry;
+      for (size_type i = 0; i < n; i++) {
+        entry.reset(phones_.NewEntryWrapper(
+            items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
+        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+            4, *entry, output);
+      }
+    } else {
+      ::std::unique_ptr<Contact_PhonesEntry_DoNotUse> entry;
+      for (::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::const_iterator
+          it = this->phones().begin();
+          it != this->phones().end(); ++it) {
+        entry.reset(phones_.NewEntryWrapper(
+            it->first, it->second));
+        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+            4, *entry, output);
+      }
+    }
+  }
+
+  // .qtprotobuf.examples.Address address = 5;
+  if (this->has_address()) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      5, this->_internal_address(), output);
+  }
+
+  // .qtprotobuf.examples.Job job = 6;
+  if (this->has_job()) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      6, this->_internal_job(), output);
+  }
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
+  }
+  // @@protoc_insertion_point(serialize_end:qtprotobuf.examples.Contact)
+}
+
+::google::protobuf::uint8* Contact::InternalSerializeWithCachedSizesToArray(
+    bool deterministic, ::google::protobuf::uint8* target) const {
+  (void)deterministic; // Unused
+  // @@protoc_insertion_point(serialize_to_array_start:qtprotobuf.examples.Contact)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  // string firstName = 1;
+  if (this->firstname().size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+      this->firstname().data(), static_cast<int>(this->firstname().length()),
+      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+      "qtprotobuf.examples.Contact.firstName");
+    target =
+      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+        1, this->firstname(), target);
+  }
+
+  // string lastName = 2;
+  if (this->lastname().size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+      this->lastname().data(), static_cast<int>(this->lastname().length()),
+      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+      "qtprotobuf.examples.Contact.lastName");
+    target =
+      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+        2, this->lastname(), target);
+  }
+
+  // string middleName = 3;
+  if (this->middlename().size() > 0) {
+    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
+      this->middlename().data(), static_cast<int>(this->middlename().length()),
+      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
+      "qtprotobuf.examples.Contact.middleName");
+    target =
+      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+        3, this->middlename(), target);
+  }
+
+  // map<int32, .qtprotobuf.examples.PhoneNumber> phones = 4;
+  if (!this->phones().empty()) {
+    typedef ::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::const_pointer
+        ConstPtr;
+    typedef ::google::protobuf::internal::SortItem< ::google::protobuf::int32, ConstPtr > SortItem;
+    typedef ::google::protobuf::internal::CompareByFirstField<SortItem> Less;
+
+    if (deterministic &&
+        this->phones().size() > 1) {
+      ::std::unique_ptr<SortItem[]> items(
+          new SortItem[this->phones().size()]);
+      typedef ::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::size_type size_type;
+      size_type n = 0;
+      for (::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::const_iterator
+          it = this->phones().begin();
+          it != this->phones().end(); ++it, ++n) {
+        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
+      }
+      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
+      ::std::unique_ptr<Contact_PhonesEntry_DoNotUse> entry;
+      for (size_type i = 0; i < n; i++) {
+        entry.reset(phones_.NewEntryWrapper(
+            items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second));
+        target = ::google::protobuf::internal::WireFormatLite::
+                   InternalWriteMessageNoVirtualToArray(
+                       4, *entry, deterministic, target);
+;
+      }
+    } else {
+      ::std::unique_ptr<Contact_PhonesEntry_DoNotUse> entry;
+      for (::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::const_iterator
+          it = this->phones().begin();
+          it != this->phones().end(); ++it) {
+        entry.reset(phones_.NewEntryWrapper(
+            it->first, it->second));
+        target = ::google::protobuf::internal::WireFormatLite::
+                   InternalWriteMessageNoVirtualToArray(
+                       4, *entry, deterministic, target);
+;
+      }
+    }
+  }
+
+  // .qtprotobuf.examples.Address address = 5;
+  if (this->has_address()) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        5, this->_internal_address(), deterministic, target);
+  }
+
+  // .qtprotobuf.examples.Job job = 6;
+  if (this->has_job()) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        6, this->_internal_job(), deterministic, target);
+  }
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
+  }
+  // @@protoc_insertion_point(serialize_to_array_end:qtprotobuf.examples.Contact)
+  return target;
+}
+
+size_t Contact::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:qtprotobuf.examples.Contact)
+  size_t total_size = 0;
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    total_size +=
+      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
+  }
+  // map<int32, .qtprotobuf.examples.PhoneNumber> phones = 4;
+  total_size += 1 *
+      ::google::protobuf::internal::FromIntSize(this->phones_size());
+  {
+    ::std::unique_ptr<Contact_PhonesEntry_DoNotUse> entry;
+    for (::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >::const_iterator
+        it = this->phones().begin();
+        it != this->phones().end(); ++it) {
+      entry.reset(phones_.NewEntryWrapper(it->first, it->second));
+      total_size += ::google::protobuf::internal::WireFormatLite::
+          MessageSizeNoVirtual(*entry);
+    }
+  }
+
+  // string firstName = 1;
+  if (this->firstname().size() > 0) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->firstname());
+  }
+
+  // string lastName = 2;
+  if (this->lastname().size() > 0) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->lastname());
+  }
+
+  // string middleName = 3;
+  if (this->middlename().size() > 0) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::StringSize(
+        this->middlename());
+  }
+
+  // .qtprotobuf.examples.Address address = 5;
+  if (this->has_address()) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *address_);
+  }
+
+  // .qtprotobuf.examples.Job job = 6;
+  if (this->has_job()) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *job_);
+  }
+
+  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+  SetCachedSize(cached_size);
+  return total_size;
+}
+
+void Contact::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:qtprotobuf.examples.Contact)
+  GOOGLE_DCHECK_NE(&from, this);
+  const Contact* source =
+      ::google::protobuf::internal::DynamicCastToGenerated<const Contact>(
+          &from);
+  if (source == NULL) {
+  // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobuf.examples.Contact)
+    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+  } else {
+  // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobuf.examples.Contact)
+    MergeFrom(*source);
+  }
+}
+
+void Contact::MergeFrom(const Contact& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:qtprotobuf.examples.Contact)
+  GOOGLE_DCHECK_NE(&from, this);
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  phones_.MergeFrom(from.phones_);
+  if (from.firstname().size() > 0) {
+
+    firstname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.firstname_);
+  }
+  if (from.lastname().size() > 0) {
+
+    lastname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.lastname_);
+  }
+  if (from.middlename().size() > 0) {
+
+    middlename_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.middlename_);
+  }
+  if (from.has_address()) {
+    mutable_address()->::qtprotobuf::examples::Address::MergeFrom(from.address());
+  }
+  if (from.has_job()) {
+    mutable_job()->::qtprotobuf::examples::Job::MergeFrom(from.job());
+  }
+}
+
+void Contact::CopyFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:qtprotobuf.examples.Contact)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+void Contact::CopyFrom(const Contact& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:qtprotobuf.examples.Contact)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool Contact::IsInitialized() const {
+  return true;
+}
+
+void Contact::Swap(Contact* other) {
+  if (other == this) return;
+  InternalSwap(other);
+}
+void Contact::InternalSwap(Contact* other) {
+  using std::swap;
+  phones_.Swap(&other->phones_);
+  firstname_.Swap(&other->firstname_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+    GetArenaNoVirtual());
+  lastname_.Swap(&other->lastname_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+    GetArenaNoVirtual());
+  middlename_.Swap(&other->middlename_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+    GetArenaNoVirtual());
+  swap(address_, other->address_);
+  swap(job_, other->job_);
+  _internal_metadata_.Swap(&other->_internal_metadata_);
+}
+
+::google::protobuf::Metadata Contact::GetMetadata() const {
+  protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
+}
+
+
+// ===================================================================
+
+void Contacts::InitAsDefaultInstance() {
+}
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int Contacts::kListFieldNumber;
+#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+Contacts::Contacts()
+  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  ::google::protobuf::internal::InitSCC(
+      &protobuf_addressbook_2eproto::scc_info_Contacts.base);
+  SharedCtor();
+  // @@protoc_insertion_point(constructor:qtprotobuf.examples.Contacts)
+}
+Contacts::Contacts(const Contacts& from)
+  : ::google::protobuf::Message(),
+      _internal_metadata_(NULL),
+      list_(from.list_) {
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.Contacts)
+}
+
+void Contacts::SharedCtor() {
+}
+
+Contacts::~Contacts() {
+  // @@protoc_insertion_point(destructor:qtprotobuf.examples.Contacts)
+  SharedDtor();
+}
+
+void Contacts::SharedDtor() {
+}
+
+void Contacts::SetCachedSize(int size) const {
+  _cached_size_.Set(size);
+}
+const ::google::protobuf::Descriptor* Contacts::descriptor() {
+  ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
+}
+
+const Contacts& Contacts::default_instance() {
+  ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_Contacts.base);
+  return *internal_default_instance();
+}
+
+
+void Contacts::Clear() {
+// @@protoc_insertion_point(message_clear_start:qtprotobuf.examples.Contacts)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  // Prevent compiler warnings about cached_has_bits being unused
+  (void) cached_has_bits;
+
+  list_.Clear();
+  _internal_metadata_.Clear();
+}
+
+bool Contacts::MergePartialFromCodedStream(
+    ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+  ::google::protobuf::uint32 tag;
+  // @@protoc_insertion_point(parse_start:qtprotobuf.examples.Contacts)
+  for (;;) {
+    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    tag = p.first;
+    if (!p.second) goto handle_unusual;
+    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+      // repeated .qtprotobuf.examples.Contact list = 1;
+      case 1: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+                input, add_list()));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      default: {
+      handle_unusual:
+        if (tag == 0) {
+          goto success;
+        }
+        DO_(::google::protobuf::internal::WireFormat::SkipField(
+              input, tag, _internal_metadata_.mutable_unknown_fields()));
+        break;
+      }
+    }
+  }
+success:
+  // @@protoc_insertion_point(parse_success:qtprotobuf.examples.Contacts)
+  return true;
+failure:
+  // @@protoc_insertion_point(parse_failure:qtprotobuf.examples.Contacts)
+  return false;
+#undef DO_
+}
+
+void Contacts::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // @@protoc_insertion_point(serialize_start:qtprotobuf.examples.Contacts)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  // repeated .qtprotobuf.examples.Contact list = 1;
+  for (unsigned int i = 0,
+      n = static_cast<unsigned int>(this->list_size()); i < n; i++) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      1,
+      this->list(static_cast<int>(i)),
+      output);
+  }
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
+  }
+  // @@protoc_insertion_point(serialize_end:qtprotobuf.examples.Contacts)
+}
+
+::google::protobuf::uint8* Contacts::InternalSerializeWithCachedSizesToArray(
+    bool deterministic, ::google::protobuf::uint8* target) const {
+  (void)deterministic; // Unused
+  // @@protoc_insertion_point(serialize_to_array_start:qtprotobuf.examples.Contacts)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  // repeated .qtprotobuf.examples.Contact list = 1;
+  for (unsigned int i = 0,
+      n = static_cast<unsigned int>(this->list_size()); i < n; i++) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        1, this->list(static_cast<int>(i)), deterministic, target);
+  }
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
+  }
+  // @@protoc_insertion_point(serialize_to_array_end:qtprotobuf.examples.Contacts)
+  return target;
+}
+
+size_t Contacts::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:qtprotobuf.examples.Contacts)
+  size_t total_size = 0;
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    total_size +=
+      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
+  }
+  // repeated .qtprotobuf.examples.Contact list = 1;
+  {
+    unsigned int count = static_cast<unsigned int>(this->list_size());
+    total_size += 1UL * count;
+    for (unsigned int i = 0; i < count; i++) {
+      total_size +=
+        ::google::protobuf::internal::WireFormatLite::MessageSize(
+          this->list(static_cast<int>(i)));
+    }
+  }
+
+  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+  SetCachedSize(cached_size);
+  return total_size;
+}
+
+void Contacts::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:qtprotobuf.examples.Contacts)
+  GOOGLE_DCHECK_NE(&from, this);
+  const Contacts* source =
+      ::google::protobuf::internal::DynamicCastToGenerated<const Contacts>(
+          &from);
+  if (source == NULL) {
+  // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobuf.examples.Contacts)
+    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+  } else {
+  // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobuf.examples.Contacts)
+    MergeFrom(*source);
+  }
+}
+
+void Contacts::MergeFrom(const Contacts& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:qtprotobuf.examples.Contacts)
+  GOOGLE_DCHECK_NE(&from, this);
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  list_.MergeFrom(from.list_);
+}
+
+void Contacts::CopyFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:qtprotobuf.examples.Contacts)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+void Contacts::CopyFrom(const Contacts& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:qtprotobuf.examples.Contacts)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool Contacts::IsInitialized() const {
+  return true;
+}
+
+void Contacts::Swap(Contacts* other) {
+  if (other == this) return;
+  InternalSwap(other);
+}
+void Contacts::InternalSwap(Contacts* other) {
+  using std::swap;
+  CastToBase(&list_)->InternalSwap(CastToBase(&other->list_));
+  _internal_metadata_.Swap(&other->_internal_metadata_);
+}
+
+::google::protobuf::Metadata Contacts::GetMetadata() const {
+  protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
+}
+
+
+// ===================================================================
+
+void SimpleResult::InitAsDefaultInstance() {
+}
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int SimpleResult::kOkFieldNumber;
+#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+SimpleResult::SimpleResult()
+  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  ::google::protobuf::internal::InitSCC(
+      &protobuf_addressbook_2eproto::scc_info_SimpleResult.base);
+  SharedCtor();
+  // @@protoc_insertion_point(constructor:qtprotobuf.examples.SimpleResult)
+}
+SimpleResult::SimpleResult(const SimpleResult& from)
+  : ::google::protobuf::Message(),
+      _internal_metadata_(NULL) {
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  ok_ = from.ok_;
+  // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.SimpleResult)
+}
+
+void SimpleResult::SharedCtor() {
+  ok_ = false;
+}
+
+SimpleResult::~SimpleResult() {
+  // @@protoc_insertion_point(destructor:qtprotobuf.examples.SimpleResult)
+  SharedDtor();
+}
+
+void SimpleResult::SharedDtor() {
+}
+
+void SimpleResult::SetCachedSize(int size) const {
+  _cached_size_.Set(size);
+}
+const ::google::protobuf::Descriptor* SimpleResult::descriptor() {
+  ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
+}
+
+const SimpleResult& SimpleResult::default_instance() {
+  ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_SimpleResult.base);
+  return *internal_default_instance();
+}
+
+
+void SimpleResult::Clear() {
+// @@protoc_insertion_point(message_clear_start:qtprotobuf.examples.SimpleResult)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  // Prevent compiler warnings about cached_has_bits being unused
+  (void) cached_has_bits;
+
+  ok_ = false;
+  _internal_metadata_.Clear();
+}
+
+bool SimpleResult::MergePartialFromCodedStream(
+    ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+  ::google::protobuf::uint32 tag;
+  // @@protoc_insertion_point(parse_start:qtprotobuf.examples.SimpleResult)
+  for (;;) {
+    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    tag = p.first;
+    if (!p.second) goto handle_unusual;
+    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+      // bool ok = 1;
+      case 1: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
+
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+                 input, &ok_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      default: {
+      handle_unusual:
+        if (tag == 0) {
+          goto success;
+        }
+        DO_(::google::protobuf::internal::WireFormat::SkipField(
+              input, tag, _internal_metadata_.mutable_unknown_fields()));
+        break;
+      }
+    }
+  }
+success:
+  // @@protoc_insertion_point(parse_success:qtprotobuf.examples.SimpleResult)
+  return true;
+failure:
+  // @@protoc_insertion_point(parse_failure:qtprotobuf.examples.SimpleResult)
+  return false;
+#undef DO_
+}
+
+void SimpleResult::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // @@protoc_insertion_point(serialize_start:qtprotobuf.examples.SimpleResult)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  // bool ok = 1;
+  if (this->ok() != 0) {
+    ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->ok(), output);
+  }
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
+  }
+  // @@protoc_insertion_point(serialize_end:qtprotobuf.examples.SimpleResult)
+}
+
+::google::protobuf::uint8* SimpleResult::InternalSerializeWithCachedSizesToArray(
+    bool deterministic, ::google::protobuf::uint8* target) const {
+  (void)deterministic; // Unused
+  // @@protoc_insertion_point(serialize_to_array_start:qtprotobuf.examples.SimpleResult)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  // bool ok = 1;
+  if (this->ok() != 0) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->ok(), target);
+  }
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
+  }
+  // @@protoc_insertion_point(serialize_to_array_end:qtprotobuf.examples.SimpleResult)
+  return target;
+}
+
+size_t SimpleResult::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:qtprotobuf.examples.SimpleResult)
+  size_t total_size = 0;
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    total_size +=
+      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
+  }
+  // bool ok = 1;
+  if (this->ok() != 0) {
+    total_size += 1 + 1;
+  }
+
+  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+  SetCachedSize(cached_size);
+  return total_size;
+}
+
+void SimpleResult::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:qtprotobuf.examples.SimpleResult)
+  GOOGLE_DCHECK_NE(&from, this);
+  const SimpleResult* source =
+      ::google::protobuf::internal::DynamicCastToGenerated<const SimpleResult>(
+          &from);
+  if (source == NULL) {
+  // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobuf.examples.SimpleResult)
+    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+  } else {
+  // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobuf.examples.SimpleResult)
+    MergeFrom(*source);
+  }
+}
+
+void SimpleResult::MergeFrom(const SimpleResult& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:qtprotobuf.examples.SimpleResult)
+  GOOGLE_DCHECK_NE(&from, this);
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  if (from.ok() != 0) {
+    set_ok(from.ok());
+  }
+}
+
+void SimpleResult::CopyFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:qtprotobuf.examples.SimpleResult)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+void SimpleResult::CopyFrom(const SimpleResult& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:qtprotobuf.examples.SimpleResult)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool SimpleResult::IsInitialized() const {
+  return true;
+}
+
+void SimpleResult::Swap(SimpleResult* other) {
+  if (other == this) return;
+  InternalSwap(other);
+}
+void SimpleResult::InternalSwap(SimpleResult* other) {
+  using std::swap;
+  swap(ok_, other->ok_);
+  _internal_metadata_.Swap(&other->_internal_metadata_);
+}
+
+::google::protobuf::Metadata SimpleResult::GetMetadata() const {
+  protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
+}
+
+
+// ===================================================================
+
+void ListFrame::InitAsDefaultInstance() {
+}
+#if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int ListFrame::kStartFieldNumber;
+const int ListFrame::kEndFieldNumber;
+#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
+
+ListFrame::ListFrame()
+  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
+  ::google::protobuf::internal::InitSCC(
+      &protobuf_addressbook_2eproto::scc_info_ListFrame.base);
+  SharedCtor();
+  // @@protoc_insertion_point(constructor:qtprotobuf.examples.ListFrame)
+}
+ListFrame::ListFrame(const ListFrame& from)
+  : ::google::protobuf::Message(),
+      _internal_metadata_(NULL) {
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  ::memcpy(&start_, &from.start_,
+    static_cast<size_t>(reinterpret_cast<char*>(&end_) -
+    reinterpret_cast<char*>(&start_)) + sizeof(end_));
+  // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.ListFrame)
+}
+
+void ListFrame::SharedCtor() {
+  ::memset(&start_, 0, static_cast<size_t>(
+      reinterpret_cast<char*>(&end_) -
+      reinterpret_cast<char*>(&start_)) + sizeof(end_));
+}
+
+ListFrame::~ListFrame() {
+  // @@protoc_insertion_point(destructor:qtprotobuf.examples.ListFrame)
+  SharedDtor();
+}
+
+void ListFrame::SharedDtor() {
+}
+
+void ListFrame::SetCachedSize(int size) const {
+  _cached_size_.Set(size);
+}
+const ::google::protobuf::Descriptor* ListFrame::descriptor() {
+  ::protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
+}
+
+const ListFrame& ListFrame::default_instance() {
+  ::google::protobuf::internal::InitSCC(&protobuf_addressbook_2eproto::scc_info_ListFrame.base);
+  return *internal_default_instance();
+}
+
+
+void ListFrame::Clear() {
+// @@protoc_insertion_point(message_clear_start:qtprotobuf.examples.ListFrame)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  // Prevent compiler warnings about cached_has_bits being unused
+  (void) cached_has_bits;
+
+  ::memset(&start_, 0, static_cast<size_t>(
+      reinterpret_cast<char*>(&end_) -
+      reinterpret_cast<char*>(&start_)) + sizeof(end_));
+  _internal_metadata_.Clear();
+}
+
+bool ListFrame::MergePartialFromCodedStream(
+    ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
+  ::google::protobuf::uint32 tag;
+  // @@protoc_insertion_point(parse_start:qtprotobuf.examples.ListFrame)
+  for (;;) {
+    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
+    tag = p.first;
+    if (!p.second) goto handle_unusual;
+    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+      // sint32 start = 1;
+      case 1: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
+
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
+                 input, &start_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // sint32 end = 2;
+      case 2: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
+
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
+                 input, &end_)));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      default: {
+      handle_unusual:
+        if (tag == 0) {
+          goto success;
+        }
+        DO_(::google::protobuf::internal::WireFormat::SkipField(
+              input, tag, _internal_metadata_.mutable_unknown_fields()));
+        break;
+      }
+    }
+  }
+success:
+  // @@protoc_insertion_point(parse_success:qtprotobuf.examples.ListFrame)
+  return true;
+failure:
+  // @@protoc_insertion_point(parse_failure:qtprotobuf.examples.ListFrame)
+  return false;
+#undef DO_
+}
+
+void ListFrame::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // @@protoc_insertion_point(serialize_start:qtprotobuf.examples.ListFrame)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  // sint32 start = 1;
+  if (this->start() != 0) {
+    ::google::protobuf::internal::WireFormatLite::WriteSInt32(1, this->start(), output);
+  }
+
+  // sint32 end = 2;
+  if (this->end() != 0) {
+    ::google::protobuf::internal::WireFormatLite::WriteSInt32(2, this->end(), output);
+  }
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
+  }
+  // @@protoc_insertion_point(serialize_end:qtprotobuf.examples.ListFrame)
+}
+
+::google::protobuf::uint8* ListFrame::InternalSerializeWithCachedSizesToArray(
+    bool deterministic, ::google::protobuf::uint8* target) const {
+  (void)deterministic; // Unused
+  // @@protoc_insertion_point(serialize_to_array_start:qtprotobuf.examples.ListFrame)
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  // sint32 start = 1;
+  if (this->start() != 0) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(1, this->start(), target);
+  }
+
+  // sint32 end = 2;
+  if (this->end() != 0) {
+    target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(2, this->end(), target);
+  }
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
+  }
+  // @@protoc_insertion_point(serialize_to_array_end:qtprotobuf.examples.ListFrame)
+  return target;
+}
+
+size_t ListFrame::ByteSizeLong() const {
+// @@protoc_insertion_point(message_byte_size_start:qtprotobuf.examples.ListFrame)
+  size_t total_size = 0;
+
+  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
+    total_size +=
+      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
+  }
+  // sint32 start = 1;
+  if (this->start() != 0) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::SInt32Size(
+        this->start());
+  }
+
+  // sint32 end = 2;
+  if (this->end() != 0) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::SInt32Size(
+        this->end());
+  }
+
+  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
+  SetCachedSize(cached_size);
+  return total_size;
+}
+
+void ListFrame::MergeFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_merge_from_start:qtprotobuf.examples.ListFrame)
+  GOOGLE_DCHECK_NE(&from, this);
+  const ListFrame* source =
+      ::google::protobuf::internal::DynamicCastToGenerated<const ListFrame>(
+          &from);
+  if (source == NULL) {
+  // @@protoc_insertion_point(generalized_merge_from_cast_fail:qtprotobuf.examples.ListFrame)
+    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+  } else {
+  // @@protoc_insertion_point(generalized_merge_from_cast_success:qtprotobuf.examples.ListFrame)
+    MergeFrom(*source);
+  }
+}
+
+void ListFrame::MergeFrom(const ListFrame& from) {
+// @@protoc_insertion_point(class_specific_merge_from_start:qtprotobuf.examples.ListFrame)
+  GOOGLE_DCHECK_NE(&from, this);
+  _internal_metadata_.MergeFrom(from._internal_metadata_);
+  ::google::protobuf::uint32 cached_has_bits = 0;
+  (void) cached_has_bits;
+
+  if (from.start() != 0) {
+    set_start(from.start());
+  }
+  if (from.end() != 0) {
+    set_end(from.end());
+  }
+}
+
+void ListFrame::CopyFrom(const ::google::protobuf::Message& from) {
+// @@protoc_insertion_point(generalized_copy_from_start:qtprotobuf.examples.ListFrame)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+void ListFrame::CopyFrom(const ListFrame& from) {
+// @@protoc_insertion_point(class_specific_copy_from_start:qtprotobuf.examples.ListFrame)
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool ListFrame::IsInitialized() const {
+  return true;
+}
+
+void ListFrame::Swap(ListFrame* other) {
+  if (other == this) return;
+  InternalSwap(other);
+}
+void ListFrame::InternalSwap(ListFrame* other) {
+  using std::swap;
+  swap(start_, other->start_);
+  swap(end_, other->end_);
+  _internal_metadata_.Swap(&other->_internal_metadata_);
+}
+
+::google::protobuf::Metadata ListFrame::GetMetadata() const {
+  protobuf_addressbook_2eproto::protobuf_AssignDescriptorsOnce();
+  return ::protobuf_addressbook_2eproto::file_level_metadata[kIndexInFileMessages];
+}
+
+
+// @@protoc_insertion_point(namespace_scope)
+}  // namespace examples
+}  // namespace qtprotobuf
+namespace google {
+namespace protobuf {
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::PhoneNumber* Arena::CreateMaybeMessage< ::qtprotobuf::examples::PhoneNumber >(Arena* arena) {
+  return Arena::CreateInternal< ::qtprotobuf::examples::PhoneNumber >(arena);
+}
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::Address* Arena::CreateMaybeMessage< ::qtprotobuf::examples::Address >(Arena* arena) {
+  return Arena::CreateInternal< ::qtprotobuf::examples::Address >(arena);
+}
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::Job* Arena::CreateMaybeMessage< ::qtprotobuf::examples::Job >(Arena* arena) {
+  return Arena::CreateInternal< ::qtprotobuf::examples::Job >(arena);
+}
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse* Arena::CreateMaybeMessage< ::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse >(Arena* arena) {
+  return Arena::CreateInternal< ::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse >(arena);
+}
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::Contact* Arena::CreateMaybeMessage< ::qtprotobuf::examples::Contact >(Arena* arena) {
+  return Arena::CreateInternal< ::qtprotobuf::examples::Contact >(arena);
+}
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::Contacts* Arena::CreateMaybeMessage< ::qtprotobuf::examples::Contacts >(Arena* arena) {
+  return Arena::CreateInternal< ::qtprotobuf::examples::Contacts >(arena);
+}
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::SimpleResult* Arena::CreateMaybeMessage< ::qtprotobuf::examples::SimpleResult >(Arena* arena) {
+  return Arena::CreateInternal< ::qtprotobuf::examples::SimpleResult >(arena);
+}
+template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::qtprotobuf::examples::ListFrame* Arena::CreateMaybeMessage< ::qtprotobuf::examples::ListFrame >(Arena* arena) {
+  return Arena::CreateInternal< ::qtprotobuf::examples::ListFrame >(arena);
+}
+}  // namespace protobuf
+}  // namespace google
+
+// @@protoc_insertion_point(global_scope)

+ 1839 - 0
examples/addressbookserver/addressbook.pb.h

@@ -0,0 +1,1839 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: addressbook.proto
+
+#ifndef PROTOBUF_INCLUDED_addressbook_2eproto
+#define PROTOBUF_INCLUDED_addressbook_2eproto
+
+#include <string>
+
+#include <google/protobuf/stubs/common.h>
+
+#if GOOGLE_PROTOBUF_VERSION < 3006001
+#error This file was generated by a newer version of protoc which is
+#error incompatible with your Protocol Buffer headers.  Please update
+#error your headers.
+#endif
+#if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
+#error This file was generated by an older version of protoc which is
+#error incompatible with your Protocol Buffer headers.  Please
+#error regenerate this file with a newer version of protoc.
+#endif
+
+#include <google/protobuf/io/coded_stream.h>
+#include <google/protobuf/arena.h>
+#include <google/protobuf/arenastring.h>
+#include <google/protobuf/generated_message_table_driven.h>
+#include <google/protobuf/generated_message_util.h>
+#include <google/protobuf/inlined_string_field.h>
+#include <google/protobuf/metadata.h>
+#include <google/protobuf/message.h>
+#include <google/protobuf/repeated_field.h>  // IWYU pragma: export
+#include <google/protobuf/extension_set.h>  // IWYU pragma: export
+#include <google/protobuf/map.h>  // IWYU pragma: export
+#include <google/protobuf/map_entry.h>
+#include <google/protobuf/map_field_inl.h>
+#include <google/protobuf/generated_enum_reflection.h>
+#include <google/protobuf/unknown_field_set.h>
+// @@protoc_insertion_point(includes)
+#define PROTOBUF_INTERNAL_EXPORT_protobuf_addressbook_2eproto 
+
+namespace protobuf_addressbook_2eproto {
+// Internal implementation detail -- do not use these members.
+struct TableStruct {
+  static const ::google::protobuf::internal::ParseTableField entries[];
+  static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
+  static const ::google::protobuf::internal::ParseTable schema[8];
+  static const ::google::protobuf::internal::FieldMetadata field_metadata[];
+  static const ::google::protobuf::internal::SerializationTable serialization_table[];
+  static const ::google::protobuf::uint32 offsets[];
+};
+void AddDescriptors();
+}  // namespace protobuf_addressbook_2eproto
+namespace qtprotobuf {
+namespace examples {
+class Address;
+class AddressDefaultTypeInternal;
+extern AddressDefaultTypeInternal _Address_default_instance_;
+class Contact;
+class ContactDefaultTypeInternal;
+extern ContactDefaultTypeInternal _Contact_default_instance_;
+class Contact_PhonesEntry_DoNotUse;
+class Contact_PhonesEntry_DoNotUseDefaultTypeInternal;
+extern Contact_PhonesEntry_DoNotUseDefaultTypeInternal _Contact_PhonesEntry_DoNotUse_default_instance_;
+class Contacts;
+class ContactsDefaultTypeInternal;
+extern ContactsDefaultTypeInternal _Contacts_default_instance_;
+class Job;
+class JobDefaultTypeInternal;
+extern JobDefaultTypeInternal _Job_default_instance_;
+class ListFrame;
+class ListFrameDefaultTypeInternal;
+extern ListFrameDefaultTypeInternal _ListFrame_default_instance_;
+class PhoneNumber;
+class PhoneNumberDefaultTypeInternal;
+extern PhoneNumberDefaultTypeInternal _PhoneNumber_default_instance_;
+class SimpleResult;
+class SimpleResultDefaultTypeInternal;
+extern SimpleResultDefaultTypeInternal _SimpleResult_default_instance_;
+}  // namespace examples
+}  // namespace qtprotobuf
+namespace google {
+namespace protobuf {
+template<> ::qtprotobuf::examples::Address* Arena::CreateMaybeMessage<::qtprotobuf::examples::Address>(Arena*);
+template<> ::qtprotobuf::examples::Contact* Arena::CreateMaybeMessage<::qtprotobuf::examples::Contact>(Arena*);
+template<> ::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse* Arena::CreateMaybeMessage<::qtprotobuf::examples::Contact_PhonesEntry_DoNotUse>(Arena*);
+template<> ::qtprotobuf::examples::Contacts* Arena::CreateMaybeMessage<::qtprotobuf::examples::Contacts>(Arena*);
+template<> ::qtprotobuf::examples::Job* Arena::CreateMaybeMessage<::qtprotobuf::examples::Job>(Arena*);
+template<> ::qtprotobuf::examples::ListFrame* Arena::CreateMaybeMessage<::qtprotobuf::examples::ListFrame>(Arena*);
+template<> ::qtprotobuf::examples::PhoneNumber* Arena::CreateMaybeMessage<::qtprotobuf::examples::PhoneNumber>(Arena*);
+template<> ::qtprotobuf::examples::SimpleResult* Arena::CreateMaybeMessage<::qtprotobuf::examples::SimpleResult>(Arena*);
+}  // namespace protobuf
+}  // namespace google
+namespace qtprotobuf {
+namespace examples {
+
+enum Contact_PhoneType {
+  Contact_PhoneType_Home = 0,
+  Contact_PhoneType_Work = 1,
+  Contact_PhoneType_Mobile = 2,
+  Contact_PhoneType_Other = 3,
+  Contact_PhoneType_Contact_PhoneType_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min,
+  Contact_PhoneType_Contact_PhoneType_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max
+};
+bool Contact_PhoneType_IsValid(int value);
+const Contact_PhoneType Contact_PhoneType_PhoneType_MIN = Contact_PhoneType_Home;
+const Contact_PhoneType Contact_PhoneType_PhoneType_MAX = Contact_PhoneType_Other;
+const int Contact_PhoneType_PhoneType_ARRAYSIZE = Contact_PhoneType_PhoneType_MAX + 1;
+
+const ::google::protobuf::EnumDescriptor* Contact_PhoneType_descriptor();
+inline const ::std::string& Contact_PhoneType_Name(Contact_PhoneType value) {
+  return ::google::protobuf::internal::NameOfEnum(
+    Contact_PhoneType_descriptor(), value);
+}
+inline bool Contact_PhoneType_Parse(
+    const ::std::string& name, Contact_PhoneType* value) {
+  return ::google::protobuf::internal::ParseNamedEnum<Contact_PhoneType>(
+    Contact_PhoneType_descriptor(), name, value);
+}
+// ===================================================================
+
+class PhoneNumber : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:qtprotobuf.examples.PhoneNumber) */ {
+ public:
+  PhoneNumber();
+  virtual ~PhoneNumber();
+
+  PhoneNumber(const PhoneNumber& from);
+
+  inline PhoneNumber& operator=(const PhoneNumber& from) {
+    CopyFrom(from);
+    return *this;
+  }
+  #if LANG_CXX11
+  PhoneNumber(PhoneNumber&& from) noexcept
+    : PhoneNumber() {
+    *this = ::std::move(from);
+  }
+
+  inline PhoneNumber& operator=(PhoneNumber&& from) noexcept {
+    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+      if (this != &from) InternalSwap(&from);
+    } else {
+      CopyFrom(from);
+    }
+    return *this;
+  }
+  #endif
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const PhoneNumber& default_instance();
+
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
+  static inline const PhoneNumber* internal_default_instance() {
+    return reinterpret_cast<const PhoneNumber*>(
+               &_PhoneNumber_default_instance_);
+  }
+  static constexpr int kIndexInFileMessages =
+    0;
+
+  void Swap(PhoneNumber* other);
+  friend void swap(PhoneNumber& a, PhoneNumber& b) {
+    a.Swap(&b);
+  }
+
+  // implements Message ----------------------------------------------
+
+  inline PhoneNumber* New() const final {
+    return CreateMaybeMessage<PhoneNumber>(NULL);
+  }
+
+  PhoneNumber* New(::google::protobuf::Arena* arena) const final {
+    return CreateMaybeMessage<PhoneNumber>(arena);
+  }
+  void CopyFrom(const ::google::protobuf::Message& from) final;
+  void MergeFrom(const ::google::protobuf::Message& from) final;
+  void CopyFrom(const PhoneNumber& from);
+  void MergeFrom(const PhoneNumber& from);
+  void Clear() final;
+  bool IsInitialized() const final;
+
+  size_t ByteSizeLong() const final;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input) final;
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const final;
+  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+      bool deterministic, ::google::protobuf::uint8* target) const final;
+  int GetCachedSize() const final { return _cached_size_.Get(); }
+
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const final;
+  void InternalSwap(PhoneNumber* other);
+  private:
+  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+    return NULL;
+  }
+  inline void* MaybeArenaPtr() const {
+    return NULL;
+  }
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const final;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // repeated uint64 number = 2;
+  int number_size() const;
+  void clear_number();
+  static const int kNumberFieldNumber = 2;
+  ::google::protobuf::uint64 number(int index) const;
+  void set_number(int index, ::google::protobuf::uint64 value);
+  void add_number(::google::protobuf::uint64 value);
+  const ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >&
+      number() const;
+  ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >*
+      mutable_number();
+
+  // uint32 countryCode = 1;
+  void clear_countrycode();
+  static const int kCountryCodeFieldNumber = 1;
+  ::google::protobuf::uint32 countrycode() const;
+  void set_countrycode(::google::protobuf::uint32 value);
+
+  // @@protoc_insertion_point(class_scope:qtprotobuf.examples.PhoneNumber)
+ private:
+
+  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+  ::google::protobuf::RepeatedField< ::google::protobuf::uint64 > number_;
+  mutable int _number_cached_byte_size_;
+  ::google::protobuf::uint32 countrycode_;
+  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  friend struct ::protobuf_addressbook_2eproto::TableStruct;
+};
+// -------------------------------------------------------------------
+
+class Address : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:qtprotobuf.examples.Address) */ {
+ public:
+  Address();
+  virtual ~Address();
+
+  Address(const Address& from);
+
+  inline Address& operator=(const Address& from) {
+    CopyFrom(from);
+    return *this;
+  }
+  #if LANG_CXX11
+  Address(Address&& from) noexcept
+    : Address() {
+    *this = ::std::move(from);
+  }
+
+  inline Address& operator=(Address&& from) noexcept {
+    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+      if (this != &from) InternalSwap(&from);
+    } else {
+      CopyFrom(from);
+    }
+    return *this;
+  }
+  #endif
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const Address& default_instance();
+
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
+  static inline const Address* internal_default_instance() {
+    return reinterpret_cast<const Address*>(
+               &_Address_default_instance_);
+  }
+  static constexpr int kIndexInFileMessages =
+    1;
+
+  void Swap(Address* other);
+  friend void swap(Address& a, Address& b) {
+    a.Swap(&b);
+  }
+
+  // implements Message ----------------------------------------------
+
+  inline Address* New() const final {
+    return CreateMaybeMessage<Address>(NULL);
+  }
+
+  Address* New(::google::protobuf::Arena* arena) const final {
+    return CreateMaybeMessage<Address>(arena);
+  }
+  void CopyFrom(const ::google::protobuf::Message& from) final;
+  void MergeFrom(const ::google::protobuf::Message& from) final;
+  void CopyFrom(const Address& from);
+  void MergeFrom(const Address& from);
+  void Clear() final;
+  bool IsInitialized() const final;
+
+  size_t ByteSizeLong() const final;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input) final;
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const final;
+  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+      bool deterministic, ::google::protobuf::uint8* target) const final;
+  int GetCachedSize() const final { return _cached_size_.Get(); }
+
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const final;
+  void InternalSwap(Address* other);
+  private:
+  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+    return NULL;
+  }
+  inline void* MaybeArenaPtr() const {
+    return NULL;
+  }
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const final;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // string streetAddress1 = 2;
+  void clear_streetaddress1();
+  static const int kStreetAddress1FieldNumber = 2;
+  const ::std::string& streetaddress1() const;
+  void set_streetaddress1(const ::std::string& value);
+  #if LANG_CXX11
+  void set_streetaddress1(::std::string&& value);
+  #endif
+  void set_streetaddress1(const char* value);
+  void set_streetaddress1(const char* value, size_t size);
+  ::std::string* mutable_streetaddress1();
+  ::std::string* release_streetaddress1();
+  void set_allocated_streetaddress1(::std::string* streetaddress1);
+
+  // string streetAddress2 = 3;
+  void clear_streetaddress2();
+  static const int kStreetAddress2FieldNumber = 3;
+  const ::std::string& streetaddress2() const;
+  void set_streetaddress2(const ::std::string& value);
+  #if LANG_CXX11
+  void set_streetaddress2(::std::string&& value);
+  #endif
+  void set_streetaddress2(const char* value);
+  void set_streetaddress2(const char* value, size_t size);
+  ::std::string* mutable_streetaddress2();
+  ::std::string* release_streetaddress2();
+  void set_allocated_streetaddress2(::std::string* streetaddress2);
+
+  // string state = 4;
+  void clear_state();
+  static const int kStateFieldNumber = 4;
+  const ::std::string& state() const;
+  void set_state(const ::std::string& value);
+  #if LANG_CXX11
+  void set_state(::std::string&& value);
+  #endif
+  void set_state(const char* value);
+  void set_state(const char* value, size_t size);
+  ::std::string* mutable_state();
+  ::std::string* release_state();
+  void set_allocated_state(::std::string* state);
+
+  // uint64 zipCode = 1;
+  void clear_zipcode();
+  static const int kZipCodeFieldNumber = 1;
+  ::google::protobuf::uint64 zipcode() const;
+  void set_zipcode(::google::protobuf::uint64 value);
+
+  // uint32 country = 5;
+  void clear_country();
+  static const int kCountryFieldNumber = 5;
+  ::google::protobuf::uint32 country() const;
+  void set_country(::google::protobuf::uint32 value);
+
+  // @@protoc_insertion_point(class_scope:qtprotobuf.examples.Address)
+ private:
+
+  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+  ::google::protobuf::internal::ArenaStringPtr streetaddress1_;
+  ::google::protobuf::internal::ArenaStringPtr streetaddress2_;
+  ::google::protobuf::internal::ArenaStringPtr state_;
+  ::google::protobuf::uint64 zipcode_;
+  ::google::protobuf::uint32 country_;
+  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  friend struct ::protobuf_addressbook_2eproto::TableStruct;
+};
+// -------------------------------------------------------------------
+
+class Job : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:qtprotobuf.examples.Job) */ {
+ public:
+  Job();
+  virtual ~Job();
+
+  Job(const Job& from);
+
+  inline Job& operator=(const Job& from) {
+    CopyFrom(from);
+    return *this;
+  }
+  #if LANG_CXX11
+  Job(Job&& from) noexcept
+    : Job() {
+    *this = ::std::move(from);
+  }
+
+  inline Job& operator=(Job&& from) noexcept {
+    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+      if (this != &from) InternalSwap(&from);
+    } else {
+      CopyFrom(from);
+    }
+    return *this;
+  }
+  #endif
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const Job& default_instance();
+
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
+  static inline const Job* internal_default_instance() {
+    return reinterpret_cast<const Job*>(
+               &_Job_default_instance_);
+  }
+  static constexpr int kIndexInFileMessages =
+    2;
+
+  void Swap(Job* other);
+  friend void swap(Job& a, Job& b) {
+    a.Swap(&b);
+  }
+
+  // implements Message ----------------------------------------------
+
+  inline Job* New() const final {
+    return CreateMaybeMessage<Job>(NULL);
+  }
+
+  Job* New(::google::protobuf::Arena* arena) const final {
+    return CreateMaybeMessage<Job>(arena);
+  }
+  void CopyFrom(const ::google::protobuf::Message& from) final;
+  void MergeFrom(const ::google::protobuf::Message& from) final;
+  void CopyFrom(const Job& from);
+  void MergeFrom(const Job& from);
+  void Clear() final;
+  bool IsInitialized() const final;
+
+  size_t ByteSizeLong() const final;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input) final;
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const final;
+  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+      bool deterministic, ::google::protobuf::uint8* target) const final;
+  int GetCachedSize() const final { return _cached_size_.Get(); }
+
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const final;
+  void InternalSwap(Job* other);
+  private:
+  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+    return NULL;
+  }
+  inline void* MaybeArenaPtr() const {
+    return NULL;
+  }
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const final;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // string title = 1;
+  void clear_title();
+  static const int kTitleFieldNumber = 1;
+  const ::std::string& title() const;
+  void set_title(const ::std::string& value);
+  #if LANG_CXX11
+  void set_title(::std::string&& value);
+  #endif
+  void set_title(const char* value);
+  void set_title(const char* value, size_t size);
+  ::std::string* mutable_title();
+  ::std::string* release_title();
+  void set_allocated_title(::std::string* title);
+
+  // .qtprotobuf.examples.Address officeAddress = 2;
+  bool has_officeaddress() const;
+  void clear_officeaddress();
+  static const int kOfficeAddressFieldNumber = 2;
+  private:
+  const ::qtprotobuf::examples::Address& _internal_officeaddress() const;
+  public:
+  const ::qtprotobuf::examples::Address& officeaddress() const;
+  ::qtprotobuf::examples::Address* release_officeaddress();
+  ::qtprotobuf::examples::Address* mutable_officeaddress();
+  void set_allocated_officeaddress(::qtprotobuf::examples::Address* officeaddress);
+
+  // @@protoc_insertion_point(class_scope:qtprotobuf.examples.Job)
+ private:
+
+  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+  ::google::protobuf::internal::ArenaStringPtr title_;
+  ::qtprotobuf::examples::Address* officeaddress_;
+  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  friend struct ::protobuf_addressbook_2eproto::TableStruct;
+};
+// -------------------------------------------------------------------
+
+class Contact_PhonesEntry_DoNotUse : public ::google::protobuf::internal::MapEntry<Contact_PhonesEntry_DoNotUse, 
+    ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber,
+    ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
+    ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
+    0 > {
+public:
+  typedef ::google::protobuf::internal::MapEntry<Contact_PhonesEntry_DoNotUse, 
+    ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber,
+    ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
+    ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
+    0 > SuperType;
+  Contact_PhonesEntry_DoNotUse();
+  Contact_PhonesEntry_DoNotUse(::google::protobuf::Arena* arena);
+  void MergeFrom(const Contact_PhonesEntry_DoNotUse& other);
+  static const Contact_PhonesEntry_DoNotUse* internal_default_instance() { return reinterpret_cast<const Contact_PhonesEntry_DoNotUse*>(&_Contact_PhonesEntry_DoNotUse_default_instance_); }
+  void MergeFrom(const ::google::protobuf::Message& other) final;
+  ::google::protobuf::Metadata GetMetadata() const;
+};
+
+// -------------------------------------------------------------------
+
+class Contact : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:qtprotobuf.examples.Contact) */ {
+ public:
+  Contact();
+  virtual ~Contact();
+
+  Contact(const Contact& from);
+
+  inline Contact& operator=(const Contact& from) {
+    CopyFrom(from);
+    return *this;
+  }
+  #if LANG_CXX11
+  Contact(Contact&& from) noexcept
+    : Contact() {
+    *this = ::std::move(from);
+  }
+
+  inline Contact& operator=(Contact&& from) noexcept {
+    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+      if (this != &from) InternalSwap(&from);
+    } else {
+      CopyFrom(from);
+    }
+    return *this;
+  }
+  #endif
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const Contact& default_instance();
+
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
+  static inline const Contact* internal_default_instance() {
+    return reinterpret_cast<const Contact*>(
+               &_Contact_default_instance_);
+  }
+  static constexpr int kIndexInFileMessages =
+    4;
+
+  void Swap(Contact* other);
+  friend void swap(Contact& a, Contact& b) {
+    a.Swap(&b);
+  }
+
+  // implements Message ----------------------------------------------
+
+  inline Contact* New() const final {
+    return CreateMaybeMessage<Contact>(NULL);
+  }
+
+  Contact* New(::google::protobuf::Arena* arena) const final {
+    return CreateMaybeMessage<Contact>(arena);
+  }
+  void CopyFrom(const ::google::protobuf::Message& from) final;
+  void MergeFrom(const ::google::protobuf::Message& from) final;
+  void CopyFrom(const Contact& from);
+  void MergeFrom(const Contact& from);
+  void Clear() final;
+  bool IsInitialized() const final;
+
+  size_t ByteSizeLong() const final;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input) final;
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const final;
+  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+      bool deterministic, ::google::protobuf::uint8* target) const final;
+  int GetCachedSize() const final { return _cached_size_.Get(); }
+
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const final;
+  void InternalSwap(Contact* other);
+  private:
+  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+    return NULL;
+  }
+  inline void* MaybeArenaPtr() const {
+    return NULL;
+  }
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const final;
+
+  // nested types ----------------------------------------------------
+
+
+  typedef Contact_PhoneType PhoneType;
+  static const PhoneType Home =
+    Contact_PhoneType_Home;
+  static const PhoneType Work =
+    Contact_PhoneType_Work;
+  static const PhoneType Mobile =
+    Contact_PhoneType_Mobile;
+  static const PhoneType Other =
+    Contact_PhoneType_Other;
+  static inline bool PhoneType_IsValid(int value) {
+    return Contact_PhoneType_IsValid(value);
+  }
+  static const PhoneType PhoneType_MIN =
+    Contact_PhoneType_PhoneType_MIN;
+  static const PhoneType PhoneType_MAX =
+    Contact_PhoneType_PhoneType_MAX;
+  static const int PhoneType_ARRAYSIZE =
+    Contact_PhoneType_PhoneType_ARRAYSIZE;
+  static inline const ::google::protobuf::EnumDescriptor*
+  PhoneType_descriptor() {
+    return Contact_PhoneType_descriptor();
+  }
+  static inline const ::std::string& PhoneType_Name(PhoneType value) {
+    return Contact_PhoneType_Name(value);
+  }
+  static inline bool PhoneType_Parse(const ::std::string& name,
+      PhoneType* value) {
+    return Contact_PhoneType_Parse(name, value);
+  }
+
+  // accessors -------------------------------------------------------
+
+  // map<int32, .qtprotobuf.examples.PhoneNumber> phones = 4;
+  int phones_size() const;
+  void clear_phones();
+  static const int kPhonesFieldNumber = 4;
+  const ::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >&
+      phones() const;
+  ::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >*
+      mutable_phones();
+
+  // string firstName = 1;
+  void clear_firstname();
+  static const int kFirstNameFieldNumber = 1;
+  const ::std::string& firstname() const;
+  void set_firstname(const ::std::string& value);
+  #if LANG_CXX11
+  void set_firstname(::std::string&& value);
+  #endif
+  void set_firstname(const char* value);
+  void set_firstname(const char* value, size_t size);
+  ::std::string* mutable_firstname();
+  ::std::string* release_firstname();
+  void set_allocated_firstname(::std::string* firstname);
+
+  // string lastName = 2;
+  void clear_lastname();
+  static const int kLastNameFieldNumber = 2;
+  const ::std::string& lastname() const;
+  void set_lastname(const ::std::string& value);
+  #if LANG_CXX11
+  void set_lastname(::std::string&& value);
+  #endif
+  void set_lastname(const char* value);
+  void set_lastname(const char* value, size_t size);
+  ::std::string* mutable_lastname();
+  ::std::string* release_lastname();
+  void set_allocated_lastname(::std::string* lastname);
+
+  // string middleName = 3;
+  void clear_middlename();
+  static const int kMiddleNameFieldNumber = 3;
+  const ::std::string& middlename() const;
+  void set_middlename(const ::std::string& value);
+  #if LANG_CXX11
+  void set_middlename(::std::string&& value);
+  #endif
+  void set_middlename(const char* value);
+  void set_middlename(const char* value, size_t size);
+  ::std::string* mutable_middlename();
+  ::std::string* release_middlename();
+  void set_allocated_middlename(::std::string* middlename);
+
+  // .qtprotobuf.examples.Address address = 5;
+  bool has_address() const;
+  void clear_address();
+  static const int kAddressFieldNumber = 5;
+  private:
+  const ::qtprotobuf::examples::Address& _internal_address() const;
+  public:
+  const ::qtprotobuf::examples::Address& address() const;
+  ::qtprotobuf::examples::Address* release_address();
+  ::qtprotobuf::examples::Address* mutable_address();
+  void set_allocated_address(::qtprotobuf::examples::Address* address);
+
+  // .qtprotobuf.examples.Job job = 6;
+  bool has_job() const;
+  void clear_job();
+  static const int kJobFieldNumber = 6;
+  private:
+  const ::qtprotobuf::examples::Job& _internal_job() const;
+  public:
+  const ::qtprotobuf::examples::Job& job() const;
+  ::qtprotobuf::examples::Job* release_job();
+  ::qtprotobuf::examples::Job* mutable_job();
+  void set_allocated_job(::qtprotobuf::examples::Job* job);
+
+  // @@protoc_insertion_point(class_scope:qtprotobuf.examples.Contact)
+ private:
+
+  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+  ::google::protobuf::internal::MapField<
+      Contact_PhonesEntry_DoNotUse,
+      ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber,
+      ::google::protobuf::internal::WireFormatLite::TYPE_INT32,
+      ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
+      0 > phones_;
+  ::google::protobuf::internal::ArenaStringPtr firstname_;
+  ::google::protobuf::internal::ArenaStringPtr lastname_;
+  ::google::protobuf::internal::ArenaStringPtr middlename_;
+  ::qtprotobuf::examples::Address* address_;
+  ::qtprotobuf::examples::Job* job_;
+  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  friend struct ::protobuf_addressbook_2eproto::TableStruct;
+};
+// -------------------------------------------------------------------
+
+class Contacts : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:qtprotobuf.examples.Contacts) */ {
+ public:
+  Contacts();
+  virtual ~Contacts();
+
+  Contacts(const Contacts& from);
+
+  inline Contacts& operator=(const Contacts& from) {
+    CopyFrom(from);
+    return *this;
+  }
+  #if LANG_CXX11
+  Contacts(Contacts&& from) noexcept
+    : Contacts() {
+    *this = ::std::move(from);
+  }
+
+  inline Contacts& operator=(Contacts&& from) noexcept {
+    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+      if (this != &from) InternalSwap(&from);
+    } else {
+      CopyFrom(from);
+    }
+    return *this;
+  }
+  #endif
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const Contacts& default_instance();
+
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
+  static inline const Contacts* internal_default_instance() {
+    return reinterpret_cast<const Contacts*>(
+               &_Contacts_default_instance_);
+  }
+  static constexpr int kIndexInFileMessages =
+    5;
+
+  void Swap(Contacts* other);
+  friend void swap(Contacts& a, Contacts& b) {
+    a.Swap(&b);
+  }
+
+  // implements Message ----------------------------------------------
+
+  inline Contacts* New() const final {
+    return CreateMaybeMessage<Contacts>(NULL);
+  }
+
+  Contacts* New(::google::protobuf::Arena* arena) const final {
+    return CreateMaybeMessage<Contacts>(arena);
+  }
+  void CopyFrom(const ::google::protobuf::Message& from) final;
+  void MergeFrom(const ::google::protobuf::Message& from) final;
+  void CopyFrom(const Contacts& from);
+  void MergeFrom(const Contacts& from);
+  void Clear() final;
+  bool IsInitialized() const final;
+
+  size_t ByteSizeLong() const final;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input) final;
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const final;
+  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+      bool deterministic, ::google::protobuf::uint8* target) const final;
+  int GetCachedSize() const final { return _cached_size_.Get(); }
+
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const final;
+  void InternalSwap(Contacts* other);
+  private:
+  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+    return NULL;
+  }
+  inline void* MaybeArenaPtr() const {
+    return NULL;
+  }
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const final;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // repeated .qtprotobuf.examples.Contact list = 1;
+  int list_size() const;
+  void clear_list();
+  static const int kListFieldNumber = 1;
+  ::qtprotobuf::examples::Contact* mutable_list(int index);
+  ::google::protobuf::RepeatedPtrField< ::qtprotobuf::examples::Contact >*
+      mutable_list();
+  const ::qtprotobuf::examples::Contact& list(int index) const;
+  ::qtprotobuf::examples::Contact* add_list();
+  const ::google::protobuf::RepeatedPtrField< ::qtprotobuf::examples::Contact >&
+      list() const;
+
+  // @@protoc_insertion_point(class_scope:qtprotobuf.examples.Contacts)
+ private:
+
+  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+  ::google::protobuf::RepeatedPtrField< ::qtprotobuf::examples::Contact > list_;
+  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  friend struct ::protobuf_addressbook_2eproto::TableStruct;
+};
+// -------------------------------------------------------------------
+
+class SimpleResult : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:qtprotobuf.examples.SimpleResult) */ {
+ public:
+  SimpleResult();
+  virtual ~SimpleResult();
+
+  SimpleResult(const SimpleResult& from);
+
+  inline SimpleResult& operator=(const SimpleResult& from) {
+    CopyFrom(from);
+    return *this;
+  }
+  #if LANG_CXX11
+  SimpleResult(SimpleResult&& from) noexcept
+    : SimpleResult() {
+    *this = ::std::move(from);
+  }
+
+  inline SimpleResult& operator=(SimpleResult&& from) noexcept {
+    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+      if (this != &from) InternalSwap(&from);
+    } else {
+      CopyFrom(from);
+    }
+    return *this;
+  }
+  #endif
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const SimpleResult& default_instance();
+
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
+  static inline const SimpleResult* internal_default_instance() {
+    return reinterpret_cast<const SimpleResult*>(
+               &_SimpleResult_default_instance_);
+  }
+  static constexpr int kIndexInFileMessages =
+    6;
+
+  void Swap(SimpleResult* other);
+  friend void swap(SimpleResult& a, SimpleResult& b) {
+    a.Swap(&b);
+  }
+
+  // implements Message ----------------------------------------------
+
+  inline SimpleResult* New() const final {
+    return CreateMaybeMessage<SimpleResult>(NULL);
+  }
+
+  SimpleResult* New(::google::protobuf::Arena* arena) const final {
+    return CreateMaybeMessage<SimpleResult>(arena);
+  }
+  void CopyFrom(const ::google::protobuf::Message& from) final;
+  void MergeFrom(const ::google::protobuf::Message& from) final;
+  void CopyFrom(const SimpleResult& from);
+  void MergeFrom(const SimpleResult& from);
+  void Clear() final;
+  bool IsInitialized() const final;
+
+  size_t ByteSizeLong() const final;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input) final;
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const final;
+  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+      bool deterministic, ::google::protobuf::uint8* target) const final;
+  int GetCachedSize() const final { return _cached_size_.Get(); }
+
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const final;
+  void InternalSwap(SimpleResult* other);
+  private:
+  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+    return NULL;
+  }
+  inline void* MaybeArenaPtr() const {
+    return NULL;
+  }
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const final;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // bool ok = 1;
+  void clear_ok();
+  static const int kOkFieldNumber = 1;
+  bool ok() const;
+  void set_ok(bool value);
+
+  // @@protoc_insertion_point(class_scope:qtprotobuf.examples.SimpleResult)
+ private:
+
+  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+  bool ok_;
+  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  friend struct ::protobuf_addressbook_2eproto::TableStruct;
+};
+// -------------------------------------------------------------------
+
+class ListFrame : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:qtprotobuf.examples.ListFrame) */ {
+ public:
+  ListFrame();
+  virtual ~ListFrame();
+
+  ListFrame(const ListFrame& from);
+
+  inline ListFrame& operator=(const ListFrame& from) {
+    CopyFrom(from);
+    return *this;
+  }
+  #if LANG_CXX11
+  ListFrame(ListFrame&& from) noexcept
+    : ListFrame() {
+    *this = ::std::move(from);
+  }
+
+  inline ListFrame& operator=(ListFrame&& from) noexcept {
+    if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
+      if (this != &from) InternalSwap(&from);
+    } else {
+      CopyFrom(from);
+    }
+    return *this;
+  }
+  #endif
+  static const ::google::protobuf::Descriptor* descriptor();
+  static const ListFrame& default_instance();
+
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
+  static inline const ListFrame* internal_default_instance() {
+    return reinterpret_cast<const ListFrame*>(
+               &_ListFrame_default_instance_);
+  }
+  static constexpr int kIndexInFileMessages =
+    7;
+
+  void Swap(ListFrame* other);
+  friend void swap(ListFrame& a, ListFrame& b) {
+    a.Swap(&b);
+  }
+
+  // implements Message ----------------------------------------------
+
+  inline ListFrame* New() const final {
+    return CreateMaybeMessage<ListFrame>(NULL);
+  }
+
+  ListFrame* New(::google::protobuf::Arena* arena) const final {
+    return CreateMaybeMessage<ListFrame>(arena);
+  }
+  void CopyFrom(const ::google::protobuf::Message& from) final;
+  void MergeFrom(const ::google::protobuf::Message& from) final;
+  void CopyFrom(const ListFrame& from);
+  void MergeFrom(const ListFrame& from);
+  void Clear() final;
+  bool IsInitialized() const final;
+
+  size_t ByteSizeLong() const final;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input) final;
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const final;
+  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
+      bool deterministic, ::google::protobuf::uint8* target) const final;
+  int GetCachedSize() const final { return _cached_size_.Get(); }
+
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const final;
+  void InternalSwap(ListFrame* other);
+  private:
+  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
+    return NULL;
+  }
+  inline void* MaybeArenaPtr() const {
+    return NULL;
+  }
+  public:
+
+  ::google::protobuf::Metadata GetMetadata() const final;
+
+  // nested types ----------------------------------------------------
+
+  // accessors -------------------------------------------------------
+
+  // sint32 start = 1;
+  void clear_start();
+  static const int kStartFieldNumber = 1;
+  ::google::protobuf::int32 start() const;
+  void set_start(::google::protobuf::int32 value);
+
+  // sint32 end = 2;
+  void clear_end();
+  static const int kEndFieldNumber = 2;
+  ::google::protobuf::int32 end() const;
+  void set_end(::google::protobuf::int32 value);
+
+  // @@protoc_insertion_point(class_scope:qtprotobuf.examples.ListFrame)
+ private:
+
+  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+  ::google::protobuf::int32 start_;
+  ::google::protobuf::int32 end_;
+  mutable ::google::protobuf::internal::CachedSize _cached_size_;
+  friend struct ::protobuf_addressbook_2eproto::TableStruct;
+};
+// ===================================================================
+
+
+// ===================================================================
+
+#ifdef __GNUC__
+  #pragma GCC diagnostic push
+  #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif  // __GNUC__
+// PhoneNumber
+
+// uint32 countryCode = 1;
+inline void PhoneNumber::clear_countrycode() {
+  countrycode_ = 0u;
+}
+inline ::google::protobuf::uint32 PhoneNumber::countrycode() const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.PhoneNumber.countryCode)
+  return countrycode_;
+}
+inline void PhoneNumber::set_countrycode(::google::protobuf::uint32 value) {
+  
+  countrycode_ = value;
+  // @@protoc_insertion_point(field_set:qtprotobuf.examples.PhoneNumber.countryCode)
+}
+
+// repeated uint64 number = 2;
+inline int PhoneNumber::number_size() const {
+  return number_.size();
+}
+inline void PhoneNumber::clear_number() {
+  number_.Clear();
+}
+inline ::google::protobuf::uint64 PhoneNumber::number(int index) const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.PhoneNumber.number)
+  return number_.Get(index);
+}
+inline void PhoneNumber::set_number(int index, ::google::protobuf::uint64 value) {
+  number_.Set(index, value);
+  // @@protoc_insertion_point(field_set:qtprotobuf.examples.PhoneNumber.number)
+}
+inline void PhoneNumber::add_number(::google::protobuf::uint64 value) {
+  number_.Add(value);
+  // @@protoc_insertion_point(field_add:qtprotobuf.examples.PhoneNumber.number)
+}
+inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >&
+PhoneNumber::number() const {
+  // @@protoc_insertion_point(field_list:qtprotobuf.examples.PhoneNumber.number)
+  return number_;
+}
+inline ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >*
+PhoneNumber::mutable_number() {
+  // @@protoc_insertion_point(field_mutable_list:qtprotobuf.examples.PhoneNumber.number)
+  return &number_;
+}
+
+// -------------------------------------------------------------------
+
+// Address
+
+// uint64 zipCode = 1;
+inline void Address::clear_zipcode() {
+  zipcode_ = GOOGLE_ULONGLONG(0);
+}
+inline ::google::protobuf::uint64 Address::zipcode() const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.Address.zipCode)
+  return zipcode_;
+}
+inline void Address::set_zipcode(::google::protobuf::uint64 value) {
+  
+  zipcode_ = value;
+  // @@protoc_insertion_point(field_set:qtprotobuf.examples.Address.zipCode)
+}
+
+// string streetAddress1 = 2;
+inline void Address::clear_streetaddress1() {
+  streetaddress1_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Address::streetaddress1() const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.Address.streetAddress1)
+  return streetaddress1_.GetNoArena();
+}
+inline void Address::set_streetaddress1(const ::std::string& value) {
+  
+  streetaddress1_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+  // @@protoc_insertion_point(field_set:qtprotobuf.examples.Address.streetAddress1)
+}
+#if LANG_CXX11
+inline void Address::set_streetaddress1(::std::string&& value) {
+  
+  streetaddress1_.SetNoArena(
+    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+  // @@protoc_insertion_point(field_set_rvalue:qtprotobuf.examples.Address.streetAddress1)
+}
+#endif
+inline void Address::set_streetaddress1(const char* value) {
+  GOOGLE_DCHECK(value != NULL);
+  
+  streetaddress1_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+  // @@protoc_insertion_point(field_set_char:qtprotobuf.examples.Address.streetAddress1)
+}
+inline void Address::set_streetaddress1(const char* value, size_t size) {
+  
+  streetaddress1_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+      ::std::string(reinterpret_cast<const char*>(value), size));
+  // @@protoc_insertion_point(field_set_pointer:qtprotobuf.examples.Address.streetAddress1)
+}
+inline ::std::string* Address::mutable_streetaddress1() {
+  
+  // @@protoc_insertion_point(field_mutable:qtprotobuf.examples.Address.streetAddress1)
+  return streetaddress1_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Address::release_streetaddress1() {
+  // @@protoc_insertion_point(field_release:qtprotobuf.examples.Address.streetAddress1)
+  
+  return streetaddress1_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Address::set_allocated_streetaddress1(::std::string* streetaddress1) {
+  if (streetaddress1 != NULL) {
+    
+  } else {
+    
+  }
+  streetaddress1_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), streetaddress1);
+  // @@protoc_insertion_point(field_set_allocated:qtprotobuf.examples.Address.streetAddress1)
+}
+
+// string streetAddress2 = 3;
+inline void Address::clear_streetaddress2() {
+  streetaddress2_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Address::streetaddress2() const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.Address.streetAddress2)
+  return streetaddress2_.GetNoArena();
+}
+inline void Address::set_streetaddress2(const ::std::string& value) {
+  
+  streetaddress2_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+  // @@protoc_insertion_point(field_set:qtprotobuf.examples.Address.streetAddress2)
+}
+#if LANG_CXX11
+inline void Address::set_streetaddress2(::std::string&& value) {
+  
+  streetaddress2_.SetNoArena(
+    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+  // @@protoc_insertion_point(field_set_rvalue:qtprotobuf.examples.Address.streetAddress2)
+}
+#endif
+inline void Address::set_streetaddress2(const char* value) {
+  GOOGLE_DCHECK(value != NULL);
+  
+  streetaddress2_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+  // @@protoc_insertion_point(field_set_char:qtprotobuf.examples.Address.streetAddress2)
+}
+inline void Address::set_streetaddress2(const char* value, size_t size) {
+  
+  streetaddress2_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+      ::std::string(reinterpret_cast<const char*>(value), size));
+  // @@protoc_insertion_point(field_set_pointer:qtprotobuf.examples.Address.streetAddress2)
+}
+inline ::std::string* Address::mutable_streetaddress2() {
+  
+  // @@protoc_insertion_point(field_mutable:qtprotobuf.examples.Address.streetAddress2)
+  return streetaddress2_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Address::release_streetaddress2() {
+  // @@protoc_insertion_point(field_release:qtprotobuf.examples.Address.streetAddress2)
+  
+  return streetaddress2_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Address::set_allocated_streetaddress2(::std::string* streetaddress2) {
+  if (streetaddress2 != NULL) {
+    
+  } else {
+    
+  }
+  streetaddress2_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), streetaddress2);
+  // @@protoc_insertion_point(field_set_allocated:qtprotobuf.examples.Address.streetAddress2)
+}
+
+// string state = 4;
+inline void Address::clear_state() {
+  state_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Address::state() const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.Address.state)
+  return state_.GetNoArena();
+}
+inline void Address::set_state(const ::std::string& value) {
+  
+  state_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+  // @@protoc_insertion_point(field_set:qtprotobuf.examples.Address.state)
+}
+#if LANG_CXX11
+inline void Address::set_state(::std::string&& value) {
+  
+  state_.SetNoArena(
+    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+  // @@protoc_insertion_point(field_set_rvalue:qtprotobuf.examples.Address.state)
+}
+#endif
+inline void Address::set_state(const char* value) {
+  GOOGLE_DCHECK(value != NULL);
+  
+  state_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+  // @@protoc_insertion_point(field_set_char:qtprotobuf.examples.Address.state)
+}
+inline void Address::set_state(const char* value, size_t size) {
+  
+  state_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+      ::std::string(reinterpret_cast<const char*>(value), size));
+  // @@protoc_insertion_point(field_set_pointer:qtprotobuf.examples.Address.state)
+}
+inline ::std::string* Address::mutable_state() {
+  
+  // @@protoc_insertion_point(field_mutable:qtprotobuf.examples.Address.state)
+  return state_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Address::release_state() {
+  // @@protoc_insertion_point(field_release:qtprotobuf.examples.Address.state)
+  
+  return state_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Address::set_allocated_state(::std::string* state) {
+  if (state != NULL) {
+    
+  } else {
+    
+  }
+  state_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), state);
+  // @@protoc_insertion_point(field_set_allocated:qtprotobuf.examples.Address.state)
+}
+
+// uint32 country = 5;
+inline void Address::clear_country() {
+  country_ = 0u;
+}
+inline ::google::protobuf::uint32 Address::country() const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.Address.country)
+  return country_;
+}
+inline void Address::set_country(::google::protobuf::uint32 value) {
+  
+  country_ = value;
+  // @@protoc_insertion_point(field_set:qtprotobuf.examples.Address.country)
+}
+
+// -------------------------------------------------------------------
+
+// Job
+
+// string title = 1;
+inline void Job::clear_title() {
+  title_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Job::title() const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.Job.title)
+  return title_.GetNoArena();
+}
+inline void Job::set_title(const ::std::string& value) {
+  
+  title_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+  // @@protoc_insertion_point(field_set:qtprotobuf.examples.Job.title)
+}
+#if LANG_CXX11
+inline void Job::set_title(::std::string&& value) {
+  
+  title_.SetNoArena(
+    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+  // @@protoc_insertion_point(field_set_rvalue:qtprotobuf.examples.Job.title)
+}
+#endif
+inline void Job::set_title(const char* value) {
+  GOOGLE_DCHECK(value != NULL);
+  
+  title_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+  // @@protoc_insertion_point(field_set_char:qtprotobuf.examples.Job.title)
+}
+inline void Job::set_title(const char* value, size_t size) {
+  
+  title_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+      ::std::string(reinterpret_cast<const char*>(value), size));
+  // @@protoc_insertion_point(field_set_pointer:qtprotobuf.examples.Job.title)
+}
+inline ::std::string* Job::mutable_title() {
+  
+  // @@protoc_insertion_point(field_mutable:qtprotobuf.examples.Job.title)
+  return title_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Job::release_title() {
+  // @@protoc_insertion_point(field_release:qtprotobuf.examples.Job.title)
+  
+  return title_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Job::set_allocated_title(::std::string* title) {
+  if (title != NULL) {
+    
+  } else {
+    
+  }
+  title_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), title);
+  // @@protoc_insertion_point(field_set_allocated:qtprotobuf.examples.Job.title)
+}
+
+// .qtprotobuf.examples.Address officeAddress = 2;
+inline bool Job::has_officeaddress() const {
+  return this != internal_default_instance() && officeaddress_ != NULL;
+}
+inline void Job::clear_officeaddress() {
+  if (GetArenaNoVirtual() == NULL && officeaddress_ != NULL) {
+    delete officeaddress_;
+  }
+  officeaddress_ = NULL;
+}
+inline const ::qtprotobuf::examples::Address& Job::_internal_officeaddress() const {
+  return *officeaddress_;
+}
+inline const ::qtprotobuf::examples::Address& Job::officeaddress() const {
+  const ::qtprotobuf::examples::Address* p = officeaddress_;
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.Job.officeAddress)
+  return p != NULL ? *p : *reinterpret_cast<const ::qtprotobuf::examples::Address*>(
+      &::qtprotobuf::examples::_Address_default_instance_);
+}
+inline ::qtprotobuf::examples::Address* Job::release_officeaddress() {
+  // @@protoc_insertion_point(field_release:qtprotobuf.examples.Job.officeAddress)
+  
+  ::qtprotobuf::examples::Address* temp = officeaddress_;
+  officeaddress_ = NULL;
+  return temp;
+}
+inline ::qtprotobuf::examples::Address* Job::mutable_officeaddress() {
+  
+  if (officeaddress_ == NULL) {
+    auto* p = CreateMaybeMessage<::qtprotobuf::examples::Address>(GetArenaNoVirtual());
+    officeaddress_ = p;
+  }
+  // @@protoc_insertion_point(field_mutable:qtprotobuf.examples.Job.officeAddress)
+  return officeaddress_;
+}
+inline void Job::set_allocated_officeaddress(::qtprotobuf::examples::Address* officeaddress) {
+  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+  if (message_arena == NULL) {
+    delete officeaddress_;
+  }
+  if (officeaddress) {
+    ::google::protobuf::Arena* submessage_arena = NULL;
+    if (message_arena != submessage_arena) {
+      officeaddress = ::google::protobuf::internal::GetOwnedMessage(
+          message_arena, officeaddress, submessage_arena);
+    }
+    
+  } else {
+    
+  }
+  officeaddress_ = officeaddress;
+  // @@protoc_insertion_point(field_set_allocated:qtprotobuf.examples.Job.officeAddress)
+}
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// Contact
+
+// string firstName = 1;
+inline void Contact::clear_firstname() {
+  firstname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Contact::firstname() const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.Contact.firstName)
+  return firstname_.GetNoArena();
+}
+inline void Contact::set_firstname(const ::std::string& value) {
+  
+  firstname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+  // @@protoc_insertion_point(field_set:qtprotobuf.examples.Contact.firstName)
+}
+#if LANG_CXX11
+inline void Contact::set_firstname(::std::string&& value) {
+  
+  firstname_.SetNoArena(
+    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+  // @@protoc_insertion_point(field_set_rvalue:qtprotobuf.examples.Contact.firstName)
+}
+#endif
+inline void Contact::set_firstname(const char* value) {
+  GOOGLE_DCHECK(value != NULL);
+  
+  firstname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+  // @@protoc_insertion_point(field_set_char:qtprotobuf.examples.Contact.firstName)
+}
+inline void Contact::set_firstname(const char* value, size_t size) {
+  
+  firstname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+      ::std::string(reinterpret_cast<const char*>(value), size));
+  // @@protoc_insertion_point(field_set_pointer:qtprotobuf.examples.Contact.firstName)
+}
+inline ::std::string* Contact::mutable_firstname() {
+  
+  // @@protoc_insertion_point(field_mutable:qtprotobuf.examples.Contact.firstName)
+  return firstname_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Contact::release_firstname() {
+  // @@protoc_insertion_point(field_release:qtprotobuf.examples.Contact.firstName)
+  
+  return firstname_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Contact::set_allocated_firstname(::std::string* firstname) {
+  if (firstname != NULL) {
+    
+  } else {
+    
+  }
+  firstname_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), firstname);
+  // @@protoc_insertion_point(field_set_allocated:qtprotobuf.examples.Contact.firstName)
+}
+
+// string lastName = 2;
+inline void Contact::clear_lastname() {
+  lastname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Contact::lastname() const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.Contact.lastName)
+  return lastname_.GetNoArena();
+}
+inline void Contact::set_lastname(const ::std::string& value) {
+  
+  lastname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+  // @@protoc_insertion_point(field_set:qtprotobuf.examples.Contact.lastName)
+}
+#if LANG_CXX11
+inline void Contact::set_lastname(::std::string&& value) {
+  
+  lastname_.SetNoArena(
+    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+  // @@protoc_insertion_point(field_set_rvalue:qtprotobuf.examples.Contact.lastName)
+}
+#endif
+inline void Contact::set_lastname(const char* value) {
+  GOOGLE_DCHECK(value != NULL);
+  
+  lastname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+  // @@protoc_insertion_point(field_set_char:qtprotobuf.examples.Contact.lastName)
+}
+inline void Contact::set_lastname(const char* value, size_t size) {
+  
+  lastname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+      ::std::string(reinterpret_cast<const char*>(value), size));
+  // @@protoc_insertion_point(field_set_pointer:qtprotobuf.examples.Contact.lastName)
+}
+inline ::std::string* Contact::mutable_lastname() {
+  
+  // @@protoc_insertion_point(field_mutable:qtprotobuf.examples.Contact.lastName)
+  return lastname_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Contact::release_lastname() {
+  // @@protoc_insertion_point(field_release:qtprotobuf.examples.Contact.lastName)
+  
+  return lastname_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Contact::set_allocated_lastname(::std::string* lastname) {
+  if (lastname != NULL) {
+    
+  } else {
+    
+  }
+  lastname_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), lastname);
+  // @@protoc_insertion_point(field_set_allocated:qtprotobuf.examples.Contact.lastName)
+}
+
+// string middleName = 3;
+inline void Contact::clear_middlename() {
+  middlename_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline const ::std::string& Contact::middlename() const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.Contact.middleName)
+  return middlename_.GetNoArena();
+}
+inline void Contact::set_middlename(const ::std::string& value) {
+  
+  middlename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
+  // @@protoc_insertion_point(field_set:qtprotobuf.examples.Contact.middleName)
+}
+#if LANG_CXX11
+inline void Contact::set_middlename(::std::string&& value) {
+  
+  middlename_.SetNoArena(
+    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
+  // @@protoc_insertion_point(field_set_rvalue:qtprotobuf.examples.Contact.middleName)
+}
+#endif
+inline void Contact::set_middlename(const char* value) {
+  GOOGLE_DCHECK(value != NULL);
+  
+  middlename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
+  // @@protoc_insertion_point(field_set_char:qtprotobuf.examples.Contact.middleName)
+}
+inline void Contact::set_middlename(const char* value, size_t size) {
+  
+  middlename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
+      ::std::string(reinterpret_cast<const char*>(value), size));
+  // @@protoc_insertion_point(field_set_pointer:qtprotobuf.examples.Contact.middleName)
+}
+inline ::std::string* Contact::mutable_middlename() {
+  
+  // @@protoc_insertion_point(field_mutable:qtprotobuf.examples.Contact.middleName)
+  return middlename_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline ::std::string* Contact::release_middlename() {
+  // @@protoc_insertion_point(field_release:qtprotobuf.examples.Contact.middleName)
+  
+  return middlename_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+}
+inline void Contact::set_allocated_middlename(::std::string* middlename) {
+  if (middlename != NULL) {
+    
+  } else {
+    
+  }
+  middlename_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), middlename);
+  // @@protoc_insertion_point(field_set_allocated:qtprotobuf.examples.Contact.middleName)
+}
+
+// map<int32, .qtprotobuf.examples.PhoneNumber> phones = 4;
+inline int Contact::phones_size() const {
+  return phones_.size();
+}
+inline void Contact::clear_phones() {
+  phones_.Clear();
+}
+inline const ::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >&
+Contact::phones() const {
+  // @@protoc_insertion_point(field_map:qtprotobuf.examples.Contact.phones)
+  return phones_.GetMap();
+}
+inline ::google::protobuf::Map< ::google::protobuf::int32, ::qtprotobuf::examples::PhoneNumber >*
+Contact::mutable_phones() {
+  // @@protoc_insertion_point(field_mutable_map:qtprotobuf.examples.Contact.phones)
+  return phones_.MutableMap();
+}
+
+// .qtprotobuf.examples.Address address = 5;
+inline bool Contact::has_address() const {
+  return this != internal_default_instance() && address_ != NULL;
+}
+inline void Contact::clear_address() {
+  if (GetArenaNoVirtual() == NULL && address_ != NULL) {
+    delete address_;
+  }
+  address_ = NULL;
+}
+inline const ::qtprotobuf::examples::Address& Contact::_internal_address() const {
+  return *address_;
+}
+inline const ::qtprotobuf::examples::Address& Contact::address() const {
+  const ::qtprotobuf::examples::Address* p = address_;
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.Contact.address)
+  return p != NULL ? *p : *reinterpret_cast<const ::qtprotobuf::examples::Address*>(
+      &::qtprotobuf::examples::_Address_default_instance_);
+}
+inline ::qtprotobuf::examples::Address* Contact::release_address() {
+  // @@protoc_insertion_point(field_release:qtprotobuf.examples.Contact.address)
+  
+  ::qtprotobuf::examples::Address* temp = address_;
+  address_ = NULL;
+  return temp;
+}
+inline ::qtprotobuf::examples::Address* Contact::mutable_address() {
+  
+  if (address_ == NULL) {
+    auto* p = CreateMaybeMessage<::qtprotobuf::examples::Address>(GetArenaNoVirtual());
+    address_ = p;
+  }
+  // @@protoc_insertion_point(field_mutable:qtprotobuf.examples.Contact.address)
+  return address_;
+}
+inline void Contact::set_allocated_address(::qtprotobuf::examples::Address* address) {
+  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+  if (message_arena == NULL) {
+    delete address_;
+  }
+  if (address) {
+    ::google::protobuf::Arena* submessage_arena = NULL;
+    if (message_arena != submessage_arena) {
+      address = ::google::protobuf::internal::GetOwnedMessage(
+          message_arena, address, submessage_arena);
+    }
+    
+  } else {
+    
+  }
+  address_ = address;
+  // @@protoc_insertion_point(field_set_allocated:qtprotobuf.examples.Contact.address)
+}
+
+// .qtprotobuf.examples.Job job = 6;
+inline bool Contact::has_job() const {
+  return this != internal_default_instance() && job_ != NULL;
+}
+inline void Contact::clear_job() {
+  if (GetArenaNoVirtual() == NULL && job_ != NULL) {
+    delete job_;
+  }
+  job_ = NULL;
+}
+inline const ::qtprotobuf::examples::Job& Contact::_internal_job() const {
+  return *job_;
+}
+inline const ::qtprotobuf::examples::Job& Contact::job() const {
+  const ::qtprotobuf::examples::Job* p = job_;
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.Contact.job)
+  return p != NULL ? *p : *reinterpret_cast<const ::qtprotobuf::examples::Job*>(
+      &::qtprotobuf::examples::_Job_default_instance_);
+}
+inline ::qtprotobuf::examples::Job* Contact::release_job() {
+  // @@protoc_insertion_point(field_release:qtprotobuf.examples.Contact.job)
+  
+  ::qtprotobuf::examples::Job* temp = job_;
+  job_ = NULL;
+  return temp;
+}
+inline ::qtprotobuf::examples::Job* Contact::mutable_job() {
+  
+  if (job_ == NULL) {
+    auto* p = CreateMaybeMessage<::qtprotobuf::examples::Job>(GetArenaNoVirtual());
+    job_ = p;
+  }
+  // @@protoc_insertion_point(field_mutable:qtprotobuf.examples.Contact.job)
+  return job_;
+}
+inline void Contact::set_allocated_job(::qtprotobuf::examples::Job* job) {
+  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+  if (message_arena == NULL) {
+    delete job_;
+  }
+  if (job) {
+    ::google::protobuf::Arena* submessage_arena = NULL;
+    if (message_arena != submessage_arena) {
+      job = ::google::protobuf::internal::GetOwnedMessage(
+          message_arena, job, submessage_arena);
+    }
+    
+  } else {
+    
+  }
+  job_ = job;
+  // @@protoc_insertion_point(field_set_allocated:qtprotobuf.examples.Contact.job)
+}
+
+// -------------------------------------------------------------------
+
+// Contacts
+
+// repeated .qtprotobuf.examples.Contact list = 1;
+inline int Contacts::list_size() const {
+  return list_.size();
+}
+inline void Contacts::clear_list() {
+  list_.Clear();
+}
+inline ::qtprotobuf::examples::Contact* Contacts::mutable_list(int index) {
+  // @@protoc_insertion_point(field_mutable:qtprotobuf.examples.Contacts.list)
+  return list_.Mutable(index);
+}
+inline ::google::protobuf::RepeatedPtrField< ::qtprotobuf::examples::Contact >*
+Contacts::mutable_list() {
+  // @@protoc_insertion_point(field_mutable_list:qtprotobuf.examples.Contacts.list)
+  return &list_;
+}
+inline const ::qtprotobuf::examples::Contact& Contacts::list(int index) const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.Contacts.list)
+  return list_.Get(index);
+}
+inline ::qtprotobuf::examples::Contact* Contacts::add_list() {
+  // @@protoc_insertion_point(field_add:qtprotobuf.examples.Contacts.list)
+  return list_.Add();
+}
+inline const ::google::protobuf::RepeatedPtrField< ::qtprotobuf::examples::Contact >&
+Contacts::list() const {
+  // @@protoc_insertion_point(field_list:qtprotobuf.examples.Contacts.list)
+  return list_;
+}
+
+// -------------------------------------------------------------------
+
+// SimpleResult
+
+// bool ok = 1;
+inline void SimpleResult::clear_ok() {
+  ok_ = false;
+}
+inline bool SimpleResult::ok() const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.SimpleResult.ok)
+  return ok_;
+}
+inline void SimpleResult::set_ok(bool value) {
+  
+  ok_ = value;
+  // @@protoc_insertion_point(field_set:qtprotobuf.examples.SimpleResult.ok)
+}
+
+// -------------------------------------------------------------------
+
+// ListFrame
+
+// sint32 start = 1;
+inline void ListFrame::clear_start() {
+  start_ = 0;
+}
+inline ::google::protobuf::int32 ListFrame::start() const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.ListFrame.start)
+  return start_;
+}
+inline void ListFrame::set_start(::google::protobuf::int32 value) {
+  
+  start_ = value;
+  // @@protoc_insertion_point(field_set:qtprotobuf.examples.ListFrame.start)
+}
+
+// sint32 end = 2;
+inline void ListFrame::clear_end() {
+  end_ = 0;
+}
+inline ::google::protobuf::int32 ListFrame::end() const {
+  // @@protoc_insertion_point(field_get:qtprotobuf.examples.ListFrame.end)
+  return end_;
+}
+inline void ListFrame::set_end(::google::protobuf::int32 value) {
+  
+  end_ = value;
+  // @@protoc_insertion_point(field_set:qtprotobuf.examples.ListFrame.end)
+}
+
+#ifdef __GNUC__
+  #pragma GCC diagnostic pop
+#endif  // __GNUC__
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+// -------------------------------------------------------------------
+
+
+// @@protoc_insertion_point(namespace_scope)
+
+}  // namespace examples
+}  // namespace qtprotobuf
+
+namespace google {
+namespace protobuf {
+
+template <> struct is_proto_enum< ::qtprotobuf::examples::Contact_PhoneType> : ::std::true_type {};
+template <>
+inline const EnumDescriptor* GetEnumDescriptor< ::qtprotobuf::examples::Contact_PhoneType>() {
+  return ::qtprotobuf::examples::Contact_PhoneType_descriptor();
+}
+
+}  // namespace protobuf
+}  // namespace google
+
+// @@protoc_insertion_point(global_scope)
+
+#endif  // PROTOBUF_INCLUDED_addressbook_2eproto

+ 83 - 0
examples/addressbookserver/addressbook.proto

@@ -0,0 +1,83 @@
+/*
+ * MIT License
+ *
+ * Copyright (c) 2019 Alexey Edelev <semlanik@gmail.com>
+ *
+ * This file is part of qtprotobuf project https://git.semlanik.org/semlanik/qtprotobuf
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this
+ * software and associated documentation files (the "Software"), to deal in the Software
+ * without restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software, and
+ * to permit persons to whom the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies
+ * or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+ * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+syntax="proto3";
+
+package qtprotobuf.examples;
+
+message PhoneNumber {
+    uint32 countryCode = 1;
+    repeated uint64 number = 2;
+}
+
+message Address {
+    uint64 zipCode = 1;
+    string streetAddress1 = 2;
+    string streetAddress2 = 3;
+    string state = 4;
+    uint32 country = 5;
+}
+
+message Job {
+    string title = 1;
+    Address officeAddress = 2;
+}
+
+message Contact {
+    enum PhoneType {
+        Home = 0;
+        Work = 1;
+        Mobile = 2;
+        Other = 3;
+    };
+
+    string firstName = 1;
+    string lastName = 2;
+    string middleName = 3;
+    map<int32, PhoneNumber> phones = 4;
+    Address address = 5;
+    Job job = 6;
+}
+
+message Contacts {
+    repeated Contact list = 1;
+}
+
+message SimpleResult {
+    bool ok = 1;
+}
+
+message ListFrame {
+    sint32 start = 1;
+    sint32 end = 2;
+}
+
+service AddressBook {
+    rpc addContact(Contact) returns (Contacts) {}
+    rpc removeContact(Contact) returns (Contacts) {}
+    rpc getContacts(ListFrame) returns (Contacts) {}
+    rpc makeCall(Contact) returns (SimpleResult) {}
+    rpc navigateTo(Address) returns (SimpleResult) {}
+}

+ 73 - 0
examples/addressbookserver/build/.gitignore

@@ -0,0 +1,73 @@
+# This file is used to ignore files which are generated
+# ----------------------------------------------------------------------------
+
+*~
+*.autosave
+*.a
+*.core
+*.moc
+*.o
+*.obj
+*.orig
+*.rej
+*.so
+*.so.*
+*_pch.h.cpp
+*_resource.rc
+*.qm
+.#*
+*.*#
+core
+!core/
+tags
+.DS_Store
+.directory
+*.debug
+Makefile*
+*.prl
+*.app
+moc_*.cpp
+ui_*.h
+qrc_*.cpp
+Thumbs.db
+*.res
+*.rc
+/.qmake.cache
+/.qmake.stash
+
+# qtcreator generated files
+*.pro.user*
+
+# xemacs temporary files
+*.flc
+
+# Vim temporary files
+.*.swp
+
+# Visual Studio generated files
+*.ib_pdb_index
+*.idb
+*.ilk
+*.pdb
+*.sln
+*.suo
+*.vcproj
+*vcproj.*.*.user
+*.ncb
+*.sdf
+*.opensdf
+*.vcxproj
+*vcxproj.*
+
+# MinGW generated files
+*.Debug
+*.Release
+
+# Python byte code
+*.pyc
+
+# Binaries
+# --------
+*.dll
+*.exe
+

+ 61 - 0
examples/addressbookserver/main.cpp

@@ -0,0 +1,61 @@
+#include <iostream>
+#include <grpc++/grpc++.h>
+#include "addressbook.pb.h"
+#include "addressbook.grpc.pb.h"
+
+class AddressBookService final : public qtprotobuf::examples::AddressBook::Service {
+public:
+    AddressBookService() {}
+    ~AddressBookService() {}
+    ::grpc::Status addContact(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::Contacts* response) override
+    {
+        std::cout << "addContact called" << std::endl;
+        return ::grpc::Status(::grpc::UNIMPLEMENTED, "Unimplemented");
+    }
+    ::grpc::Status removeContact(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::Contacts* response) override
+    {
+        std::cout << "removeContact called" << std::endl;
+        return ::grpc::Status(::grpc::UNIMPLEMENTED, "Unimplemented");
+    }
+    ::grpc::Status getContacts(::grpc::ServerContext* context, const ::qtprotobuf::examples::ListFrame* request, ::qtprotobuf::examples::Contacts* response) override
+    {
+        std::cout << "getContacts called" << std::endl;
+        ::qtprotobuf::examples::Contact* contact = response->add_list();
+        contact->set_firstname("Test name 1");
+        contact = response->add_list();
+        contact->set_firstname("Test name 2");
+        contact = response->add_list();
+        contact->set_firstname("Test name 3");
+        contact = response->add_list();
+        contact->set_firstname("Test name 4");
+        contact = response->add_list();
+        contact->set_firstname("Test name 5");
+        ::qtprotobuf::examples::Job *job = new ::qtprotobuf::examples::Job;
+        job->set_title("Job title");
+        contact->set_allocated_job(job);
+        return ::grpc::Status();
+    }
+    ::grpc::Status makeCall(::grpc::ServerContext* context, const ::qtprotobuf::examples::Contact* request, ::qtprotobuf::examples::SimpleResult* response) override
+    {
+        std::cout << "makeCall called" << std::endl;
+        return ::grpc::Status(::grpc::UNIMPLEMENTED, "Unimplemented");
+    }
+    ::grpc::Status navigateTo(::grpc::ServerContext* context, const ::qtprotobuf::examples::Address* request, ::qtprotobuf::examples::SimpleResult* response) override
+    {
+        std::cout << "navigateTo called" << std::endl;
+        return ::grpc::Status(::grpc::UNIMPLEMENTED, "Unimplemented");
+    }
+};
+
+int main(int argc, char *argv[])
+{
+    std::string server_address("localhost:65001");
+    AddressBookService service;
+
+    grpc::ServerBuilder builder;
+    builder.AddListeningPort(server_address, grpc::InsecureServerCredentials());
+    builder.RegisterService(&service);
+    std::unique_ptr<grpc::Server> server(builder.BuildAndStart());
+    std::cout << "Server listening on " << server_address << std::endl;
+    server->Wait();
+}

+ 1 - 1
src/generator/templates.cpp

@@ -65,7 +65,7 @@ const char *Templates::UsingNamespaceTemplate = "using namespace $namespace$;\n"
 const char *Templates::NonProtoClassDefinitionTemplate = "\nclass $classname$ : public QObject\n"
                                                          "{\n"
                                                          "    Q_OBJECT\n";
-const char *Templates::ProtoClassDefinitionTemplate = "\nclass $classname$ final : public QObject\n"
+const char *Templates::ProtoClassDefinitionTemplate = "\nclass $classname$ : public QObject\n"
                                                  "{\n"
                                                  "    Q_OBJECT\n";
 

+ 2 - 0
src/protobuf/CMakeLists.txt

@@ -10,6 +10,8 @@ if(Qt5_POSITION_INDEPENDENT_CODE)
   set(CMAKE_POSITION_INDEPENDENT_CODE ON)
 endif()
 
+find_package(Qt5 COMPONENTS Core Qml REQUIRED)
+
 file(GLOB SOURCES
     qprotobufobject_p.cpp
     qtprotobuf.cpp

+ 4 - 0
src/protobuf/qtprotobuftypes.h

@@ -27,6 +27,7 @@
 
 #include <QList>
 #include <QMetaType>
+#include <QtQml/QJSValue>
 
 namespace qtprotobuf {
 
@@ -46,6 +47,9 @@ struct transparent {
     T _t;
     operator T&(){ return _t; }
     operator T() const { return _t; }
+    operator QJSValue&() { return QJSValue(_t); }
+    operator QJSValue() const { return QJSValue(_t); }
+    transparent& operator =(const T& t) { _t = t; return *this; }
 };
 
 using int32 = transparent<int32_t>;