Commit 0044527a authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Restructuring ServerImplementation.

Change-Id: Ic95964ddfd6f4762c4c8718ad9798c609534f3a9
parent 455955fd
......@@ -300,6 +300,9 @@ else()
ParaViewCore/ClientServerCore/Core
ParaViewCore/ClientServerCore/Rendering
ParaViewCore/ClientServerCore/Default
ParaViewCore/ServerImplementation/Core
ParaViewCore/ServerImplementation/Rendering
ParaViewCore/ServerImplementation/Default
#ParaViewCore/VTKExtensions
#ParaViewCore/ClientServerCore
#ParaViewCore/ServerImplementation
......
......@@ -34,17 +34,13 @@ set (Module_SRCS
vtkPVSessionCore.cxx
vtkPVSessionCoreInterpreterHelper.cxx
vtkPVSessionServer.cxx
vtkSIAMRVolumeRepresentationProxy.cxx
vtkSIArraySelectionProperty.cxx
vtkSIChartRepresentationProxy.cxx
vtkSICollaborationManager.cxx
vtkSICompoundSourceProxy.cxx
vtkSIContextArraysProperty.cxx
vtkSIDataArrayProperty.cxx
vtkSIDoubleVectorProperty.cxx
vtkSIFileSeriesReaderProxy.cxx
vtkSIIdTypeVectorProperty.cxx
vtkSIImageTextureProxy.cxx
vtkSIInputProperty.cxx
vtkSIIntVectorProperty.cxx
vtkSIObject.cxx
......@@ -52,20 +48,13 @@ set (Module_SRCS
vtkSIProxy.cxx
vtkSIProxyDefinitionManager.cxx
vtkSIProxyProperty.cxx
vtkSIPVRepresentationProxy.cxx
vtkSIScalarBarActorProxy.cxx
vtkSISelectionRepresentationProxy.cxx
vtkSISILProperty.cxx
vtkSISourceProxy.cxx
vtkSIStringVectorProperty.cxx
vtkSITextSourceRepresentationProxy.cxx
vtkSITimeRangeProperty.cxx
vtkSITimeStepsProperty.cxx
vtkSIUniformGridVolumeRepresentationProxy.cxx
vtkSIUnstructuredGridVolumeRepresentationProxy.cxx
vtkSIVectorProperty.cxx
vtkSIWriterProxy.cxx
vtkSIXMLAnimationWriterRepresentationProperty.cxx
vtkSMMessage.cxx
)
......@@ -75,8 +64,8 @@ set_source_files_properties(
set_source_files_properties(
vtkPVProxyDefinitionIterator.cxx
vtkSIVectorProperty.cxx
vtkPVSessionBase.cxx
vtkSIVectorProperty.cxx
vtkSMMessage.cxx
ABSTRACT)
......@@ -90,9 +79,9 @@ add_custom_command(
COMMAND protoc_compiler
"--cpp_out=dllexport_decl=VTK_PROTOBUF_EXPORT:${CMAKE_CURRENT_BINARY_DIR}"
--proto_path "@CMAKE_CURRENT_SOURCE_DIR@/Resources"
"${CMAKE_CURRENT_SOURCE_DIR}/Resources/vtkPVMessage.proto"
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Resources/vtkPVMessage.proto protoc_compiler
--proto_path "@CMAKE_CURRENT_SOURCE_DIR@"
"${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto"
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/vtkPVMessage.proto protoc_compiler
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
......@@ -102,40 +91,10 @@ add_custom_target(
${CMAKE_CURRENT_BINARY_DIR}/vtkPVMessage.pb.h
${CMAKE_CURRENT_BINARY_DIR}/vtkPVMessage.pb.cc
)
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Generate header from the xml files.
#------------------------------------------------------------------------------
set (resourceFiles
${CMAKE_CURRENT_SOURCE_DIR}/Resources/filters.xml
${CMAKE_CURRENT_SOURCE_DIR}/Resources/sources.xml
${CMAKE_CURRENT_SOURCE_DIR}/Resources/readers.xml
${CMAKE_CURRENT_SOURCE_DIR}/Resources/utilities.xml
${CMAKE_CURRENT_SOURCE_DIR}/Resources/rendering.xml
${CMAKE_CURRENT_SOURCE_DIR}/Resources/views_and_representations.xml
${CMAKE_CURRENT_SOURCE_DIR}/Resources/3d_widgets.xml
${CMAKE_CURRENT_SOURCE_DIR}/Resources/internal_writers.xml
${CMAKE_CURRENT_SOURCE_DIR}/Resources/writers.xml
)
cmake_dependent_option(PARAVIEW_ENABLE_PYTHON_FILTERS
"Enable Python calculator and programmable filters." ON
"PARAVIEW_ENABLE_PYTHON" OFF)
if (PARAVIEW_ENABLE_PYTHON_FILTERS)
list(APPEND resourceFiles
${CMAKE_CURRENT_SOURCE_DIR}/Resources/pythonfilter.xml)
endif()
set (PARAVIEW_SERVERMANAGER_XMLS ${resourceFiles}
CACHE INTERNAL "Server Manager XMLs")
#------------------------------------------------------------------------------
vtk_module_library(vtkPVServerImplementation
vtk_module_library(vtkPVServerImplementationCore
${Module_SRCS})
add_dependencies(vtkPVServerImplementation
add_dependencies(vtkPVServerImplementationCore
protobuf_code_generation)
vtk_module(vtkPVServerImplementationCore
GROUPS
ParaViewCore
DEPENDS
vtkPVClientServerCoreCore
vtkprotobuf
)
......@@ -19,7 +19,7 @@
#include "vtkClientServerInterpreter.h"
#include "vtkCommand.h"
#include "vtkCompositeDataPipeline.h"
#include "vtkGeometryRepresentation.h"
//#include "vtkGeometryRepresentation.h"
#include "vtkInformation.h"
#include "vtkInstantiator.h"
#include "vtkMultiProcessController.h"
......@@ -29,10 +29,11 @@
#include "vtkPVExtentTranslator.h"
#include "vtkPVPostFilter.h"
#include "vtkPVXMLElement.h"
#include "vtkSIPVRepresentationProxy.h"
#include "vtkSMMessage.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtkTimerLog.h"
#include "vtkUnstructuredGrid.h"
#include "vtkCompositeDataSet.h"
#include <vector>
#include <vtksys/ios/sstream>
......@@ -336,6 +337,37 @@ bool vtkSISourceProxy::ReadXMLAttributes(vtkPVXMLElement* element)
return true;
}
//----------------------------------------------------------------------------
// FIXME: avoid code-duplication with vtkGeometryRepresentation. However I
// cannot add dependecy on vtkGeometryRepresentation here. Fix it!!!
namespace
{
bool vtkGeometryRepresentationDoRequestGhostCells(vtkInformation* info)
{
vtkMultiProcessController* controller =
vtkMultiProcessController::GetGlobalController();
if (controller == NULL || controller->GetNumberOfProcesses() <= 1)
{
return false;
}
if (vtkUnstructuredGrid::GetData(info) != NULL ||
vtkCompositeDataSet::GetData(info) != NULL)
{
// ensure that there's no WholeExtent to ensure
// that this UG was never born out of a structured dataset.
bool has_whole_extent = (info->Has(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()) != 0);
if (!has_whole_extent)
{
//cout << "Need ghosts" << endl;
return true;
}
}
return false;
}
}
//----------------------------------------------------------------------------
void vtkSISourceProxy::UpdatePipeline(int port, double time, bool doTime)
{
......@@ -367,7 +399,7 @@ void vtkSISourceProxy::UpdatePipeline(int port, double time, bool doTime)
// ghost-cells if available (11811), but not asking for ghost-cells earlier than the
// representation results in multiple executes (12546). Hence, we request
// ghost-cells in UpdatePipeline().
bool req_ghost_cells = vtkGeometryRepresentation::DoRequestGhostCells(
bool req_ghost_cells = vtkGeometryRepresentationDoRequestGhostCells(
sddp->GetOutputInformation(real_port));
sddp->SetUpdateExtent(real_port, processid, numprocs, /*ghost level*/
......
#==========================================================================
#
# Program: ParaView
#
# Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
# All rights reserved.
#
# ParaView is a free software; you can redistribute it and/or modify it
# under the terms of the ParaView license version 1.2.
#
# See License_v1.2.txt for the full ParaView license.
# A copy of this license can be obtained by contacting
# Kitware Inc.
# 28 Corporate Drive
# Clifton Park, NY 12065
# USA
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#==========================================================================
set (Module_SRCS
vtkSIXMLAnimationWriterRepresentationProperty.cxx
)
#------------------------------------------------------------------------------
vtk_module_library(vtkPVServerImplementationDefault
${Module_SRCS})
vtk_module(vtkPVServerImplementationDefault
GROUPS
ParaView
DEPENDS
vtkPVServerImplementationRendering
vtkPVClientServerCoreDefault
)
#==========================================================================
#
# Program: ParaView
#
# Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
# All rights reserved.
#
# ParaView is a free software; you can redistribute it and/or modify it
# under the terms of the ParaView license version 1.2.
#
# See License_v1.2.txt for the full ParaView license.
# A copy of this license can be obtained by contacting
# Kitware Inc.
# 28 Corporate Drive
# Clifton Park, NY 12065
# USA
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#==========================================================================
set (Module_SRCS
vtkSIAMRVolumeRepresentationProxy.cxx
vtkSIChartRepresentationProxy.cxx
vtkSIContextArraysProperty.cxx
vtkSIImageTextureProxy.cxx
vtkSIPVRepresentationProxy.cxx
vtkSIScalarBarActorProxy.cxx
vtkSISelectionRepresentationProxy.cxx
vtkSITextSourceRepresentationProxy.cxx
vtkSIUniformGridVolumeRepresentationProxy.cxx
vtkSIUnstructuredGridVolumeRepresentationProxy.cxx
)
#------------------------------------------------------------------------------
vtk_module_library(vtkPVServerImplementationRendering
${Module_SRCS})
vtk_module(vtkPVServerImplementationRendering
GROUPS
ParaViewRendering
DEPENDS
vtkPVServerImplementationCore
vtkPVClientServerCoreRendering
)
vtk_module(vtkPVServerImplementation
GROUPS
ParaView
DEPENDS
vtkPVClientServerCore
vtkprotobuf
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment