Commit 508b4fb3 authored by whitlocb's avatar whitlocb

Enhanced export to allow all time steps to be written out.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23869 18c085ea-50e0-402c-830e-de6fd14e8384
parent 68de0f6e
......@@ -56,6 +56,7 @@
void ExportDBAttributes::Init()
{
allTimes = false;
filename = "visit_ex_db";
dirname = ".";
......@@ -79,6 +80,7 @@ void ExportDBAttributes::Init()
void ExportDBAttributes::Copy(const ExportDBAttributes &obj)
{
allTimes = obj.allTimes;
db_type = obj.db_type;
db_type_fullname = obj.db_type_fullname;
filename = obj.filename;
......@@ -242,7 +244,8 @@ bool
ExportDBAttributes::operator == (const ExportDBAttributes &obj) const
{
// Create the return value
return ((db_type == obj.db_type) &&
return ((allTimes == obj.allTimes) &&
(db_type == obj.db_type) &&
(db_type_fullname == obj.db_type_fullname) &&
(filename == obj.filename) &&
(dirname == obj.dirname) &&
......@@ -391,6 +394,7 @@ ExportDBAttributes::NewInstance(bool copy) const
void
ExportDBAttributes::SelectAll()
{
Select(ID_allTimes, (void *)&allTimes);
Select(ID_db_type, (void *)&db_type);
Select(ID_db_type_fullname, (void *)&db_type_fullname);
Select(ID_filename, (void *)&filename);
......@@ -429,6 +433,12 @@ ExportDBAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool for
// Create a node for ExportDBAttributes.
DataNode *node = new DataNode("ExportDBAttributes");
if(completeSave || !FieldsEqual(ID_allTimes, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("allTimes", allTimes));
}
if(completeSave || !FieldsEqual(ID_db_type, &defaultObject))
{
addToParent = true;
......@@ -507,6 +517,8 @@ ExportDBAttributes::SetFromNode(DataNode *parentNode)
return;
DataNode *node;
if((node = searchNode->GetNode("allTimes")) != 0)
SetAllTimes(node->AsBool());
if((node = searchNode->GetNode("db_type")) != 0)
SetDb_type(node->AsString());
if((node = searchNode->GetNode("db_type_fullname")) != 0)
......@@ -525,6 +537,13 @@ ExportDBAttributes::SetFromNode(DataNode *parentNode)
// Set property methods
///////////////////////////////////////////////////////////////////////////////
void
ExportDBAttributes::SetAllTimes(bool allTimes_)
{
allTimes = allTimes_;
Select(ID_allTimes, (void *)&allTimes);
}
void
ExportDBAttributes::SetDb_type(const std::string &db_type_)
{
......@@ -571,6 +590,12 @@ ExportDBAttributes::SetOpts(const DBOptionsAttributes &opts_)
// Get property methods
///////////////////////////////////////////////////////////////////////////////
bool
ExportDBAttributes::GetAllTimes() const
{
return allTimes;
}
const std::string &
ExportDBAttributes::GetDb_type() const
{
......@@ -707,6 +732,7 @@ ExportDBAttributes::GetFieldName(int index) const
{
switch (index)
{
case ID_allTimes: return "allTimes";
case ID_db_type: return "db_type";
case ID_db_type_fullname: return "db_type_fullname";
case ID_filename: return "filename";
......@@ -737,6 +763,7 @@ ExportDBAttributes::GetFieldType(int index) const
{
switch (index)
{
case ID_allTimes: return FieldType_bool;
case ID_db_type: return FieldType_string;
case ID_db_type_fullname: return FieldType_string;
case ID_filename: return FieldType_string;
......@@ -767,6 +794,7 @@ ExportDBAttributes::GetFieldTypeName(int index) const
{
switch (index)
{
case ID_allTimes: return "bool";
case ID_db_type: return "string";
case ID_db_type_fullname: return "string";
case ID_filename: return "string";
......@@ -799,6 +827,11 @@ ExportDBAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) const
bool retval = false;
switch (index_)
{
case ID_allTimes:
{ // new scope
retval = (allTimes == obj.allTimes);
}
break;
case ID_db_type:
{ // new scope
retval = (db_type == obj.db_type);
......
......@@ -95,6 +95,7 @@ public:
void SelectOpts();
// Property setting methods
void SetAllTimes(bool allTimes_);
void SetDb_type(const std::string &db_type_);
void SetDb_type_fullname(const std::string &db_type_fullname_);
void SetFilename(const std::string &filename_);
......@@ -103,6 +104,7 @@ public:
void SetOpts(const DBOptionsAttributes &opts_);
// Property getting methods
bool GetAllTimes() const;
const std::string &GetDb_type() const;
std::string &GetDb_type();
const std::string &GetDb_type_fullname() const;
......@@ -130,7 +132,8 @@ public:
// IDs that can be used to identify fields in case statements
enum {
ID_db_type = 0,
ID_allTimes = 0,
ID_db_type,
ID_db_type_fullname,
ID_filename,
ID_dirname,
......@@ -140,6 +143,7 @@ public:
};
private:
bool allTimes;
std::string db_type;
std::string db_type_fullname;
std::string filename;
......@@ -151,6 +155,6 @@ private:
static const char *TypeMapFormatString;
static const private_tmfs_t TmfsStruct;
};
#define EXPORTDBATTRIBUTES_TMFS "sssss*a"
#define EXPORTDBATTRIBUTES_TMFS "bsssss*a"
#endif
<?xml version="1.0"?>
<Attribute name="ExportDBAttributes" purpose="The attributes for export a database" persistent="true" exportAPI="STATE_API" exportInclude="state_exports.h">
<Field name="allTimes" label="All time steps" type="bool">
false
</Field>
<Field name="db_type" label="db_type" type="string">
</Field>
<Field name="db_type_fullname" label="db_type_fullname" type="string">
......
......@@ -5,15 +5,28 @@ IF (MSVC_VERSION)
SET(PYTHONVER "2.6")
SET(JPEGVER "6b")
SET(ZLIBVER "1.2.7")
SET(BOXLIBVER "0.1.8")
SET(CGNSVER "3.1.3")
SET(HDF4VER "4.2.6")
SET(PYSIDEVER "1.1.1")
set(HDF4_LIBNAMES_AFFIX_DLL true CACHE INTERNAL "Is 'dll' appended to hdf4 libnames")
set(JPEG_LIBNAME_PREFIX_LIB true CACHE INTERNAL "Is 'lib' prefixed to jpeg libname")
IF (NOT MSVC_VERSION LESS 1700)
SET(VISIT_MSVC_VERSION "MSVC2012")
SET(PYTHONVER "2.7.3")
SET(PYTHONVER "2.7.5")
SET(JPEGVER "9")
set(JPEG_LIBNAME_PREFIX_LIB false CACHE INTERNAL "Is 'lib' prefixed to jpeg libname")
SET(ZLIBVER "1.2.8")
SET(BOXLIBVER "2011.04.28")
SET(CGNSVER "3.1.4")
SET(HDF4VER "4.2.9")
set(HDF4_LIBNAMES_AFFIX_DLL false CACHE INTERNAL "Is 'dll' appended to hdf4 libnames")
SET(PYSIDEVER "1.2.1")
ELSEIF (NOT MSVC_VERSION LESS 1600)
SET(VISIT_MSVC_VERSION "MSVC2010")
SET(PYTHONVER "2.7.2")
SET(PYTHONVER "2.7.5")
SET(JPEGVER "8c")
SET(PYSIDEVER "1.2.1")
ELSEIF (NOT MSVC_VERSION LESS 1500)
SET(VISIT_MSVC_VERSION "MSVC90")
ELSEIF (NOT MSVC_VERSION LESS 1400)
......@@ -34,7 +47,13 @@ IF (CMAKE_CL_64)
ENDIF (CMAKE_CL_64)
MESSAGE(STATUS "Prebuilt library directory name: ${VISIT_MSVC_VERSION}")
SET(VISIT_WINDOWS_DIR ${VISIT_SOURCE_DIR}/../windowsbuild)
IF(NOT DEFINED VISIT_WINDOWS_DIR)
IF(EXISTS ${VISIT_SOURCE_DIR}/../windowsbuild)
SET(VISIT_WINDOWS_DIR ${VISIT_SOURCE_DIR}/../windowsbuild)
ELSE()
message(FATAL_ERROR "Please set VISIT_WINDOWS_DIR to location of 'windowsbuild' files")
ENDIF()
ENDIF()
get_filename_component(VISIT_WINDOWS_DIR ${VISIT_WINDOWS_DIR} ABSOLUTE)
SET(VISITHOME ${VISIT_WINDOWS_DIR}/${VISIT_MSVC_VERSION})
......@@ -53,15 +72,22 @@ OPTION(VISIT_MAKE_NSIS_INSTALLER "Create an installer package using NSIS." ON)
##
## VTK
##
SETUP_VTK_VERSION(6.0.0)
VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk/${VTK_VERSION})
IF(VISIT_QT5)
VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk-qt5/${VTK_VERSION})
ELSE()
VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk/${VTK_VERSION})
ENDIF()
##
## QT
##
VISIT_OPTION_DEFAULT(VISIT_QT_BIN ${VISITHOME}/Qt/4.8.3/lib)
VISIT_OPTION_DEFAULT(QT_DIR ${VISITHOME}/Qt/4.8.3)
VISIT_OPTION_DEFAULT(QT_QMAKE_EXECUTABLE ${VISIT_QT_BIN}/qmake.exe TYPE FILEPATH)
if (VISIT_QT5)
VISIT_OPTION_DEFAULT(VISIT_QT_DIR ${VISITHOME}/Qt/5.2.1)
ELSE()
VISIT_OPTION_DEFAULT(VISIT_QT_BIN ${VISITHOME}/Qt/4.8.3/lib)
VISIT_OPTION_DEFAULT(QT_DIR ${VISITHOME}/Qt/4.8.3)
VISIT_OPTION_DEFAULT(QT_QMAKE_EXECUTABLE ${VISIT_QT_BIN}/qmake.exe TYPE FILEPATH)
ENDIF()
##
## PYTHON
......@@ -71,7 +97,7 @@ VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR ${VISITHOME}/python/${PYTHONVER})
##
## PYSIDE
##
VISIT_OPTION_DEFAULT(VISIT_PYSIDE_DIR ${VISITHOME}/PySide/1.1.1)
VISIT_OPTION_DEFAULT(VISIT_PYSIDE_DIR ${VISITHOME}/PySide/${PYSIDEVER})
##############################################################
##
......@@ -82,7 +108,7 @@ VISIT_OPTION_DEFAULT(VISIT_PYSIDE_DIR ${VISITHOME}/PySide/1.1.1)
##
## JPEG
##
#VISIT_OPTION_DEFAULT(VISIT_JPEG_DIR ${VISITHOME}/jpeg/${JPEGVER})
VISIT_OPTION_DEFAULT(VISIT_JPEG_DIR ${VISITHOME}/jpeg/${JPEGVER})
##
## SZIP
......@@ -106,91 +132,97 @@ VISIT_OPTION_DEFAULT(VISIT_ZLIB_DIR ${VISITHOME}/zlib/${ZLIBVER})
##
## HDF4
##
#
#VISIT_OPTION_DEFAULT(VISIT_HDF4_LIBDEP
# JPEG_LIBRARY_DIR libjpeg
# SZIP_LIBRARY_DIR szlibdll
# ZLIB_LIBRARY_DIR zlib1
# TYPE STRING
#)
VISIT_OPTION_DEFAULT(VISIT_HDF4_DIR ${VISITHOME}/hdf4/${HDF4VER})
VISIT_OPTION_DEFAULT(VISIT_HDF4_LIBDEP
JPEG_LIBRARY_DIR JPEG_LIB
SZIP_LIBRARY_DIR SZIP_LIB
ZLIB_LIBRARY_DIR ZLIB_LIBRARY
TYPE STRING
)
##
## HDF5
##
VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5/1.8.7)
VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP
SZIP_LIBRARY_DIR szlibdll
ZLIB_LIBRARY_DIR zlib1
SZIP_LIBRARY_DIR SZIP_LIB
ZLIB_LIBRARY_DIR ZLIB_LIBRARY
TYPE STRING
)
##
## NETCDF
##
#VISIT_OPTION_DEFAULT(VISIT_NETCDF_DIR ${VISITHOME}/netcdf/4.1.1)
#VISIT_OPTION_DEFAULT(VISIT_NETCDF_LIBDEP
# HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP}
# TYPE STRING
#)
VISIT_OPTION_DEFAULT(VISIT_NETCDF_DIR ${VISITHOME}/netcdf/4.1.1)
VISIT_OPTION_DEFAULT(VISIT_NETCDF_LIBDEP
HDF5_LIBRARY_DIR HDF5_LIB ${VISIT_HDF5_LIBDEP}
TYPE STRING
)
##
## BOXLIB
##
#VISIT_OPTION_DEFAULT(VISIT_BOXLIB_DIR ${VISITHOME}/BoxLib/0.1.8)
VISIT_OPTION_DEFAULT(VISIT_BOXLIB_DIR ${VISITHOME}/BoxLib/${BOXLIBVER})
##
## CCMIO
##
#VISIT_OPTION_DEFAULT(VISIT_CCMIO_DIR ${VISITHOME}/ccmio/2.6.1)
VISIT_OPTION_DEFAULT(VISIT_CCMIO_DIR ${VISITHOME}/ccmio/2.6.1)
##
## CFITSIO
##
#VISIT_OPTION_DEFAULT(VISIT_CFITSIO_DIR ${VISITHOME}/cfitsio/3006)
VISIT_OPTION_DEFAULT(VISIT_CFITSIO_DIR ${VISITHOME}/cfitsio/3006)
##
## CGNS
##
#VISIT_OPTION_DEFAULT(VISIT_CGNS_DIR ${VISITHOME}/cgns/3.1.3)
#VISIT_OPTION_DEFAULT(VISIT_CGNS_LIBDEP
# HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP}
# TYPE STRING
#)
VISIT_OPTION_DEFAULT(VISIT_CGNS_DIR ${VISITHOME}/cgns/${CGNSVER})
VISIT_OPTION_DEFAULT(VISIT_CGNS_LIBDEP
HDF5_LIBRARY_DIR HDF5_LIB ${VISIT_HDF5_LIBDEP}
TYPE STRING
)
##
## GDAL
##
#VISIT_OPTION_DEFAULT(VISIT_GDAL_DIR ${VISITHOME}/gdal/1.10.0)
VISIT_OPTION_DEFAULT(VISIT_GDAL_DIR ${VISITHOME}/gdal/1.10.0)
##
## H5PART
##
#VISIT_OPTION_DEFAULT(VISIT_H5PART_DIR ${VISITHOME}/h5part/1.6.5)
#VISIT_OPTION_DEFAULT(VISIT_H5PART_LIBDEP
# HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP}
# TYPE STRING
#)
VISIT_OPTION_DEFAULT(VISIT_H5PART_DIR ${VISITHOME}/h5part/1.6.5)
VISIT_OPTION_DEFAULT(VISIT_H5PART_LIBDEP
HDF5_LIBRARY_DIR HDF5_LIB ${VISIT_HDF5_LIBDEP}
TYPE STRING
)
##
## MILI
##
#VISIT_OPTION_DEFAULT(VISIT_MILI_DIR ${VISITHOME}/Mili/13.1.1-patch)
VISIT_OPTION_DEFAULT(VISIT_MILI_DIR ${VISITHOME}/Mili/13.1.1-patch)
##
## SILO
##
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.9.1)
VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP
HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP}
HDF5_LIBRARY_DIR HDF5_LIB ${VISIT_HDF5_LIBDEP}
TYPE STRING
)
##
## XDMF
##
#VISIT_OPTION_DEFAULT(VISIT_XDMF_DIR ${VISITHOME}/Xdmf/2.1.1)
#VISIT_OPTION_DEFAULT(VISIT_XDMF_LIBDEP
# HDF5_LIBRARY_DIR hdf5dll ${VISIT_HDF5_LIBDEP}
# VTK_LIBRARY_DIRS vtklibxml2-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}
# TYPE STRING
#)
if(VISIT_QT5)
VISIT_OPTION_DEFAULT(VISIT_XDMF_DIR ${VISITHOME}/Xdmf-vtk-qt5/2.1.1)
else()
VISIT_OPTION_DEFAULT(VISIT_XDMF_DIR ${VISITHOME}/Xdmf/2.1.1)
endif()
VISIT_OPTION_DEFAULT(VISIT_XDMF_LIBDEP
HDF5_LIBRARY_DIR HDF5_LIB ${VISIT_HDF5_LIBDEP}
VTK_LIBRARY_DIRS vtklibxml2-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}
TYPE STRING
)
......@@ -83,7 +83,7 @@ FieldViewXDBGeneralPluginInfo::GetVersion() const
const char *
FieldViewXDBGeneralPluginInfo::GetID() const
{
return "FIELDVIEWFieldViewXDB_1.0";
return "FieldViewXDB_1.0";
}
// ****************************************************************************
// Method: FieldViewXDBGeneralPluginInfo::EnabledByDefault
......
......@@ -1793,7 +1793,7 @@ RPCExecutor<ExportDatabaseRPC>::Execute(ExportDatabaseRPC *rpc)
avtCallback::RegisterWarningCallback(Engine::EngineWarningCallback, (void*)rpc);
TRY
{
netmgr->ExportDatabases(rpc->GetIDs(), rpc->GetExportDBAtts());
netmgr->ExportDatabases(rpc->GetIDs(), rpc->GetExportDBAtts(), rpc->GetTimeSuffix());
rpc->SendReply();
}
CATCH2(VisItException, e)
......
......@@ -4492,6 +4492,7 @@ NetworkManager::GetDataBinning(const char *name)
// Arguments:
// ids The networks to use.
// atts The export database attributes.
// timeSuffix A string that represents a time to be appended to the filename.
//
// Note: Work partially supported by DOE Grant SC0007548.
//
......@@ -4499,12 +4500,27 @@ NetworkManager::GetDataBinning(const char *name)
// Creation: Fri Jan 24 16:54:20 PST 2014
//
// Modifications:
// Brad Whitlock, Thu Jul 24 22:27:34 EDT 2014
// Pass timeSuffix.
//
// ****************************************************************************
void
NetworkManager::ExportDatabases(const intVector &ids, ExportDBAttributes *atts)
NetworkManager::ExportDatabases(const intVector &ids, const ExportDBAttributes &atts,
const std::string &timeSuffix)
{
// Determine the filename and extension.
std::string filename, ext;
const std::string &f = atts.GetFilename();
std::string::size_type idx = f.rfind(".");
if(idx != std::string::npos)
{
filename = f.substr(0, idx);
ext = f.substr(idx, f.size() - idx);
}
else
filename = f;
if(ids.size() > 1)
{
// FUTURE: Get the plugin info here, create the writer.
......@@ -4516,26 +4532,18 @@ NetworkManager::ExportDatabases(const intVector &ids, ExportDBAttributes *atts)
for(size_t i = 0; i < ids.size(); ++i)
{
// Rig up a temporary ExportDBAttributes where we change the filename a little.
ExportDBAttributes eAtts(*atts);
char suffix[20];
const std::string &f = eAtts.GetFilename();
std::string::size_type idx = f.rfind(".");
if(idx != std::string::npos)
{
std::string filename(f.substr(0, idx));
std::string ext(f.substr(idx, f.size() - idx));
SNPRINTF(suffix, 20, "_%02d", int(i));
eAtts.SetFilename(filename + suffix + ext);
}
ExportDBAttributes eAtts(atts);
char plotid[4];
SNPRINTF(plotid, 4, "_%02d", int(i));
if(atts.GetAllTimes())
eAtts.SetFilename(filename + plotid + std::string("_") + timeSuffix + ext);
else
{
SNPRINTF(suffix, 20, "_%02d", int(i));
eAtts.SetFilename(f + suffix);
}
eAtts.SetFilename(filename + plotid + ext);
TRY
{
ExportSingleDatabase(ids[i], &eAtts);
ExportSingleDatabase(ids[i], eAtts);
}
CATCH2(VisItException, e)
{
......@@ -4553,7 +4561,14 @@ NetworkManager::ExportDatabases(const intVector &ids, ExportDBAttributes *atts)
}
}
else if(!ids.empty())
ExportSingleDatabase(ids[0], atts);
{
ExportDBAttributes eAtts(atts);
if(atts.GetAllTimes())
eAtts.SetFilename(filename + timeSuffix + ext);
else
eAtts.SetFilename(filename + ext);
ExportSingleDatabase(ids[0], eAtts);
}
}
// ****************************************************************************
......@@ -4596,7 +4611,7 @@ NetworkManager::ExportDatabases(const intVector &ids, ExportDBAttributes *atts)
// ****************************************************************************
void
NetworkManager::ExportSingleDatabase(int id, ExportDBAttributes *atts)
NetworkManager::ExportSingleDatabase(int id, const ExportDBAttributes &atts)
{
if ((size_t)id >= networkCache.size())
{
......@@ -4637,7 +4652,7 @@ NetworkManager::ExportSingleDatabase(int id, ExportDBAttributes *atts)
EXCEPTION0(ImproperUseException);
}
const std::string &db_type = atts->GetDb_type_fullname();
const std::string &db_type = atts.GetDb_type_fullname();
if (!GetDatabasePluginManager()->PluginAvailable(db_type))
{
char msg[1024];
......@@ -4655,7 +4670,7 @@ NetworkManager::ExportSingleDatabase(int id, ExportDBAttributes *atts)
EXCEPTION1(ImproperUseException, msg);
}
DBOptionsAttributes opts = atts->GetOpts();
DBOptionsAttributes opts = atts.GetOpts();
info->SetWriteOptions(&opts);
avtDatabaseWriter *wrtr = info->GetWriter();
if (wrtr == NULL)
......@@ -4680,13 +4695,13 @@ NetworkManager::ExportSingleDatabase(int id, ExportDBAttributes *atts)
wrtr->SetInput(dob);
std::string qualFilename;
if (atts->GetDirname() == "")
qualFilename = atts->GetFilename();
if (atts.GetDirname() == "")
qualFilename = atts.GetFilename();
else
qualFilename = atts->GetDirname() + std::string(VISIT_SLASH_STRING)
+ atts->GetFilename();
qualFilename = atts.GetDirname() + std::string(VISIT_SLASH_STRING)
+ atts.GetFilename();
bool doAll = false;
std::vector<std::string> vars = atts->GetVariables();
std::vector<std::string> vars = atts.GetVariables();
if (vars.size() == 1 && vars[0] == "<all>")
{
doAll = true;
......
......@@ -546,7 +546,8 @@ class ENGINE_MAIN_API NetworkManager
void PickForIntersection(const int, PickAttributes *);
void Query(const std::vector<int> &, QueryAttributes*);
std::string GetQueryParameters(const std::string &qName);
void ExportDatabases(const intVector &, ExportDBAttributes *);
void ExportDatabases(const intVector &, const ExportDBAttributes &,
const std::string &timeSuffix);
void ConstructDataBinning(const int, ConstructDataBinningAttributes *);
avtDataBinning *GetDataBinning(const char *);
......@@ -565,7 +566,7 @@ class ENGINE_MAIN_API NetworkManager
static void SetStereoEnabled();
protected:
void ExportSingleDatabase(int, ExportDBAttributes *);
void ExportSingleDatabase(int, const ExportDBAttributes &);
virtual avtImage_p RenderGeometry();
void RenderSetup(intVector& networkIds, bool getZBuffer,
......
......@@ -1380,6 +1380,7 @@ EngineMethods::ConstructDataBinning(const int id, const ConstructDataBinningAttr
// Arguments:
// id the id of the network to be cloned.
// atts the attributes to export the database.
// timeSuffix a time state string that will be put into the exported filename.
//
// Programmer: Hank Childs
// Creation: May 26, 2005
......@@ -1389,12 +1390,16 @@ EngineMethods::ConstructDataBinning(const int id, const ConstructDataBinningAttr
// Allow more than one network.
// Work partially supported by DOE Grant SC0007548.
//
// Brad Whitlock, Thu Jul 24 22:18:34 EDT 2014
// Pass timeSuffix.
//
// ****************************************************************************
void
EngineMethods::ExportDatabases(const intVector &ids, const ExportDBAttributes *atts)
EngineMethods::ExportDatabases(const intVector &ids, const ExportDBAttributes &atts,
const std::string &timeSuffix)
{
state->exportDatabaseRPC(ids, atts);
state->exportDatabaseRPC(ids, atts, timeSuffix);
if (state->exportDatabaseRPC.GetStatus() == VisItRPC::error)
{
RECONSTITUTE_EXCEPTION(state->exportDatabaseRPC.GetExceptionType(),
......
......@@ -164,7 +164,8 @@ public:
void Query(const std::vector<int> &,
const QueryAttributes *,
QueryAttributes &);
void ExportDatabases(const intVector &ids, const ExportDBAttributes *);
void ExportDatabases(const intVector &ids, const ExportDBAttributes &,
const std::string &timeSuffix);
void ConstructDataBinning(int, const ConstructDataBinningAttributes *);
const SelectionSummary &CreateNamedSelection(int id, const SelectionProperties &props);
......
......@@ -53,7 +53,8 @@
//
// ****************************************************************************
ExportDatabaseRPC::ExportDatabaseRPC() : BlockingRPC("i*a"), ids(), exportDBAtts()
ExportDatabaseRPC::ExportDatabaseRPC() : BlockingRPC("i*as"), ids(), exportDBAtts(),
timeSuffix()
{
}
......@@ -92,13 +93,18 @@ ExportDatabaseRPC::~ExportDatabaseRPC()
// Allow more than one network.
// Work partially supported by DOE Grant SC0007548.
//
// Brad Whitlock, Thu Jul 24 22:16:34 EDT 2014
// Pass time suffix.
//
// ****************************************************************************
void
ExportDatabaseRPC::operator()(const intVector &ids_, const ExportDBAttributes *atts)
ExportDatabaseRPC::operator()(const intVector &ids_, const ExportDBAttributes &atts,
const std::string &s)
{
SetIDs(ids_);
SetExportDBAtts(atts);
SetTimeSuffix(s);
Execute();
}
......@@ -121,6 +127,7 @@ ExportDatabaseRPC::SelectAll()
{
Select(0, (void*)&ids);
Select(1, (void*)&exportDBAtts);
Select(2, (void*)&timeSuffix);
}
......@@ -180,9 +187,9 @@ ExportDatabaseRPC::GetIDs() const
// ****************************************************************************
void
ExportDatabaseRPC::SetExportDBAtts(const ExportDBAttributes *atts)
ExportDatabaseRPC::SetExportDBAtts(const ExportDBAttributes &atts)
{
exportDBAtts = *atts;
exportDBAtts = atts;
Select(1, (void*)&exportDBAtts);
}
......@@ -198,8 +205,21 @@ ExportDatabaseRPC::SetExportDBAtts(const ExportDBAttributes *atts)
//
// ****************************************************************************
ExportDBAttributes *
ExportDatabaseRPC::GetExportDBAtts()
const ExportDBAttributes &
ExportDatabaseRPC::GetExportDBAtts() const
{
return exportDBAtts;
}
void
ExportDatabaseRPC::SetTimeSuffix(const std::string &s)
{
timeSuffix = s;
Select(2, (void*)&timeSuffix);
}
const std::string &
ExportDatabaseRPC::GetTimeSuffix() const
{
return &exportDBAtts;
return timeSuffix;
}
......@@ -69,23 +69,25 @@ class ENGINE_RPC_API ExportDatabaseRPC : public BlockingRPC
virtual const std::string TypeName() const { return "ExportDatabaseRPC"; }
// Invocation method
void operator()(const intVector &, const ExportDBAttributes *);
void operator()(const intVector &, const ExportDBAttributes &, const std::string &);
// Property selection methods
virtual void SelectAll();
// Property setting methods
void SetIDs(const intVector &ids);
void SetExportDBAtts(const ExportDBAttributes *);
void SetExportDBAtts(const ExportDBAttributes &);
void SetTimeSuffix(const std::string &);
// Property getting methods
const intVector &GetIDs() const;
ExportDBAttributes *GetExportDBAtts();
const intVector &GetIDs() const;
const ExportDBAttributes &GetExportDBAtts() const;
const std::string &GetTimeSuffix() const;
private:
intVector ids;
ExportDBAttributes exportDBAtts;
std::string timeSuffix;
};
#endif
......@@ -265,6 +265,9 @@ QvisExportDBWindow::SubjectRemoved(Subject *TheRemovedSubject)
// Kathleen Biagas, Wed Apr 23 15:31:45 PDT 2014
// Enable directorySelectButton based on host for active plot (if any).
//
// Brad Whitlock, Thu Jul 24 13:55:34 EDT 2014
// Added check box for doing all time steps.
//
// ****************************************************************************
void
......@@ -272,12 +275,17 @@ QvisExportDBWindow::CreateWindowContents()
{
// Create a group box for the file information.
QGroupBox *infoBox = new QGroupBox(central);
infoBox->setTitle(tr("Output description"));
infoBox->setTitle(tr("Output"));
topLayout->addWidget(infoBox);
QGridLayout *infoLayout = new QGridLayout(infoBox);
infoLayout->setMargin(5);
allTimes = new QCheckBox(tr("Export all time states"), infoBox);
connect(allTimes, SIGNAL(toggled(bool)),
this, SLOT(allTimesToggled(bool)));
infoLayout->addWidget(allTimes, 0, 0, 1, 2);
filenameLineEdit = new QLineEdit(infoBox);