Commit 3ca9c54c authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Adding SMApplication to simply CS interpreter initialization.

Creating a SMApplication which provide the default implementation for
vtkInitializationHelper which inits all CS streams. For creating "smaller"
versions, one simply reimplements this module.

Change-Id: I5a882e9ef8d5b8d58120e2e639bc33141e75754b
parent a4bff32b
......@@ -310,6 +310,7 @@ else()
ParaViewCore/ServerManager/Core
ParaViewCore/ServerManager/Rendering
ParaViewCore/ServerManager/Default
ParaViewCore/ServerManager/SMApplication
)
if (PARAVIEW_USE_ICE_T)
list(APPEND ParaViewModulesDirs
......
......@@ -29,7 +29,6 @@
#
#==========================================================================
set (Module_SRCS
vtkInitializationHelper.cxx
vtkSMArrayListDomain.cxx
vtkSMArrayRangeDomain.cxx
vtkSMArraySelectionDomain.cxx
......@@ -118,7 +117,6 @@ set (Module_SRCS
)
SET_SOURCE_FILES_PROPERTIES(
vtkInitializationHelper
vtkSMDeserializer
vtkSMDomain.
vtkSMLink
......
......@@ -6,4 +6,6 @@ vtk_module(vtkPVServerManagerDefault
vtkPVServerImplementationDefault
vtkTestingRendering
vtkIOExport
TEST_DEPENDS
vtkPVServerManagerApplication
)
#==========================================================================
#
# 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
vtkInitializationHelper.cxx
)
SET_SOURCE_FILES_PROPERTIES(
vtkInitializationHelper
ABSTRACT
)
vtk_module_library(vtkPVServerManagerApplication ${Module_SRCS})
#------------------------------------------------------------------------------
# Generate ServerManager (xml and CS stream) initialization header.
#------------------------------------------------------------------------------
set(vtk-module-init-functions)
set(vtk-module-init-calls)
set(_dependencies)
foreach (_module ${VTK_MODULES_ENABLED})
if (NOT ${_module}_EXCLUDE_FROM_WRAPPING AND
(NOT _module STREQUAL "vtkPVServerManagerApplication") )
set(vtk-module-init-functions
"${vtk-module-init-functions}extern \"C\" void ${_module}CS_Initialize(vtkClientServerInterpreter*);\n")
set(vtk-module-init-calls
"${vtk-module-init-calls} ${_module}CS_Initialize(interp);\n")
list(APPEND _dependencies ${_module}CS)
endif()
# TODO: We will do something similar for the XMLs too.
endforeach()
# Add link-dependencies on all wrapping classes.
target_link_libraries(vtkPVServerManagerApplication ${_dependencies})
#------------------------------------------------------------------------------
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/vtkPVInitializer.h.in
${CMAKE_CURRENT_BINARY_DIR}/vtkPVInitializer.h
@ONLY)
#------------------------------------------------------------------------------
vtk_module(vtkPVServerManagerApplication
GROUPS
ParaView
DEPENDS
# When creating a "custom" application, simply change this to
# depend on the appropriate module.
vtkPVServerManagerDefault
)
......@@ -14,13 +14,7 @@ PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkInitializationHelper.h"
#include "vtkPVConfig.h"
/*
* Make sure all the kits register their classes with vtkInstantiator.
* Since ParaView uses Tcl wrapping, all of VTK is already compiled in
* anyway. The instantiators will add no more code for the linker to
* collect.
*/
#include "vtkPVInitializer.h"
#include "vtkClientServerInterpreter.h"
#include "vtkClientServerInterpreterInitializer.h"
#include "vtkOutputWindow.h"
......@@ -149,6 +143,8 @@ void vtkInitializationHelper::Finalize()
*/
void vtkInitializationHelperInit(vtkClientServerInterpreter* interp)
{
// defined in vtkPVInitializer.h
PARAVIEW_CSSTREAMS_INITIALIZE(interp);
//#ifdef PARAVIEW_MINIMAL_BUILD
// vtkParaviewMinInit_Initialize(interp);
......
/*=========================================================================
Program: ParaView
Module: vtkPVInitializer.h.in
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// THIS IS A GENERATED FILE -- DO NOT EDIT ---
#ifndef __vtkPVInitializer_h
#define __vtkPVInitializer_h
class vtkClientServerInterpreter;
@vtk-module-init-functions@
void PARAVIEW_CSSTREAMS_INITIALIZE(vtkClientServerInterpreter* interp)
{
@vtk-module-init-calls@
}
#endif
// THIS IS A GENERATED FILE -- DO NOT EDIT ---
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