瀏覽代碼

Complete refactored build procedure

- Tests now have own macro for build
- Add QtProtobufConfig.cmake to provide protobuf generation for projects
- Add common routines for protobuf cpp generation
- Cleanup cmake files
- Cleanup windows-related variables
TODO: Write readme and guidance for build procedure
Alexey Edelev 5 年之前
父節點
當前提交
506b287cdc

+ 56 - 12
CMakeLists.txt

@@ -1,10 +1,32 @@
-
 cmake_minimum_required(VERSION 3.1)
 
-project(qtprotobuf)
+project(qtprotobuf VERSION 0.1)
 
 find_package(Protobuf)
 
+if(NOT DEFINED PREFIX)
+    set(PREFIX /usr)
+endif()
+
+set(GENERATOR_TARGET qtprotobufgen)
+set(PROTOBUF_LIBRARY_TARGET qtprotobuf)
+set(GRPC_LIBRARY_TARGET qtgrpc)
+
+set(TARGET_BIN_DIR ${PREFIX}/bin)
+set(TARGET_LIB_DIR ${PREFIX}/lib)
+set(TARGET_INCLUDE_DIR ${PREFIX}/include/QtProtobuf)
+set(TARGET_CMAKE_DIR ${TARGET_LIB_DIR}/cmake/QtProtobuf)
+
+message("CMAKE_MODULE_PATH: ${CMAKE_SYSTEM_MODULE_PATH}")
+include_directories(${CMAKE_SOURCE_DIR}/src/protobuf ${CMAKE_SOURCE_DIR}/src/grpc)
+
+if(NOT Protobuf_FOUND)
+    # these names of the variable are equal to those assigned by find_package(Protobuf)
+    set(Protobuf_PROTOC_EXECUTABLE protoc)
+    set(Protobuf_PROTOC_LIBRARY protoc)
+    set(Protobuf_LIBRARIES protobuf pthread)
+endif()
+
 if(NOT DEFINED gRPC_CPP_PLUGIN_EXECUTABLE)
     find_program(gRPC_CPP_PLUGIN_EXECUTABLE grpc_cpp_plugin)
     if(gRPC_CPP_PLUGIN_EXECUTABLE STREQUAL gRPC_CPP_PLUGIN_EXECUTABLE-NOTFOUND)
@@ -14,28 +36,20 @@ endif()
 
 if (NOT DEFINED gRPC_CPP_PLUGIN_EXECUTABLE)
     # if no approprite Protobuf installed, there is no appropriate version of gRPC neither
-    # the next include provides both from sources 
+    # the next include provides both from sources
     include(cmake/gRPCBuild.cmake)
-    
-    # these names of the variable are equal to those assigned by find_package(Protobuf)
-    set(Protobuf_PROTOC_EXECUTABLE protoc)
-    set(Protobuf_PROTOC_LIBRARY libprotoc)
-    set(Protobuf_LIBRARIES libprotobuf)
 
     set(gRPC_CPP_PLUGIN_EXECUTABLE $<TARGET_FILE:grpc_cpp_plugin>)
 endif()
 
-
 # grpc target requires QT version not less than 5.11
 # earlier versions do not provide required Http2DirectAttribute: https://doc.qt.io/qt-5/whatsnew511.html
 find_package(Qt5 COMPONENTS Core Network Qml REQUIRED)
+
 if (Qt5Core_VERSION VERSION_LESS "5.11.0")
     message(FATAL_ERROR "Required Qt version is 5.11+")
 endif()
 
-set(CMAKE_CXX_STANDARD 14)
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
 if(UNIX)
     if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
       # using Clang
@@ -48,10 +62,24 @@ elseif(WIN32)
     set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wall" "-Werror")
 endif()
 
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+if(Qt5_POSITION_INDEPENDENT_CODE)
+    set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
+endif()
+
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+include(cmake/QtProtobufCommon.cmake)
+configure_file(cmake/QtProtobufConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake/QtProtobufConfig.cmake @ONLY)
+include(${CMAKE_CURRENT_BINARY_DIR}/cmake/QtProtobufConfig.cmake)
+
 add_subdirectory("src/protobuf")
 add_subdirectory("src/grpc")
 add_subdirectory("src/generator")
 
+set(QTPROTOBUF_EXECUTABLE $<TARGET_FILE:${GENERATOR_TARGET}>)
+
 if(DEFINED $ENV{MAKE_TESTS})
     set(MAKE_TESTS $ENV{MAKE_TESTS})
 elseif(NOT DEFINED MAKE_TESTS)
@@ -90,9 +118,25 @@ if(MAKE_TESTS)
         add_subdirectory(${GTest_SOURCE_DIR} ${GTest_BINARY_DIR})
     endif()
 
+
+    if(WIN32)
+        #Needs to set path to protobuf libraries
+        set(PROTOBUF_INSTALATION_PATH "")
+        set(Protobuf_PROTOC_EXECUTABLE ${PROTOBUF_INSTALATION_PATH}/bin/protoc.exe)
+        #Set  path to GTest build libraries
+        set(GTEST_BOTH_LIBRARIES "")
+
+        #Set  path to GTest include directory
+        include_directories(${GTEST_INCLUDE_PATHS} "/")
+        link_directories(${GTEST_BOTH_LIBRARIES})
+    endif()
+
     add_subdirectory("tests")
 endif()
 
 if(MAKE_EXAMPLES)
     add_subdirectory("examples/addressbook")
+    add_subdirectory("examples/addressbookserver")
 endif()
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/QtProtobufConfig.cmake DESTINATION ${TARGET_CMAKE_DIR} PERMISSIONS OWNER_WRITE GROUP_READ WORLD_READ)

+ 65 - 0
cmake/QtProtobufCommon.cmake

@@ -0,0 +1,65 @@
+function(protobuf_generate_all)
+    set(options)
+    set(oneValueArgs OUT_DIR TARGET)
+    set(multiValueArgs GENERATED_SOURCES PROTO_FILES)
+    cmake_parse_arguments(protobuf_generate_all "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+    set(GEN_TARGET "${protobuf_generate_all_TARGET}_generate")
+    add_custom_target(${GEN_TARGET})
+
+    foreach(PROTO_FILE IN LISTS protobuf_generate_all_PROTO_FILES)
+        get_filename_component(BASE_DIR ${PROTO_FILE} DIRECTORY)
+        set(PROTO_INCLUDES -I"${BASE_DIR}" ${PROTO_INCUDES})
+    endforeach()
+
+    if(NOT DEFINED protobuf_generate_all_OUT_DIR)
+        set(OUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
+    else()
+        set(OUT_DIR ${protobuf_generate_all_OUT_DIR})
+    endif()
+
+    file(MAKE_DIRECTORY ${OUT_DIR})
+
+    if(NOT DEFINED gRPC_CPP_PLUGIN_EXECUTABLE)
+        message(FATAL_ERROR "gRPC plugin is not found set full path to grpc_cpp_plugin using -DgRPC_CPP_PLUGIN_EXECUTABLE=</path/to/grpc_cpp_plugin>")
+    endif()
+
+    add_custom_command(
+        TARGET ${GEN_TARGET}
+        COMMAND ${Protobuf_PROTOC_EXECUTABLE}
+        ARGS --grpc_out="${OUT_DIR}"
+        --cpp_out="${OUT_DIR}"
+        ${PROTO_INCLUDES}
+        --plugin=protoc-gen-grpc="${gRPC_CPP_PLUGIN_EXECUTABLE}"
+        ${protobuf_generate_all_PROTO_FILES}
+        DEPENDS ${protobuf_generate_all_PROTO_FILES})
+    add_dependencies(${protobuf_generate_all_TARGET} ${GEN_TARGET})
+endfunction(protobuf_generate_all)
+
+function(add_test_target)
+    set(options)
+    set(oneValueArgs TARGET)
+    set(multiValueArgs SOURCES GENERATED_HEADERS)
+    cmake_parse_arguments(add_test_target "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+    ## test sources build
+    # policy enables automoc for generated files
+    if(${CMAKE_VERSION} VERSION_GREATER "3.10.0")
+        cmake_policy(SET CMP0071 NEW)
+    endif()
+
+    set(GENERATED_SOURCES_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated)
+
+    file(GLOB PROTO_FILES ABSOLUTE ${CMAKE_CURRENT_SOURCE_DIR}/proto/*.proto)
+
+    generate_qtprotobuf(TARGET ${add_test_target_TARGET}
+        OUT_DIR ${GENERATED_SOURCES_DIR}
+        PROTO_FILES ${PROTO_FILES}
+        GENERATED_HEADERS ${add_test_target_GENERATED_HEADERS})
+
+    add_executable(${add_test_target_TARGET} ${add_test_target_SOURCES})
+    set_target_properties(${add_test_target_TARGET} PROPERTIES POSITION_INDEPENDENT_CODE FALSE)
+    add_dependencies(${add_test_target_TARGET} ${QtProtobufGen})
+    target_link_libraries(${add_test_target_TARGET} gtest_main gtest ${QtProtobufGen} ${GRPC_LIBRARY_TARGET} ${PROTOBUF_LIBRARY_TARGET} Qt5::Core Qt5::Qml Qt5::Network)
+    target_include_directories(${add_test_target_TARGET} PRIVATE ${GENERATED_SOURCES_DIR})
+endfunction(add_test_target)

+ 72 - 0
cmake/QtProtobufConfig.cmake.in

@@ -0,0 +1,72 @@
+# TODO: replace with target_link_directories once released
+link_directories(@TARGET_LIB_DIR@)
+
+set(QtProtobuf_INCLUDE_DIRS @TARGET_INCLUDE_DIR@)
+set(QtGrpc_INCLUDE_DIRS @TARGET_INCLUDE_DIR@)
+set(QtProtobuf_LIBRARIES @PROTOBUF_LIBRARY_TARGET@)
+set(QtGrpc_LIBRARIES @GRPC_LIBRARY_TARGET@)
+
+set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+function(generate_qtprotobuf)
+    set(options)
+    set(oneValueArgs OUT_DIR TARGET)
+    set(multiValueArgs GENERATED_HEADERS PROTO_FILES)
+    cmake_parse_arguments(generate_qtprotobuf "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+    set(QtProtobufGen ${generate_qtprotobuf_TARGET}_qtprotobuf_gen PARENT_SCOPE)
+    set(QtProtobufGen ${generate_qtprotobuf_TARGET}_qtprotobuf_gen)
+
+    set(GEN_TARGET ${generate_qtprotobuf_TARGET}_qtprotobuf_generate)
+
+    add_custom_target(${GEN_TARGET})
+
+    if(NOT DEFINED QTPROTOBUF_EXECUTABLE)
+        set(QTPROTOBUF_EXECUTABLE @TARGET_BIN_DIR@/@GENERATOR_TARGET@)
+    endif()
+
+    foreach(PROTO_FILE IN LISTS generate_qtprotobuf_PROTO_FILES)
+        get_filename_component(BASE_DIR ${PROTO_FILE} DIRECTORY)
+        set(PROTO_INCLUDES -I"${BASE_DIR}" ${PROTO_INCUDES})
+    endforeach()
+
+    if(NOT DEFINED generate_qtprotobuf_OUT_DIR)
+        set(OUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
+    else()
+        set(OUT_DIR ${generate_qtprotobuf_OUT_DIR})
+    endif()
+
+    file(MAKE_DIRECTORY ${OUT_DIR})
+
+    unset(QTPROTOBUF_GENERATED_SOURCES)
+    unset(QTPROTOBUF_GENERATED_HEADERS)
+    foreach(GENERATED_HEADER IN LISTS generate_qtprotobuf_GENERATED_HEADERS)
+        get_filename_component(GENERATED_BASENAME ${GENERATED_HEADER} NAME_WE)
+
+        list(APPEND QTPROTOBUF_GENERATED_SOURCES ${OUT_DIR}/${GENERATED_BASENAME}.cpp)
+        list(APPEND QTPROTOBUF_GENERATED_HEADERS ${OUT_DIR}/${GENERATED_BASENAME}.h)
+        set_property(SOURCE ${OUT_DIR}/${GENERATED_BASENAME}.cpp PROPERTY SKIP_AUTOMOC ON)
+    endforeach()
+
+    add_custom_command(TARGET ${GEN_TARGET}
+            COMMAND ${Protobuf_PROTOC_EXECUTABLE}
+                --@GENERATOR_TARGET@_opt=out=${OUT_DIR}
+                --plugin=protoc-gen-@GENERATOR_TARGET@=${QTPROTOBUF_EXECUTABLE}
+                --@GENERATOR_TARGET@_out=${OUT_DIR}
+                ${PROTO_INCLUDES}
+                ${PROTO_FILES}
+            WORKING_DIRECTORY ${PROTO_FILES_DIR}
+            DEPENDS ${PROTO_FILES}
+            COMMENT "Generating test headers"
+    )
+
+
+    qt5_wrap_cpp(MOC_SOURCES ${QTPROTOBUF_GENERATED_HEADERS})
+    list(APPEND GENERATED_SOURCES ${MOC_SOURCES})
+
+    set_source_files_properties(${QTPROTOBUF_GENERATED_SOURCES} PROPERTIES GENERATED TRUE)
+    add_library(${QtProtobufGen} ${QTPROTOBUF_GENERATED_SOURCES} ${MOC_SOURCES})
+    add_dependencies(${QtProtobufGen} ${GEN_TARGET})
+    target_include_directories(${QtProtobufGen} PRIVATE ${Qt5Core_INCLUDE_DIRS} ${Qt5Qml_INCLUDE_DIRS} ${QtProtobuf_INCLUDE_DIRS} ${QtGrpc_INCLUDE_DIRS} ${OUT_DIR})
+endfunction()

+ 16 - 61
examples/addressbook/CMakeLists.txt

@@ -1,42 +1,13 @@
-set(addressbookgeneration "addressbook_generation")
-set(ADDRESSBOOK_OUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
-file(MAKE_DIRECTORY ${ADDRESSBOOK_OUT_DIR})
-file(GLOB PROTO_FILES ABSOLUTE ${CMAKE_CURRENT_SOURCE_DIR}/proto/addressbook.proto)
-## test sources generation
-if(WIN32)
-    #Needs to set path to protobuf libraries
-    set(PROTOBUF_INSTALATION_PATH "")
-    set(Protobuf_PROTOC_EXECUTABLE ${PROTOBUF_INSTALATION_PATH}/bin/protoc.exe)
-endif()
-
-add_custom_target(${addressbookgeneration})
-add_custom_command(TARGET ${addressbookgeneration}
-        COMMAND ${Protobuf_PROTOC_EXECUTABLE} --${PROJECT_NAME}_opt=out=${ADDRESSBOOK_OUT_DIR} --plugin=protoc-gen-${PROJECT_NAME}=$<TARGET_FILE:${PROJECT_NAME}> --qtprotobuf_out=${ADDRESSBOOK_OUT_DIR} -I=${CMAKE_CURRENT_SOURCE_DIR}/proto/ ${PROTO_FILES}
-        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/proto/
-        DEPENDS ${PROTO_FILES}
-        COMMENT "Generating test headers"
-)
-add_dependencies(${addressbookgeneration} ${PROJECT_NAME})
-
-## test sources build
-# policy enables automoc for generated files
-if(${CMAKE_VERSION} VERSION_GREATER "3.10.0")
-    cmake_policy(SET CMP0071 NEW)
-endif()
+set(TARGET addressbook)
 
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 set(CMAKE_AUTOMOC ON)
 set(CMAKE_AUTORCC ON)
 
-if(Qt5_POSITION_INDEPENDENT_CODE)
-    set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-endif()
-
 find_package(Qt5 COMPONENTS Core Quick Network REQUIRED)
 
-set(EXPECTED_GENERATED_HEADERS 
+set(GENERATED_HEADERS
     addressbookclient.h
-#    addressbookserver.h
     address.h
     contact.h
     contacts.h
@@ -45,39 +16,23 @@ set(EXPECTED_GENERATED_HEADERS
     listframe.h
     phonenumber.h
     simpleresult.h
-    globalenums.h
-)
+    globalenums.h)
 
-foreach(EXPECTED_GENERATED_HEADER ${EXPECTED_GENERATED_HEADERS})
-    get_filename_component(GENERATED_HEADER_BASENAME ${EXPECTED_GENERATED_HEADER} NAME_WE)
-
-    list(APPEND GENERATED_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/${GENERATED_HEADER_BASENAME}.cpp)
-    list(APPEND GENERATED_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/${GENERATED_HEADER_BASENAME}.h)
-    set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${GENERATED_HEADER_BASENAME}.cpp PROPERTY SKIP_AUTOMOC ON)
-endforeach(EXPECTED_GENERATED_HEADER)
-
-qt5_wrap_cpp(MOC_SOURCES ${GENERATED_HEADERS})
-list(APPEND GENERATED_SOURCES ${MOC_SOURCES})
-
-# TODO: so far the following cpp files are not generated 
-list(REMOVE_ITEM GENERATED_SOURCES
-    ${CMAKE_CURRENT_BINARY_DIR}/globalenums.cpp
-)
-set_source_files_properties(${GENERATED_SOURCES} PROPERTIES GENERATED TRUE)
+file(GLOB PROTO_FILES ABSOLUTE ${CMAKE_CURRENT_SOURCE_DIR}/proto/addressbook.proto)
 
-# TODO: but their headers should be included in sources for executable to be processed by moc
-list(APPEND GENERATED_SOURCES
-    ${CMAKE_CURRENT_BINARY_DIR}/globalenums.h
-)
-set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/globalenums.h PROPERTIES GENERATED TRUE)
+generate_qtprotobuf(TARGET ${TARGET}
+    OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated
+    PROTO_FILES ${PROTO_FILES}
+    GENERATED_HEADERS ${GENERATED_HEADERS})
 
-# FIXME: protobuf and grpc headers should be propagated from corresponding targets
-include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/src/protobuf ${CMAKE_SOURCE_DIR}/src/grpc)
+file(GLOB SOURCES main.cpp
+    addressbookengine.cpp
+    universallistmodel.cpp
+    universallistmodelbase.cpp)
 
-file(GLOB SOURCES main.cpp addressbookengine.cpp universallistmodel.cpp universallistmodelbase.cpp)
 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../addressbookserver/cert.pem DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
 
-set(addressbook "addressbook_example")
-add_executable(${addressbook} ${SOURCES} ${GENERATED_SOURCES} resources.qrc)
-target_link_libraries(${addressbook} qtgrpc qtprotobufsupport Qt5::Quick Qt5::Qml)
-add_dependencies(${addressbook} ${addressbookgeneration})
+add_executable(${TARGET} ${SOURCES} resources.qrc)
+add_dependencies(${TARGET} ${QtProtobufGen})
+target_include_directories(${TARGET} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/generated)
+target_link_libraries(${TARGET} ${GRPC_LIBRARY_TARGET} ${PROTOBUF_LIBRARY_TARGET} ${QtProtobufGen} Qt5::Quick Qt5::Qml)

+ 13 - 12
examples/addressbookserver/CMakeLists.txt

@@ -1,24 +1,25 @@
-find_package(Protobuf)
+set(TARGET addressbookserver)
 
-file(GLOB HEADERS ${TESTS_OUT_DIR}/*.h)
-file(GLOB SOURCES main.cpp)
-file(GLOB GENERATED_SOURCES addressbook.pb.cc addressbook.grpc.pb.cc)
+set(GENERATED_SOURCES
+    ${CMAKE_CURRENT_BINARY_DIR}/addressbook.pb.cc
+    ${CMAKE_CURRENT_BINARY_DIR}/addressbook.grpc.pb.cc)
+set_source_files_properties(${GENERATED_SOURCES} PROPERTIES GENERATED TRUE)
 
-set(ADDRESSBOOK_SERVER "address_servers")
+add_executable(${TARGET} main.cpp ${GENERATED_SOURCES})
+target_include_directories(${TARGET} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
 
-add_executable(${ADDRESSBOOK_SERVER} ${SOURCES} ${GENERATED_SOURCES})
+file(GLOB PROTO_FILES ABSOLUTE ${CMAKE_CURRENT_SOURCE_DIR}/../addressbook/proto/*.proto)
+protobuf_generate_all(TARGET ${TARGET}
+    GENERATED_SOURCES ${GENERATED_SOURCES}
+    PROTO_FILES ${PROTO_FILES})
 
 if(WIN32)
     include_directories(${GRPC_INCLUDE_PATHS} "/")
     set(GRPC_LIBRARIES "")
-    target_link_libraries(${ADDRESSBOOK_SERVER} "${GRPC_LIBRARIES}/grpc++.lib")
-
     #Needs to set path to protobuf libraries
-    set(PROTOBUF_INSTALATION_PATH "")
     set(PROTOBUF_LIBRARIES_PATH ${PROTOBUF_INSTALATION_PATH}/lib)
-    target_link_libraries(${ADDRESSBOOK_SERVER} "${PROTOBUF_LIBRARIES_PATH}/libprotobuf.lib")
-elseif(UNIX)
-    target_link_libraries(${ADDRESSBOOK_SERVER} protobuf grpc grpc++)
+    link_directories(${PROTOBUF_LIBRARIES_PATH} ${GRPC_LIBRARIES})
 endif()
 
+target_link_libraries(${TARGET} protobuf grpc grpc++)
 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/cert.pem ${CMAKE_CURRENT_SOURCE_DIR}/key.pem DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

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

@@ -1,170 +0,0 @@
-// 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/contacts",
-  "/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_contacts_(AddressBook_method_names[2], ::grpc::internal::RpcMethod::SERVER_STREAMING, 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::ClientReader< ::qtprotobuf::examples::Contacts>* AddressBook::Stub::contactsRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request) {
-  return ::grpc::internal::ClientReaderFactory< ::qtprotobuf::examples::Contacts>::Create(channel_.get(), rpcmethod_contacts_, context, request);
-}
-
-::grpc::ClientAsyncReader< ::qtprotobuf::examples::Contacts>* AddressBook::Stub::AsynccontactsRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq, void* tag) {
-  return ::grpc::internal::ClientAsyncReaderFactory< ::qtprotobuf::examples::Contacts>::Create(channel_.get(), cq, rpcmethod_contacts_, context, request, true, tag);
-}
-
-::grpc::ClientAsyncReader< ::qtprotobuf::examples::Contacts>* AddressBook::Stub::PrepareAsynccontactsRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq) {
-  return ::grpc::internal::ClientAsyncReaderFactory< ::qtprotobuf::examples::Contacts>::Create(channel_.get(), cq, rpcmethod_contacts_, context, request, false, nullptr);
-}
-
-::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::SERVER_STREAMING,
-      new ::grpc::internal::ServerStreamingHandler< AddressBook::Service, ::qtprotobuf::examples::ListFrame, ::qtprotobuf::examples::Contacts>(
-          std::mem_fn(&AddressBook::Service::contacts), 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::contacts(::grpc::ServerContext* context, const ::qtprotobuf::examples::ListFrame* request, ::grpc::ServerWriter< ::qtprotobuf::examples::Contacts>* writer) {
-  (void) context;
-  (void) request;
-  (void) writer;
-  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
-

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

@@ -1,580 +0,0 @@
-// 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));
-    }
-    std::unique_ptr< ::grpc::ClientReaderInterface< ::qtprotobuf::examples::Contacts>> contacts(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request) {
-      return std::unique_ptr< ::grpc::ClientReaderInterface< ::qtprotobuf::examples::Contacts>>(contactsRaw(context, request));
-    }
-    std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::qtprotobuf::examples::Contacts>> Asynccontacts(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq, void* tag) {
-      return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::qtprotobuf::examples::Contacts>>(AsynccontactsRaw(context, request, cq, tag));
-    }
-    std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::qtprotobuf::examples::Contacts>> PrepareAsynccontacts(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq) {
-      return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::qtprotobuf::examples::Contacts>>(PrepareAsynccontactsRaw(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::ClientReaderInterface< ::qtprotobuf::examples::Contacts>* contactsRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request) = 0;
-    virtual ::grpc::ClientAsyncReaderInterface< ::qtprotobuf::examples::Contacts>* AsynccontactsRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
-    virtual ::grpc::ClientAsyncReaderInterface< ::qtprotobuf::examples::Contacts>* PrepareAsynccontactsRaw(::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));
-    }
-    std::unique_ptr< ::grpc::ClientReader< ::qtprotobuf::examples::Contacts>> contacts(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request) {
-      return std::unique_ptr< ::grpc::ClientReader< ::qtprotobuf::examples::Contacts>>(contactsRaw(context, request));
-    }
-    std::unique_ptr< ::grpc::ClientAsyncReader< ::qtprotobuf::examples::Contacts>> Asynccontacts(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq, void* tag) {
-      return std::unique_ptr< ::grpc::ClientAsyncReader< ::qtprotobuf::examples::Contacts>>(AsynccontactsRaw(context, request, cq, tag));
-    }
-    std::unique_ptr< ::grpc::ClientAsyncReader< ::qtprotobuf::examples::Contacts>> PrepareAsynccontacts(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq) {
-      return std::unique_ptr< ::grpc::ClientAsyncReader< ::qtprotobuf::examples::Contacts>>(PrepareAsynccontactsRaw(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::ClientReader< ::qtprotobuf::examples::Contacts>* contactsRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request) override;
-    ::grpc::ClientAsyncReader< ::qtprotobuf::examples::Contacts>* AsynccontactsRaw(::grpc::ClientContext* context, const ::qtprotobuf::examples::ListFrame& request, ::grpc::CompletionQueue* cq, void* tag) override;
-    ::grpc::ClientAsyncReader< ::qtprotobuf::examples::Contacts>* PrepareAsynccontactsRaw(::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_contacts_;
-    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 contacts(::grpc::ServerContext* context, const ::qtprotobuf::examples::ListFrame* request, ::grpc::ServerWriter< ::qtprotobuf::examples::Contacts>* writer);
-    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_contacts : public BaseClass {
-   private:
-    void BaseClassMustBeDerivedFromService(const Service *service) {}
-   public:
-    WithAsyncMethod_contacts() {
-      ::grpc::Service::MarkMethodAsync(2);
-    }
-    ~WithAsyncMethod_contacts() override {
-      BaseClassMustBeDerivedFromService(this);
-    }
-    // disable synchronous version of this method
-    ::grpc::Status contacts(::grpc::ServerContext* context, const ::qtprotobuf::examples::ListFrame* request, ::grpc::ServerWriter< ::qtprotobuf::examples::Contacts>* writer) override {
-      abort();
-      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
-    }
-    void Requestcontacts(::grpc::ServerContext* context, ::qtprotobuf::examples::ListFrame* request, ::grpc::ServerAsyncWriter< ::qtprotobuf::examples::Contacts>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
-      ::grpc::Service::RequestAsyncServerStreaming(2, context, request, writer, 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_contacts<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_contacts : public BaseClass {
-   private:
-    void BaseClassMustBeDerivedFromService(const Service *service) {}
-   public:
-    WithGenericMethod_contacts() {
-      ::grpc::Service::MarkMethodGeneric(2);
-    }
-    ~WithGenericMethod_contacts() override {
-      BaseClassMustBeDerivedFromService(this);
-    }
-    // disable synchronous version of this method
-    ::grpc::Status contacts(::grpc::ServerContext* context, const ::qtprotobuf::examples::ListFrame* request, ::grpc::ServerWriter< ::qtprotobuf::examples::Contacts>* writer) 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_contacts : public BaseClass {
-   private:
-    void BaseClassMustBeDerivedFromService(const Service *service) {}
-   public:
-    WithRawMethod_contacts() {
-      ::grpc::Service::MarkMethodRaw(2);
-    }
-    ~WithRawMethod_contacts() override {
-      BaseClassMustBeDerivedFromService(this);
-    }
-    // disable synchronous version of this method
-    ::grpc::Status contacts(::grpc::ServerContext* context, const ::qtprotobuf::examples::ListFrame* request, ::grpc::ServerWriter< ::qtprotobuf::examples::Contacts>* writer) override {
-      abort();
-      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
-    }
-    void Requestcontacts(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
-      ::grpc::Service::RequestAsyncServerStreaming(2, context, request, writer, 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_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_makeCall<WithStreamedUnaryMethod_navigateTo<Service > > > > StreamedUnaryService;
-  template <class BaseClass>
-  class WithSplitStreamingMethod_contacts : public BaseClass {
-   private:
-    void BaseClassMustBeDerivedFromService(const Service *service) {}
-   public:
-    WithSplitStreamingMethod_contacts() {
-      ::grpc::Service::MarkMethodStreamed(2,
-        new ::grpc::internal::SplitServerStreamingHandler< ::qtprotobuf::examples::ListFrame, ::qtprotobuf::examples::Contacts>(std::bind(&WithSplitStreamingMethod_contacts<BaseClass>::Streamedcontacts, this, std::placeholders::_1, std::placeholders::_2)));
-    }
-    ~WithSplitStreamingMethod_contacts() override {
-      BaseClassMustBeDerivedFromService(this);
-    }
-    // disable regular version of this method
-    ::grpc::Status contacts(::grpc::ServerContext* context, const ::qtprotobuf::examples::ListFrame* request, ::grpc::ServerWriter< ::qtprotobuf::examples::Contacts>* writer) override {
-      abort();
-      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
-    }
-    // replace default version of method with split streamed
-    virtual ::grpc::Status Streamedcontacts(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::qtprotobuf::examples::ListFrame,::qtprotobuf::examples::Contacts>* server_split_streamer) = 0;
-  };
-  typedef WithSplitStreamingMethod_contacts<Service > SplitStreamedService;
-  typedef WithStreamedUnaryMethod_addContact<WithStreamedUnaryMethod_removeContact<WithSplitStreamingMethod_contacts<WithStreamedUnaryMethod_makeCall<WithStreamedUnaryMethod_navigateTo<Service > > > > > StreamedService;
-};
-
-}  // namespace examples
-}  // namespace qtprotobuf
-
-
-#endif  // GRPC_addressbook_2eproto__INCLUDED

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

@@ -1,2599 +0,0 @@
-// 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_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 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() {
-  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_PhoneNumber.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.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[7];
-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_),
-  ~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, -1, sizeof(::qtprotobuf::examples::Contact)},
-  { 35, -1, sizeof(::qtprotobuf::examples::Contacts)},
-  { 41, -1, sizeof(::qtprotobuf::examples::SimpleResult)},
-  { 47, -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_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, 7);
-}
-
-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 \001(\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\"\202\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\0220\n\006phones\030\004 \003(\013"
-      "2 .qtprotobuf.examples.PhoneNumber\022-\n\007ad"
-      "dress\030\005 \001(\0132\034.qtprotobuf.examples.Addres"
-      "s\022%\n\003job\030\006 \001(\0132\030.qtprotobuf.examples.Job"
-      "\"6\n\tPhoneType\022\010\n\004Home\020\000\022\010\n\004Work\020\001\022\n\n\006Mob"
-      "ile\020\002\022\t\n\005Other\020\003\"6\n\010Contacts\022*\n\004list\030\001 \003"
-      "(\0132\034.qtprotobuf.examples.Contact\"\032\n\014Simp"
-      "leResult\022\n\n\002ok\030\001 \001(\010\"\'\n\tListFrame\022\r\n\005sta"
-      "rt\030\001 \001(\021\022\013\n\003end\030\002 \001(\0212\231\003\n\013AddressBook\022K\n"
-      "\naddContact\022\034.qtprotobuf.examples.Contac"
-      "t\032\035.qtprotobuf.examples.Contacts\"\000\022N\n\rre"
-      "moveContact\022\034.qtprotobuf.examples.Contac"
-      "t\032\035.qtprotobuf.examples.Contacts\"\000\022M\n\010co"
-      "ntacts\022\036.qtprotobuf.examples.ListFrame\032\035"
-      ".qtprotobuf.examples.Contacts\"\0000\001\022M\n\010mak"
-      "eCall\022\034.qtprotobuf.examples.Contact\032!.qt"
-      "protobuf.examples.SimpleResult\"\000\022O\n\nnavi"
-      "gateTo\022\034.qtprotobuf.examples.Address\032!.q"
-      "tprotobuf.examples.SimpleResult\"\000b\006proto"
-      "3"
-  };
-  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 1081);
-  ::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) {
-  _internal_metadata_.MergeFrom(from._internal_metadata_);
-  ::memcpy(&number_, &from.number_,
-    static_cast<size_t>(reinterpret_cast<char*>(&countrycode_) -
-    reinterpret_cast<char*>(&number_)) + sizeof(countrycode_));
-  // @@protoc_insertion_point(copy_constructor:qtprotobuf.examples.PhoneNumber)
-}
-
-void PhoneNumber::SharedCtor() {
-  ::memset(&number_, 0, static_cast<size_t>(
-      reinterpret_cast<char*>(&countrycode_) -
-      reinterpret_cast<char*>(&number_)) + sizeof(countrycode_));
-}
-
-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;
-
-  ::memset(&number_, 0, static_cast<size_t>(
-      reinterpret_cast<char*>(&countrycode_) -
-      reinterpret_cast<char*>(&number_)) + sizeof(countrycode_));
-  _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;
-      }
-
-      // uint64 number = 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::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
-                 input, &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);
-  }
-
-  // uint64 number = 2;
-  if (this->number() != 0) {
-    ::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->number(), 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);
-  }
-
-  // uint64 number = 2;
-  if (this->number() != 0) {
-    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(2, 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()));
-  }
-  // uint64 number = 2;
-  if (this->number() != 0) {
-    total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::UInt64Size(
-        this->number());
-  }
-
-  // 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;
-
-  if (from.number() != 0) {
-    set_number(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;
-  swap(number_, 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];
-}
-
-
-// ===================================================================
-
-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),
-      phones_(from.phones_) {
-  _internal_metadata_.MergeFrom(from._internal_metadata_);
-  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;
-      }
-
-      // repeated .qtprotobuf.examples.PhoneNumber phones = 4;
-      case 4: {
-        if (static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
-          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
-                input, add_phones()));
-        } 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);
-  }
-
-  // repeated .qtprotobuf.examples.PhoneNumber phones = 4;
-  for (unsigned int i = 0,
-      n = static_cast<unsigned int>(this->phones_size()); i < n; i++) {
-    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
-      4,
-      this->phones(static_cast<int>(i)),
-      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);
-  }
-
-  // repeated .qtprotobuf.examples.PhoneNumber phones = 4;
-  for (unsigned int i = 0,
-      n = static_cast<unsigned int>(this->phones_size()); i < n; i++) {
-    target = ::google::protobuf::internal::WireFormatLite::
-      InternalWriteMessageToArray(
-        4, this->phones(static_cast<int>(i)), 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()));
-  }
-  // repeated .qtprotobuf.examples.PhoneNumber phones = 4;
-  {
-    unsigned int count = static_cast<unsigned int>(this->phones_size());
-    total_size += 1UL * count;
-    for (unsigned int i = 0; i < count; i++) {
-      total_size +=
-        ::google::protobuf::internal::WireFormatLite::MessageSize(
-          this->phones(static_cast<int>(i)));
-    }
-  }
-
-  // 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;
-  CastToBase(&phones_)->InternalSwap(CastToBase(&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* 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)

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

@@ -1,1793 +0,0 @@
-// 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/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[7];
-  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 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::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 -------------------------------------------------------
-
-  // uint64 number = 2;
-  void clear_number();
-  static const int kNumberFieldNumber = 2;
-  ::google::protobuf::uint64 number() const;
-  void set_number(::google::protobuf::uint64 value);
-
-  // 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::uint64 number_;
-  ::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 : 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 =
-    3;
-
-  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 -------------------------------------------------------
-
-  // repeated .qtprotobuf.examples.PhoneNumber phones = 4;
-  int phones_size() const;
-  void clear_phones();
-  static const int kPhonesFieldNumber = 4;
-  ::qtprotobuf::examples::PhoneNumber* mutable_phones(int index);
-  ::google::protobuf::RepeatedPtrField< ::qtprotobuf::examples::PhoneNumber >*
-      mutable_phones();
-  const ::qtprotobuf::examples::PhoneNumber& phones(int index) const;
-  ::qtprotobuf::examples::PhoneNumber* add_phones();
-  const ::google::protobuf::RepeatedPtrField< ::qtprotobuf::examples::PhoneNumber >&
-      phones() const;
-
-  // 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::RepeatedPtrField< ::qtprotobuf::examples::PhoneNumber > 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 =
-    4;
-
-  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 =
-    5;
-
-  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 =
-    6;
-
-  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)
-}
-
-// uint64 number = 2;
-inline void PhoneNumber::clear_number() {
-  number_ = GOOGLE_ULONGLONG(0);
-}
-inline ::google::protobuf::uint64 PhoneNumber::number() const {
-  // @@protoc_insertion_point(field_get:qtprotobuf.examples.PhoneNumber.number)
-  return number_;
-}
-inline void PhoneNumber::set_number(::google::protobuf::uint64 value) {
-  
-  number_ = value;
-  // @@protoc_insertion_point(field_set:qtprotobuf.examples.PhoneNumber.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)
-}
-
-// repeated .qtprotobuf.examples.PhoneNumber phones = 4;
-inline int Contact::phones_size() const {
-  return phones_.size();
-}
-inline void Contact::clear_phones() {
-  phones_.Clear();
-}
-inline ::qtprotobuf::examples::PhoneNumber* Contact::mutable_phones(int index) {
-  // @@protoc_insertion_point(field_mutable:qtprotobuf.examples.Contact.phones)
-  return phones_.Mutable(index);
-}
-inline ::google::protobuf::RepeatedPtrField< ::qtprotobuf::examples::PhoneNumber >*
-Contact::mutable_phones() {
-  // @@protoc_insertion_point(field_mutable_list:qtprotobuf.examples.Contact.phones)
-  return &phones_;
-}
-inline const ::qtprotobuf::examples::PhoneNumber& Contact::phones(int index) const {
-  // @@protoc_insertion_point(field_get:qtprotobuf.examples.Contact.phones)
-  return phones_.Get(index);
-}
-inline ::qtprotobuf::examples::PhoneNumber* Contact::add_phones() {
-  // @@protoc_insertion_point(field_add:qtprotobuf.examples.Contact.phones)
-  return phones_.Add();
-}
-inline const ::google::protobuf::RepeatedPtrField< ::qtprotobuf::examples::PhoneNumber >&
-Contact::phones() const {
-  // @@protoc_insertion_point(field_list:qtprotobuf.examples.Contact.phones)
-  return phones_;
-}
-
-// .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

+ 2 - 2
examples/addressbookserver/main.cpp

@@ -40,7 +40,7 @@ public:
     ~AddressBookService() {}
 
     void updateContacts() {
-        for(int i = 0; i < (m_clients.size() - 1); i++) {
+        for(unsigned int i = 0; i < (m_clients.size() - 1); i++) {
             m_clients[i]->Write(m_contacts, nullptr);
         }
     }
@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
     std::cout << "Server listening on " << server_address << std::endl;
     ContactsHandler *last = new ContactsHandler(&service, cq.get());
     while (true) {
-        int *tag;
+        unsigned int *tag;
         bool ok;
         cq->Next((void**)&tag, &ok);
         if (tag == nullptr) {

+ 25 - 13
src/generator/CMakeLists.txt

@@ -1,5 +1,6 @@
-add_executable(${PROJECT_NAME}
-    main.cpp
+set(TARGET ${GENERATOR_TARGET})
+
+file(GLOB SOURCES main.cpp
     generator.cpp
     classgeneratorbase.cpp
     servergenerator.cpp
@@ -11,20 +12,31 @@ add_executable(${PROJECT_NAME}
     clientgenerator.cpp
     classsourcegeneratorbase.cpp
     protobufsourcegenerator.cpp
-    clientsourcegenerator.cpp
-)
+    clientsourcegenerator.cpp)
+
+file(GLOB HEADERS classgeneratorbase.h
+    classsourcegeneratorbase.h
+    clientgenerator.h
+    clientsourcegenerator.h
+    generator.h
+    globalenumsgenerator.h
+    globalenumssourcegenerator.h
+    protobufclassgenerator.h
+    protobufsourcegenerator.h
+    servergenerator.h
+    servicegeneratorbase.h
+    templates.h
+    utils.h)
+
+add_executable(${TARGET} ${SOURCES})
 
 if(WIN32)
-    #Needs to set path to protobuf libraries
-    set(PROTOBUF_INSTALATION_PATH "")
     include_directories(${PROTOBUF_INSTALATION_PATH}/include)
-
     set(PROTOBUF_LIBRARIES_PATH ${PROTOBUF_INSTALATION_PATH}/lib)
-    target_link_libraries(${PROJECT_NAME} "${PROTOBUF_LIBRARIES_PATH}/libprotobuf.lib")
-    target_link_libraries(${PROJECT_NAME} "${PROTOBUF_LIBRARIES_PATH}/libprotoc.lib")
-elseif(UNIX)
-    target_link_libraries(${PROJECT_NAME} ${Protobuf_LIBRARIES} ${Protobuf_PROTOC_LIBRARY})
+    link_directories(${PROTOBUF_LIBRARIES_PATH} ${GRPC_LIBRARIES})
 endif()
 
-install(TARGETS ${PROJECT_NAME}
-    RUNTIME DESTINATION bin)
+target_link_libraries(${TARGET} ${Protobuf_LIBRARIES} ${Protobuf_PROTOC_LIBRARY})
+
+install(TARGETS ${TARGET}
+    RUNTIME DESTINATION ${TARGET_BIN_DIR})

+ 16 - 18
src/grpc/CMakeLists.txt

@@ -1,14 +1,9 @@
-# FIXME: replace with 'target_include_directories'
-include_directories(${CMAKE_SOURCE_DIR}/src/protobuf)
+set(TARGET ${GRPC_LIBRARY_TARGET})
+set(SHARED_TARGET ${TARGET}-shared)
 
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
 set(CMAKE_AUTOMOC ON)
 set(CMAKE_AUTORCC ON)
 
-if(Qt5_POSITION_INDEPENDENT_CODE)
-  set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-endif()
-
 file(GLOB SOURCES asyncreply.cpp
     abstractchannel.cpp
     http2channel.cpp
@@ -25,15 +20,18 @@ file(GLOB HEADERS asyncreply.h
     sslcredentials.h
     insecurecredentials.h)
 
-set(GRPC_SUPPORT_LIBRARY_TARGET qtgrpc)
-add_library(${GRPC_SUPPORT_LIBRARY_TARGET} ${SOURCES})
-set_target_properties(${GRPC_SUPPORT_LIBRARY_TARGET} PROPERTIES PUBLIC_HEADER "${HEADERS}")
-target_link_libraries(${GRPC_SUPPORT_LIBRARY_TARGET} PRIVATE qtprotobufsupport PUBLIC Qt5::Network Qt5::Core)
-target_include_directories(${GRPC_SUPPORT_LIBRARY_TARGET}
-    PUBLIC
-    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
-)
+set(INCLUDE_DIRS PRIVATE ${CMAKE_SOURCE_DIR}/src/protobuf PUBLIC ${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS})
+
+add_library(${SHARED_TARGET} SHARED ${SOURCES})
+set_target_properties(${SHARED_TARGET} PROPERTIES VERSION ${PROJECT_VERSION} PUBLIC_HEADER "${HEADERS}" OUTPUT_NAME ${TARGET})
+target_include_directories(${SHARED_TARGET} ${INCLUDE_DIRS})
+target_link_libraries(${SHARED_TARGET} PRIVATE ${PROTOBUF_LIBRARY_TARGET} PUBLIC Qt5::Network Qt5::Core)
+add_dependencies(${SHARED_TARGET} ${PROTOBUF_LIBRARY_TARGET})
+
+add_library(${TARGET} ${SOURCES})
+target_include_directories(${TARGET} ${INCLUDE_DIRS})
 
-install(TARGETS ${GRPC_SUPPORT_LIBRARY_TARGET}
-    ARCHIVE DESTINATION lib
-    PUBLIC_HEADER DESTINATION include)
+install(TARGETS ${TARGET} ${SHARED_TARGET}
+    ARCHIVE DESTINATION ${TARGET_LIB_DIR}
+    PUBLIC_HEADER DESTINATION ${TARGET_INCLUDE_DIR}
+    LIBRARY DESTINATION ${TARGET_LIB_DIR})

+ 21 - 21
src/protobuf/CMakeLists.txt

@@ -1,13 +1,9 @@
+set(TARGET ${PROTOBUF_LIBRARY_TARGET})
+set(SHARED_TARGET ${TARGET}-shared)
 
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
 set(CMAKE_AUTOMOC ON)
 set(CMAKE_AUTORCC ON)
 
-if(Qt5_POSITION_INDEPENDENT_CODE)
-  set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-endif()
-
 find_package(Qt5 COMPONENTS Core Qml REQUIRED)
 
 file(GLOB SOURCES
@@ -19,18 +15,22 @@ file(GLOB HEADERS
     qprotobufobject_p.h
     qprotobufobject.h
     qtprotobuftypes.h
-    qtprotobuf.h)
-
-set(SUPPORT_LIBRARY_TARGET qtprotobufsupport)
-add_library(${SUPPORT_LIBRARY_TARGET} ${SOURCES})
-set_target_properties(${SUPPORT_LIBRARY_TARGET} PROPERTIES PUBLIC_HEADER "${HEADERS}")
-target_link_libraries(${SUPPORT_LIBRARY_TARGET} PUBLIC Qt5::Core Qt5::Qml)
-# FIXME: in order to make separation between private and public headers, they should reside in different directories
-target_include_directories(${SUPPORT_LIBRARY_TARGET}
-    PUBLIC
-    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
-)
-
-install(TARGETS ${SUPPORT_LIBRARY_TARGET}
-    ARCHIVE DESTINATION lib
-    PUBLIC_HEADER DESTINATION include)
+    qtprotobuf.h
+    selfcheckiterator.h
+    qtprotobuflogging.h)
+
+set(INCLUDE_DIRS PUBLIC ${Qt5Core_INCLUDE_DIRS} ${Qt5Qml_INCLUDE_DIRS})
+
+add_library(${SHARED_TARGET} SHARED ${SOURCES})
+set_target_properties(${SHARED_TARGET} PROPERTIES VERSION ${PROJECT_VERSION} PUBLIC_HEADER "${HEADERS}" OUTPUT_NAME ${TARGET})
+target_include_directories(${SHARED_TARGET} ${INCLUDE_DIRS})
+target_link_libraries(${SHARED_TARGET} PUBLIC Qt5::Core Qt5::Qml)
+add_dependencies(${SHARED_TARGET} ${PROTOBUF_LIBRARY_TARGET})
+
+add_library(${TARGET} ${SOURCES})
+target_include_directories(${TARGET} ${INCLUDE_DIRS})
+
+install(TARGETS ${TARGET} ${SHARED_TARGET}
+    ARCHIVE DESTINATION ${TARGET_LIB_DIR}
+    PUBLIC_HEADER DESTINATION ${TARGET_INCLUDE_DIR}
+    LIBRARY DESTINATION ${TARGET_LIB_DIR})

+ 2 - 2
tests/CMakeLists.txt

@@ -1,2 +1,2 @@
-add_subdirectory("test_protobuf")
-add_subdirectory("test_grpc")
+add_subdirectory(test_protobuf)
+add_subdirectory(test_grpc)

+ 8 - 71
tests/test_grpc/CMakeLists.txt

@@ -1,80 +1,17 @@
-set(PROTO_FILES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/proto/)
-set(GENERATED_SOURCES_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated)
+set(TARGET qtgrpc_test)
 
-file(MAKE_DIRECTORY ${GENERATED_SOURCES_DIR})
-file(GLOB PROTO_FILES ABSOLUTE ${CMAKE_CURRENT_SOURCE_DIR}/proto/*.proto)
-## test sources generation
-if(WIN32)
-    #Needs to set path to protobuf libraries
-    set(PROTOBUF_INSTALATION_PATH "")
-    set(Protobuf_PROTOC_EXECUTABLE ${PROTOBUF_INSTALATION_PATH}/bin/protoc.exe)
-endif()
-
-set(test_sources_generation "test_grpc_sources_generation")
-add_custom_target(${test_sources_generation})
-add_custom_command(TARGET ${test_sources_generation}
-        COMMAND ${Protobuf_PROTOC_EXECUTABLE} --${PROJECT_NAME}_opt=out=${GENERATED_SOURCES_DIR} --plugin=protoc-gen-${PROJECT_NAME}=$<TARGET_FILE:${PROJECT_NAME}> --qtprotobuf_out=${GENERATED_SOURCES_DIR} -I=${PROTO_FILES_DIR} ${PROTO_FILES}
-        WORKING_DIRECTORY ${PROTO_FILES_DIR}
-        DEPENDS ${PROTO_FILES}
-        COMMENT "Generating test headers"
-)
-add_dependencies(${test_sources_generation} ${PROJECT_NAME})
-
-set(EXPECTED_GENERATED_HEADERS
+set(GENERATED_HEADERS
     simplestringmessage.h
     testserviceclient.h
-    testserviceserver.h
-)
-
-foreach(EXPECTED_GENERATED_HEADER ${EXPECTED_GENERATED_HEADERS})
-    get_filename_component(GENERATED_HEADER_BASENAME ${EXPECTED_GENERATED_HEADER} NAME_WE)
-
-    list(APPEND GENERATED_SOURCES ${GENERATED_SOURCES_DIR}/${GENERATED_HEADER_BASENAME}.cpp)
-    list(APPEND GENERATED_HEADERS ${GENERATED_SOURCES_DIR}/${GENERATED_HEADER_BASENAME}.h)
-
-    set_property(SOURCE ${GENERATED_SOURCES_DIR}/${GENERATED_HEADER_BASENAME}.cpp PROPERTY SKIP_AUTOMOC ON)
-endforeach(EXPECTED_GENERATED_HEADER)
-
-qt5_wrap_cpp(MOC_SOURCES ${GENERATED_HEADERS})
-list(APPEND GENERATED_SOURCES ${MOC_SOURCES})
-
-# TODO: so far the following cpp files are not generated 
-list(REMOVE_ITEM GENERATED_SOURCES
-    ${GENERATED_SOURCES_DIR}/testserviceserver.cpp
+#    testserviceserver.h
 )
-set_source_files_properties(${GENERATED_SOURCES} PROPERTIES GENERATED TRUE)
-
-# TODO: but their headers should be included in sources for executable to be processed by moc
-list(APPEND GENERATED_SOURCES
-    ${GENERATED_SOURCES_DIR}/globalenums.h
-    ${GENERATED_SOURCES_DIR}/testserviceserver.h
-)
-
-set_source_files_properties(${GENERATED_SOURCES_DIR}/globalenums.h PROPERTIES GENERATED TRUE)
-set_source_files_properties(${GENERATED_SOURCES_DIR}/testserviceserver.h PROPERTIES GENERATED TRUE)
-
-if(WIN32)
-    #Set  path to GTest build libraries
-    set(GTEST_BOTH_LIBRARIES "")
-
-    #Set  path to GTest include directory
-    include_directories(${GTEST_INCLUDE_PATHS} "/")
-endif()
 
 file(GLOB SOURCES main.cpp
-    servertest.cpp
+#    servertest.cpp
     clienttest.cpp)
-
-set(testtarget "qtgrpc_test")
-add_executable(${testtarget} ${SOURCES} ${GENERATED_SOURCES})
-
-if(WIN32)
-    target_link_libraries(${testtarget} qtgrpc qtprotobufsupport "${GTEST_BOTH_LIBRARIES}/gtest_main.lib" "${GTEST_BOTH_LIBRARIES}/gtest.lib" Qt5::Core Qt5::Qml Qt5::Network)
-elseif(UNIX)
-    target_link_libraries(${testtarget} gtest_main gtest qtgrpc qtprotobufsupport)
-endif()
-
-target_include_directories(${testtarget} PRIVATE ${GENERATED_SOURCES_DIR})
-add_dependencies(${testtarget} ${test_sources_generation})
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+add_test_target(TARGET ${TARGET}
+    GENERATED_HEADERS ${GENERATED_HEADERS}
+    SOURCES ${SOURCES})
 
 add_subdirectory(echoserver)

+ 12 - 22
tests/test_grpc/echoserver/CMakeLists.txt

@@ -1,27 +1,17 @@
-if(NOT DEFINED gRPC_CPP_PLUGIN_EXECUTABLE)
-    message(FATAL_ERROR "gRPC plugin is not found set full path to grpc_cpp_plugin using -DgRPC_CPP_PLUGIN_EXECUTABLE=</path/to/grpc_cpp_plugin>")
-endif()
+set(TARGET echoserver)
 
-file(GLOB PROTO_FILES ABSOLUTE ${CMAKE_CURRENT_SOURCE_DIR}/../proto/*.proto)
-add_custom_target(echoserver_src_generation)
-add_custom_command(
-    TARGET echoserver_src_generation
-    COMMAND ${Protobuf_PROTOC_EXECUTABLE}
-    ARGS --grpc_out "${CMAKE_CURRENT_BINARY_DIR}"
-    --cpp_out "${CMAKE_CURRENT_BINARY_DIR}"
-    -I="${CMAKE_CURRENT_SOURCE_DIR}/../proto/"
-    --plugin=protoc-gen-grpc="${gRPC_CPP_PLUGIN_EXECUTABLE}"
-    ${PROTO_FILES}
-    DEPENDS ${PROTO_FILES})
 set(GENERATED_SOURCES
-    "${CMAKE_CURRENT_BINARY_DIR}/simpletest.grpc.pb.cc"
-    "${CMAKE_CURRENT_BINARY_DIR}/simpletest.pb.cc"
-    "${CMAKE_CURRENT_BINARY_DIR}/testservice.grpc.pb.cc"
-    "${CMAKE_CURRENT_BINARY_DIR}/testservice.pb.cc")
+    ${CMAKE_CURRENT_BINARY_DIR}/simpletest.grpc.pb.cc
+    ${CMAKE_CURRENT_BINARY_DIR}/simpletest.pb.cc
+    ${CMAKE_CURRENT_BINARY_DIR}/testservice.grpc.pb.cc
+    ${CMAKE_CURRENT_BINARY_DIR}/testservice.pb.cc)
 set_source_files_properties(${GENERATED_SOURCES} PROPERTIES GENERATED TRUE)
 
-add_executable(echoserver main.cpp ${GENERATED_SOURCES})
-target_link_libraries(echoserver grpc++ ${Protobuf_LIBRARIES})
-target_include_directories(echoserver PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
+add_executable(${TARGET} main.cpp ${GENERATED_SOURCES})
+target_link_libraries(${TARGET} grpc++ ${Protobuf_LIBRARIES})
+target_include_directories(${TARGET} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
 
-add_dependencies(echoserver echoserver_src_generation)
+file(GLOB PROTO_FILES ABSOLUTE ${CMAKE_CURRENT_SOURCE_DIR}/../proto/*.proto)
+protobuf_generate_all(TARGET ${TARGET}
+    GENERATED_SOURCES ${GENERATED_SOURCES}
+    PROTO_FILES ${PROTO_FILES})

+ 6 - 76
tests/test_protobuf/CMakeLists.txt

@@ -1,40 +1,6 @@
-set(PROTO_FILES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/proto/)
-set(GENERATED_SOURCES_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated)
+set(TARGET qtprotobuf_test)
 
-file(MAKE_DIRECTORY ${GENERATED_SOURCES_DIR})
-file(GLOB PROTO_FILES ABSOLUTE ${CMAKE_CURRENT_SOURCE_DIR}/proto/*.proto)
-## test sources generation
-if(WIN32)
-    #Needs to set path to protobuf libraries
-    set(PROTOBUF_INSTALATION_PATH "")
-    set(Protobuf_PROTOC_EXECUTABLE ${PROTOBUF_INSTALATION_PATH}/bin/protoc.exe)
-endif()
-
-set(test_sources_generation "test_generation")
-add_custom_target(${test_sources_generation})
-add_custom_command(TARGET ${test_sources_generation}
-        COMMAND ${Protobuf_PROTOC_EXECUTABLE} --${PROJECT_NAME}_opt=out=${GENERATED_SOURCES_DIR} --plugin=protoc-gen-${PROJECT_NAME}=$<TARGET_FILE:${PROJECT_NAME}> --qtprotobuf_out=${GENERATED_SOURCES_DIR} -I=${PROTO_FILES_DIR} ${PROTO_FILES}
-        WORKING_DIRECTORY ${PROTO_FILES_DIR}
-        DEPENDS ${PROTO_FILES}
-        COMMENT "Generating test headers"
-)
-add_dependencies(${test_sources_generation} ${PROJECT_NAME})
-
-## test sources build
-# policy enables automoc for generated files
-if(${CMAKE_VERSION} VERSION_GREATER "3.10.0")
-    cmake_policy(SET CMP0071 NEW)
-endif()
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-
-if(Qt5_POSITION_INDEPENDENT_CODE)
-    set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-endif()
-
-set(EXPECTED_GENERATED_HEADERS
+set(GENERATED_HEADERS
     complexmessage.h
     externalcomplexmessage.h
     globalenums.h
@@ -165,49 +131,13 @@ set(EXPECTED_GENERATED_HEADERS
     stepchildenummessage.h
 )
 
-foreach(EXPECTED_GENERATED_HEADER ${EXPECTED_GENERATED_HEADERS})
-    get_filename_component(GENERATED_HEADER_BASENAME ${EXPECTED_GENERATED_HEADER} NAME_WE)
-
-    list(APPEND GENERATED_SOURCES ${GENERATED_SOURCES_DIR}/${GENERATED_HEADER_BASENAME}.cpp)
-    list(APPEND GENERATED_HEADERS ${GENERATED_SOURCES_DIR}/${GENERATED_HEADER_BASENAME}.h)
-
-    set_property(SOURCE ${GENERATED_SOURCES_DIR}/${GENERATED_HEADER_BASENAME}.cpp PROPERTY SKIP_AUTOMOC ON)
-endforeach(EXPECTED_GENERATED_HEADER)
-
-qt5_wrap_cpp(MOC_SOURCES ${GENERATED_HEADERS})
-list(APPEND GENERATED_SOURCES ${MOC_SOURCES})
-
-set_source_files_properties(${GENERATED_SOURCES} PROPERTIES GENERATED TRUE)
-
-# TODO: but their headers should be included in sources for executable to be processed by moc
-list(APPEND GENERATED_SOURCES
-    ${GENERATED_SOURCES_DIR}/globalenums.h
-)
-
-set_source_files_properties(${GENERATED_SOURCES_DIR}/globalenums.h PROPERTIES GENERATED TRUE)
-
-if(WIN32)
-    #Set  path to GTest build libraries
-    set(GTEST_BOTH_LIBRARIES "")
-
-    #Set  path to GTest include directory
-    include_directories(${GTEST_INCLUDE_PATHS} "/")
-endif()
-
 file(GLOB SOURCES
     simpletest.cpp
     serializationtest.cpp
     deserializationtest.cpp
     serializationcomplexmessagemap.cpp)
 
-set(testtarget "qtprotobuf_test")
-add_executable(${testtarget} ${SOURCES} ${GENERATED_SOURCES})
-
-if(WIN32)
-    target_link_libraries(${testtarget} qtgrpc qtprotobufsupport "${GTEST_BOTH_LIBRARIES}/gtest_main.lib" "${GTEST_BOTH_LIBRARIES}/gtest.lib" Qt5::Core Qt5::Qml Qt5::Network)
-elseif(UNIX)
-    target_link_libraries(${testtarget} gtest_main gtest qtgrpc qtprotobufsupport)
-endif()
-
-target_include_directories(${testtarget} PRIVATE ${GENERATED_SOURCES_DIR})
-add_dependencies(${testtarget} ${test_sources_generation})
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+add_test_target(TARGET ${TARGET}
+    GENERATED_HEADERS ${GENERATED_HEADERS}
+    SOURCES ${SOURCES})