Unverified Commit 403e6c7a authored by cedricRobert's avatar cedricRobert Committed by GitHub
Browse files

Pv5.7 (#31)

port plugin to version 5.7 of ParaView
First support for Wellbore log/Channel/Curve
Support load/save state
Support for IJK grid kGaps
Several bugfixes
parent 784707ef
......@@ -7,51 +7,38 @@ project(Fespp
VERSION 2.3.0
DESCRIPTION "Paraview plugin for importing EPC documents"
HOMEPAGE_URL "https://github.com/F2I-Consulting/fespp"
LANGUAGES CXX
LANGUAGES C CXX
)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set (CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/install CACHE PATH "Fespp install prefix" FORCE)
endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# -----------------------------------------------------------------------------
# DEPENDENCIES
# -----------------------------------------------------------------------------
set (FESAPI_INCLUDE FESAPI_INCLUDE-NOTFOUND CACHE PATH "Path to the directory which contains the FESAPI header files")
set (FESAPI_LIBRARY_RELEASE FESAPI_LIBRARY_RELEASE-NOTFOUND CACHE FILEPATH "Path to the FESAPI release library")
set (FESAPI_LIBRARY_DEBUG FESAPI_LIBRARY_DEBUG-NOTFOUND CACHE FILEPATH "Path to the FESAPI debug library")
set (WITH_ETP OFF CACHE BOOL "Only if FESAPI build with ETP support... for building Fespp with ETP support.")
if (WITH_ETP)
message ("WARNING: ETP support only if FESAPI build with ETP support")
# -- Boost DEPENDENCY --
set (BOOST_INCLUDE_DIR BOOST_INCLUDE_DIR-NOTFOUND CACHE PATH "Path to the directory which contains the BOOST header files")
if (NOT IS_DIRECTORY ${BOOST_INCLUDE_DIR})
message(WARNING "The BOOST include dir (BOOST_INCLUDE_DIR variable) does not look to be a valid directory. Please modify it.")
endif ()
set (BOOST_SYSTEM_LIBRARY BOOST_SYSTEM_LIBRARY-NOTFOUND CACHE FILEPATH "Path to the file which contains the Boost system static library release")
if (NOT EXISTS ${BOOST_SYSTEM_LIBRARY})
message(WARNING "The BOOST library (BOOST_SYSTEM_LIBRARY variable) does not look to be a valid file. Please modify it.")
endif ()
# -- avro DEPENDENCY --
set (AVRO_INCLUDE_DIR AVRO_INCLUDE_DIR-NOTFOUND CACHE PATH "Path to the directory which contains the avro header files")
if (NOT IS_DIRECTORY ${AVRO_INCLUDE_DIR})
message(WARNING "The Avro include dir (AVRO_INCLUDE_DIR variable) does not look to be a valid directory. Please modify it.")
endif ()
set (AVRO_LIBRARY_RELEASE AVRO_LIBRARY_RELEASE-NOTFOUND CACHE FILEPATH "Path to the file which contains the avro library release")
if (NOT EXISTS ${AVRO_LIBRARY_RELEASE})
message(WARNING "The avro library (AVRO_LIBRARY_RELEASE variable) does not look to be a valid file. Please modify it.")
endif ()
endif (WITH_ETP)
add_subdirectory(Plugin)
# These five lines are required in order to set up installation directories
# (which also control build directory locations) and enable shared builds
# (CMake's default is for a static build).
include(GNUInstallDirs)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
set(BUILD_SHARED_LIBS ON)
# Find ParaView. This will bring in ParaView's CMake API and imported targets.
find_package(ParaView REQUIRED)
# Scan the plugin file in order to set up internal data structures for building plugins
set("_paraview_plugin_default_${CMAKE_PROJECT_NAME}" ON)
paraview_plugin_scan(
PLUGIN_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Plugin/paraview.plugin"
PROVIDES_PLUGINS plugins
REQUIRES_MODULES required_modules)
foreach (module IN LISTS required_modules)
if (NOT TARGET "${module}")
message("Missing required module: ${module}")
return ()
endif ()
endforeach ()
# Build the plugins discovered during the scan.
paraview_plugin_build(
RUNTIME_DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY_DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY_SUBDIRECTORY "${PARAVIEW_PLUGIN_SUBDIR}"
PLUGINS ${plugins})
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set (CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/install CACHE PATH "Fespp install prefix" FORCE)
endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# -----------------------------------------------------------------------------
# Identify all non QT source files
# DEPENDENCIES
# -----------------------------------------------------------------------------
FILE (GLOB FESPP_VTK_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/EPCReader/VTK/*.cxx)
FILE (GLOB FESPP_VTK_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/EPCReader/VTK/*.h)
set (FESAPI_INCLUDE FESAPI_INCLUDE-NOTFOUND CACHE PATH "Path to the directory which contains the FESAPI header files")
set (FESAPI_LIBRARY_RELEASE FESAPI_LIBRARY_RELEASE-NOTFOUND CACHE FILEPATH "Path to the FESAPI release library")
set (FESAPI_LIBRARY_DEBUG FESAPI_LIBRARY_DEBUG-NOTFOUND CACHE FILEPATH "Path to the FESAPI debug library")
set (WITH_ETP OFF CACHE BOOL "Only if FESAPI build with ETP support... for building Fespp with ETP support.")
if (WITH_ETP)
FILE (GLOB FESPP_ETP_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/etp/*.cxx)
FILE (GLOB FESPP_ETP_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/etp/*.h)
ENDIF (WITH_ETP)
message ("WARNING: ETP support only if FESAPI build with ETP support")
set (FESPP_NO_QT_SOURCES ${FESPP_VTK_SOURCES} ${FESPP_VTK_HEADERS} ${FESPP_ETP_SOURCES} ${FESPP_ETP_HEADERS})
# -- Boost DEPENDENCY --
set (BOOST_INCLUDE_DIR BOOST_INCLUDE_DIR-NOTFOUND CACHE PATH "Path to the directory which contains the BOOST header files")
if (NOT IS_DIRECTORY ${BOOST_INCLUDE_DIR})
message(WARNING "The BOOST include dir (BOOST_INCLUDE_DIR variable) does not look to be a valid directory. Please modify it.")
endif ()
set (BOOST_SYSTEM_LIBRARY BOOST_SYSTEM_LIBRARY-NOTFOUND CACHE FILEPATH "Path to the file which contains the Boost system static library release")
if (NOT EXISTS ${BOOST_SYSTEM_LIBRARY})
message(WARNING "The BOOST library (BOOST_SYSTEM_LIBRARY variable) does not look to be a valid file. Please modify it.")
endif ()
# -- avro DEPENDENCY --
set (AVRO_INCLUDE_DIR AVRO_INCLUDE_DIR-NOTFOUND CACHE PATH "Path to the directory which contains the avro header files")
if (NOT IS_DIRECTORY ${AVRO_INCLUDE_DIR})
message(WARNING "The Avro include dir (AVRO_INCLUDE_DIR variable) does not look to be a valid directory. Please modify it.")
endif ()
set (AVRO_LIBRARY_RELEASE AVRO_LIBRARY_RELEASE-NOTFOUND CACHE FILEPATH "Path to the file which contains the avro library release")
if (NOT EXISTS ${AVRO_LIBRARY_RELEASE})
message(WARNING "The avro library (AVRO_LIBRARY_RELEASE variable) does not look to be a valid file. Please modify it.")
endif ()
endif (WITH_ETP)
# -----------------------------------------------------------------------------
# Build the Paraview plugins
# -----------------------------------------------------------------------------
find_package(ParaView REQUIRED)
include ("${PARAVIEW_USE_FILE}")
if (PARAVIEW_BUILD_QT_GUI)
# -----------------------------------------------------------------------------
# Identify all QT related source files
# -----------------------------------------------------------------------------
file (GLOB FESPP_PQ_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/PQ*.h)
file (GLOB FESPP_PQ_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/PQ*.cxx)
file (GLOB FESPP_TREE_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Tree*.h)
file (GLOB FESPP_TREE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Tree*.cxx)
file (GLOB FESPP_FORMS ${CMAKE_CURRENT_SOURCE_DIR}/*.ui)
file (GLOB FESPP_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Resources/*.qrc)
file (GLOB FESPP_PQ_HEADERS PQ*.h)
file (GLOB FESPP_PQ_SOURCES PQ*.cxx)
file (GLOB FESPP_TREE_HEADERS Tree*.h)
file (GLOB FESPP_TREE_SOURCES Tree*.cxx)
file (GLOB FESPP_FORMS *.ui)
file (GLOB FESPP_RESOURCES Resources/*.qrc)
if (NOT WITH_ETP)
file (GLOB FESPP_PQ_HEADERS_ETP ${CMAKE_CURRENT_SOURCE_DIR}/PQEtp*.h)
file (GLOB FESPP_PQ_SOURCES_ETP ${CMAKE_CURRENT_SOURCE_DIR}/PQEtp*.cxx)
file (GLOB FESPP_FORMS_ETP ${CMAKE_CURRENT_SOURCE_DIR}/PQEtp*.ui)
file (GLOB FESPP_RESOURCES_ETP ${CMAKE_CURRENT_SOURCE_DIR}/Resources/PQEtp*.qrc)
file (GLOB FESPP_PQ_HEADERS_ETP PQEtp*.h)
file (GLOB FESPP_PQ_SOURCES_ETP PQEtp*.cxx)
file (GLOB FESPP_FORMS_ETP PQEtp*.ui)
file (GLOB FESPP_RESOURCES_ETP Resources/PQEtp*.qrc)
list (REMOVE_ITEM FESPP_PQ_HEADERS ${FESPP_PQ_HEADERS_ETP})
list (REMOVE_ITEM FESPP_PQ_SOURCES ${FESPP_PQ_SOURCES_ETP})
list (REMOVE_ITEM FESPP_FORMS ${FESPP_FORMS_ETP})
list (REMOVE_ITEM FESPP_RESOURCES ${FESPP_RESOURCES_ETP})
endif ()
if (WIN32)
pv_find_package_qt(qt_targets REQUIRED QT5_COMPONENTS Widgets)
find_package(Qt5 REQUIRED COMPONENTS Widgets)
else (WIN32)
pv_find_package_qt(qt_targets REQUIRED QT5_COMPONENTS Widgets X11Extras)
find_package(Qt5 REQUIRED COMPONENTS Widgets X11Extras)
endif (WIN32)
pv_qt_wrap_cpp(MOC_SRCS ${FESPP_PQ_HEADERS})
pv_qt_wrap_ui(UI_SRCS ${FESPP_FORMS})
ADD_PARAVIEW_DOCK_WINDOW(
IFACES
IFACE_SRCS
paraview_plugin_add_dock_window(
CLASS_NAME PQSelectionPanel
INTERFACES IFACES
SOURCES IFACE_SRCS
)
ADD_PARAVIEW_ACTION_GROUP(
IFACES3
IFACE3_SRCS
paraview_plugin_add_action_group (
CLASS_NAME PQToolsActionGroup
GROUP_NAME "ToolBar/EPC"
GROUP_NAME "ToolBar/Fespp"
INTERFACES IFACES3
SOURCES IFACE3_SRCS
)
set (FESPP_IFACES
set (interfaces
${IFACES}
${IFACES3}
)
......@@ -70,44 +95,49 @@ if (PARAVIEW_BUILD_QT_GUI)
${FESPP_PQ_SOURCES}
${FESPP_TREE_HEADERS}
${FESPP_TREE_SOURCES}
${MOC_SRCS}
${UI_SRCS}
${IFACE_SRCS}
${IFACE3_SRCS}
)
set (sources
${FESPP_NO_QT_SOURCES}
${FESPP_QT_SOURCES})
if (WITH_ETP)
ADD_PARAVIEW_DOCK_WINDOW(
IFACES4
IFACE4_SRCS
paraview_plugin_add_dock_window (
CLASS_NAME PQEtpPanel
INTERFACES IFACES4
SOURCES IFACE4_SRCS
)
list (APPEND FESPP_IFACES ${IFACES4})
list (APPEND interfaces ${IFACES4})
list (APPEND FESPP_QT_SOURCES ${IFACE4_SRCS})
endif ()
ADD_PARAVIEW_PLUGIN(${PROJECT_NAME} ${PROJECT_VERSION}
DOCUMENTATION_DIR "${CMAKE_SOURCE_DIR}/doc"
SERVER_MANAGER_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/EPCReader/vtkEPCReader.cxx
SERVER_MANAGER_XML ${CMAKE_CURRENT_SOURCE_DIR}/EPCReader/EPCReader.xml
GUI_INTERFACES ${FESPP_IFACES}
GUI_RESOURCES ${FESPP_RESOURCES}
paraview_add_plugin(${PROJECT_NAME}
VERSION ${PROJECT_VERSION}
UI_INTERFACES ${interfaces}
UI_RESOURCES ${FESPP_RESOURCES}
UI_FILES ${FESPP_FORMS}
SOURCES ${FESPP_QT_SOURCES}
#SERVER_MANAGER_XML EPCReader.xml
MODULES EPCReader
MODULE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/EPCReader/vtk.module"
XML_DOCUMENTATION OFF
)
target_sources(${PROJECT_NAME} PRIVATE ${FESPP_QT_SOURCES})
else (PARAVIEW_BUILD_QT_GUI)
# create a Server plugin
ADD_PARAVIEW_PLUGIN(${PROJECT_NAME} ${PROJECT_VERSION}
DOCUMENTATION_DIR "${CMAKE_SOURCE_DIR}/doc"
SERVER_MANAGER_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/EPCReader/vtkEPCReader.cxx
SERVER_MANAGER_XML ${CMAKE_CURRENT_SOURCE_DIR}/EPCReader/EPCReader.xml
paraview_add_plugin(${PROJECT_NAME}
REQUIRED_ON_SERVER
)
VERSION ${PROJECT_VERSION}
SOURCES ${FESPP_QT_SOURCES}
#SERVER_MANAGER_XML EPCReader.xml
MODULES EPCReader
MODULE_FILES EPCReader/vtk.module
XML_DOCUMENTATION OFF)
endif (PARAVIEW_BUILD_QT_GUI)
target_sources(${PROJECT_NAME} PRIVATE ${FESPP_NO_QT_SOURCES})
# ============================================================================
# Compile definitions
# ============================================================================
......@@ -121,12 +151,6 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:_CRT_NONSTDC_NO_DEPRECATE>
$<$<CXX_COMPILER_ID:MSVC>:_SCL_SECURE_NO_DEPRECATE>
)
if (WITH_ETP)
target_compile_definitions(${PROJECT_NAME} PRIVATE
WITH_ETP
BOOST_ALL_NO_LIB
)
endif (WITH_ETP)
# ============================================================================
# compilation options
......@@ -141,43 +165,14 @@ target_compile_options(${PROJECT_NAME} PRIVATE
$<$<CXX_COMPILER_ID:CLANG>:-Weverything>
)
# ============================================================================
# External include
# ============================================================================
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/EPCReader)
target_include_directories(${PROJECT_NAME} PRIVATE ${FESAPI_INCLUDE})
if (WITH_ETP)
target_include_directories(${PROJECT_NAME} PRIVATE ${AVRO_INCLUDE_DIR} ${BOOST_INCLUDE_DIR})
endif (WITH_ETP)
# ============================================================================
# External libraries
# ============================================================================
if (WIN32)
if (EXISTS ${FESAPI_LIBRARY_RELEASE} AND EXISTS ${FESAPI_LIBRARY_DEBUG})
set(CMAKE_CONFIGURATION_TYPES "Release;MinSizeRel;RelWithDebInfo;Debug" CACHE STRING "" FORCE)
endif ()
if (NOT EXISTS ${FESAPI_LIBRARY_DEBUG})
set(CMAKE_CONFIGURATION_TYPES "Release;MinSizeRel;RelWithDebInfo" CACHE STRING "" FORCE)
endif ()
if (NOT EXISTS ${FESAPI_LIBRARY_RELEASE})
set(CMAKE_CONFIGURATION_TYPES "Debug" CACHE STRING "" FORCE)
endif ()
if (EXISTS ${FESAPI_LIBRARY_RELEASE} AND EXISTS ${FESAPI_LIBRARY_DEBUG})
target_link_libraries (${PROJECT_NAME} PRIVATE optimized ${FESAPI_LIBRARY_RELEASE} debug ${FESAPI_LIBRARY_DEBUG})
elseif (EXISTS ${FESAPI_LIBRARY_RELEASE})
target_link_libraries (${PROJECT_NAME} PRIVATE ${FESAPI_LIBRARY_RELEASE})
elseif (EXISTS ${FESAPI_LIBRARY_DEBUG})
target_link_libraries (${PROJECT_NAME} PRIVATE ${FESAPI_LIBRARY_DEBUG})
else ()
message(ERROR "No FESAPI library has been set.")
endif ()
elseif (UNIX)
......@@ -185,51 +180,26 @@ elseif (UNIX)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
endif()
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_libraries(${PROJECT_NAME} PRIVATE ${FESAPI_LIBRARY_DEBUG})
else ()
target_link_libraries(${PROJECT_NAME} PRIVATE ${FESAPI_LIBRARY_RELEASE})
endif()
set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
)
endif (WIN32)
if (EXISTS ${AVRO_LIBRARY_RELEASE})
target_link_libraries (${PROJECT_NAME} PRIVATE ${AVRO_LIBRARY_RELEASE})
endif()
# ============================================================================
# Win32 Visual Studio file hierarchy
# ============================================================================
if (WIN32)
source_group ("VTK" FILES ${FESPP_VTK_SOURCES} ${FESPP_VTK_HEADERS})
source_group ("QT" FILES ${FESPP_QT_SOURCES})
IF (WITH_ETP)
source_group ("etp" FILES ${FESPP_ETP_SOURCES} ${FESPP_ETP_HEADERS})
ENDIF (WITH_ETP)
option(DEV_UNDER_WIN32 "Enable copy of the build in a Paraview install directory" OFF)
if (DEV_UNDER_WIN32)
add_custom_command(
TARGET Fespp
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<$<CONFIG:Debug>:$<TARGET_FILE:Fespp>> $<$<CONFIG:Debug>:$<TARGET_PDB_FILE:Fespp>>
$<$<CONFIG:RelWithDebInfo>:$<TARGET_FILE:Fespp>> $<$<CONFIG:RelWithDebInfo>:$<TARGET_PDB_FILE:Fespp>>
$<$<CONFIG:Debug>:"C:/pv56/install_x64_vs2017/bin"> $<$<CONFIG:RelWithDebInfo>:"C:/pv56/install_x64_vs2017/bin">
$<$<CONFIG:Debug>:"C:/pv57/pvbd/bin/paraview-5.7/plugins/Fespp"> $<$<CONFIG:RelWithDebInfo>:"C:/pv57/install_x64_vs2017/bin/paraview-5.7/plugins/Fespp">
)
endif (WIN32)
# ============================================================================
# Installation
# ============================================================================
install (
TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION lib ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION lib ${CMAKE_INSTALL_LIBDIR}
)
endif (DEV_UNDER_WIN32)
set(classes
vtkEPCReader)
FILE (GLOB FESPP_VTK_SOURCES VTK/*.cxx)
FILE (GLOB FESPP_VTK_HEADERS VTK/*.h)
if (WITH_ETP)
FILE (GLOB FESPP_ETP_SOURCES etp/*.cxx)
FILE (GLOB FESPP_ETP_HEADERS etp/*.h)
ENDIF (WITH_ETP)
set (EPC_READER_SOURCES
${FESPP_VTK_SOURCES}
${FESPP_ETP_SOURCES}
)
set (EPC_READER_PRIVATE_HEADERS
${FESPP_VTK_HEADERS}
${FESPP_ETP_HEADERS}
)
vtk_module_add_module(EPCReader
CLASSES ${classes} # shortcut for adding `<class>.cxx` to `SOURCES` and `<class>.h` to `HEADERS`
SOURCES ${EPC_READER_SOURCES} # Do not wrap SOURCES
PRIVATE_HEADERS ${EPC_READER_PRIVATE_HEADERS} # Do not wrap PRIVATE_HEADERS but only HEADERS (or CLASSES which also defines HEADERS)
)
if (WITH_ETP)
vtk_module_definitions(EPCReader PRIVATE
WITH_ETP
BOOST_ALL_NO_LIB
)
endif (WITH_ETP)
# ============================================================================
# External include
# ============================================================================
vtk_module_include(EPCReader PRIVATE ${FESAPI_INCLUDE})
if (WITH_ETP)
vtk_module_include(EPCReader PRIVATE ${AVRO_INCLUDE_DIR} ${BOOST_INCLUDE_DIR})
endif (WITH_ETP)
# ============================================================================
# External link
# ============================================================================
if (WIN32)
if (EXISTS ${FESAPI_LIBRARY_RELEASE})
vtk_module_link(EPCReader PRIVATE ${FESAPI_LIBRARY_RELEASE})
elseif (EXISTS ${FESAPI_LIBRARY_DEBUG})
vtk_module_link(EPCReader PRIVATE ${FESAPI_LIBRARY_DEBUG})
else ()
message(ERROR "No FESAPI library has been set.")
endif ()
elseif (UNIX)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
vtk_module_link(EPCReader PRIVATE ${FESAPI_LIBRARY_DEBUG})
else ()
vtk_module_link(EPCReader PRIVATE ${FESAPI_LIBRARY_RELEASE})
endif()
endif (WIN32)
if (EXISTS ${AVRO_LIBRARY_RELEASE})
vtk_module_link (EPCReader PRIVATE ${AVRO_LIBRARY_RELEASE})
endif()
# ============================================================================
# PARAVIEW SERVER MANAGER XML
# ============================================================================
paraview_add_server_manager_xmls(
XMLS EPCReader.xml)
if (DEV_UNDER_WIN32)
add_custom_command(
TARGET EPCReader
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<$<CONFIG:Debug>:$<TARGET_FILE:EPCReader>> $<$<CONFIG:Debug>:$<TARGET_PDB_FILE:EPCReader>>
$<$<CONFIG:RelWithDebInfo>:$<TARGET_FILE:EPCReader>> $<$<CONFIG:RelWithDebInfo>:$<TARGET_PDB_FILE:EPCReader>>
$<$<CONFIG:Debug>:"C:/pv57/pvbd/bin/paraview-5.7/plugins/Fespp"> $<$<CONFIG:RelWithDebInfo>:"C:/pv57/install_x64_vs2017/bin/paraview-5.7/plugins/Fespp">
)
endif (DEV_UNDER_WIN32)
......@@ -14,33 +14,27 @@
<PipelineIcon name="CINEMA_MARK"/>
</Hints>
<!-- Pipe Name -->
<!--
<StringVectorProperty
name="FileName"
animateable="0"
command="SetFileName"
number_of_elements="1"
panel_visibility="advanced">
<FileListDomain name="files"/>
<Documentation>
This property specifies the file name for the EPC reader.
</Documentation>
</StringVectorProperty>
-->
<!-- File add to pipe -->
<!-- Files List loaded: -->
<StringVectorProperty
name="EpcFileName"
animateable="0"
command="SetSubFileName"
number_of_elements="1"
panel_visibility="advanced">
<FileListDomain name="files"/>
<Hints>
<FileChooser extensions="epc" file_description="EPC files" />
</Hints>
name="FilesInfo"
information_only="1"
default = "1">
<ArraySelectionInformationHelper attribute_name="FilesList"/>
</StringVectorProperty>
<StringVectorProperty name="FilesList"
command="SetFilesList" repeat_command="1"
number_of_elements_per_command="2" element_types="2 0"
information_property="FilesInfo" label="files loaded"
panel_visibility="never">
<ArraySelectionDomain name="array_list">
<RequiredProperties>
<Property name="FilesInfo"
function="ArrayList" />
</RequiredProperties>
</ArraySelectionDomain>
<Documentation>List files loaded...</Documentation>
</StringVectorProperty>
<!-- Uuid List of work: -->
......@@ -51,6 +45,7 @@
default = "1">
<ArraySelectionInformationHelper attribute_name="UuidList"/>
</StringVectorProperty>
<StringVectorProperty name="UuidList"
command="SetUuidList" repeat_command="1"
number_of_elements_per_command="2" element_types="2 0"
......
......@@ -75,21 +75,23 @@ public:
* @returns The Uuid.
*/
const std::string& getUuid() const { return uuid; }
/**
* Set the Uuid when creating a new dataobject
*/
void setUuid(const std::string &);
void setUuid(const std::string & value) { uuid = value; }
/**
* Gets the parent Uuid.
*
* @returns The parent Uuid.
*/
const std::string& getParent() const { return parent; }
/**
* Set the parent Uuid when creating a new dataobject
*/
void setParent(const std::string &);
void setParent(const std::string & value) { parent = value; }
/**
* Gets the name/title Uuid.
......@@ -97,10 +99,11 @@ public:
* @returns The name/title Uuid.
*/
const std::string& getName() const { return name; }
/**
* Set the name/title Uuid when creating a new dataobject
*/
void setName(const std::string &);
void setName(const std::string & value) { name = value; }
/**
* Gets the type Uuid.
......@@ -108,10 +111,11 @@ public:
* @returns The type Uuid.
*/
Resqml2Type getType() const { return myType; }
/**
* Set the type Uuid when creating a new dataobject
*/
void setType(Resqml2Type);
void setType(Resqml2Type value) { myType = value; }
/**
* Gets the parent type Uuid.
......@@ -119,10 +123,11 @@ public:
* @returns The parent type Uuid.
*/
Resqml2Type getParentType() const { return parentType; }
/**
* Set the parent type Uuid when creating a new dataobject
*/
void setParentType(Resqml2Type);
void setParentType(Resqml2Type value) { parentType = value; }
/**
* Gets the Time Index Uuid.
......@@ -130,10 +135,11 @@ public:
* @returns The Time Index Uuid, if no time index -1 value
*/
int getTimeIndex() const { return timeIndex; }
/**
* Set the Time Index Uuid when creating a new dataobject
*/
void setTimeIndex(int);
void setTimeIndex(int value) { timeIndex = value; }
/**
* Gets the timestamp Uuid.
......@@ -141,10 +147,11 @@ public:
* @returns The timestamp Uuid, if no time index -1 value
*/
time_t getTimestamp() const { return timestamp; }
/**
* Set the timestamp Uuid when creating a new dataobject
*/
void setTimestamp(time_t);
void setTimestamp(time_t value) { timestamp = value; }
private:
std::string uuid;
......