Commit e05682ba authored by bonnell's avatar bonnell

Fix a few database plugins so their info files can be auto-regenerated

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@21726 18c085ea-50e0-402c-830e-de6fd14e8384
parent bb96ad8f
Target: xml2info
Function: ADIOSCommonPluginInfo::SetupDatabase
Declaration: virtual avtDatabase * ADIOSCommonPluginInfo::SetupDatabase(const char *const *list, int nList, int nBlock);
Definition:
// ****************************************************************************
// Method: ADIOSCommonPluginInfo::SetupDatabase
//
// Purpose:
// Sets up a ADIOS database.
//
// Arguments:
// list A list of file names.
// nList The number of timesteps in list.
// nBlocks The number of blocks in the list.
//
// Returns: A ADIOS database from list.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
avtDatabase *
ADIOSCommonPluginInfo::SetupDatabase(const char *const *list,
int nList,
int nBlock)
{
avtDatabase *db = 0;
//
// Create a file format interface.
//
avtFileFormatInterface *ffi = ADIOS_CreateFileFormatInterface(list,
nList,
nBlock);
//
// If we created a file format interface, try creating a database.
//
if (ffi)
{
// Try and create the database using the interface that was created.
TRY
{
db = new avtGenericDatabase(ffi);
}
CATCH(VisItException)
{
delete ffi;
delete db;
RETHROW;
}
ENDTRY
}
return db;
}
......@@ -32,6 +32,8 @@
<LIBS components="EPar">
-ladiosread
</LIBS>
<Attribute name="" purpose="" persistent="false" keyframe="true" exportAPI="" exportInclude="">
<Attribute name="" purpose="" persistent="false" keyframe="true" exportAPI="" exportInclude="" codefile="ADIOS.code">
<Function name="ADIOSCommonPluginInfo::SetupDatabase" user="false" member="true">
</Function>
</Attribute>
</Plugin>
......@@ -109,3 +109,4 @@ ADIOSCommonPluginInfo::SetupDatabase(const char *const *list,
return db;
}
Target: xml2info
Function: CarpetHDF5CommonPluginInfo::SetupDatabase
Declaration: virtual avtDatabase *CarpetHDF5CommonPluginInfo::SetupDatabase(const char *const *list, int nList, int nBlock);
Definition:
// ****************************************************************************
// Method: CarpetHDF5CommonPluginInfo::SetupDatabase
//
// Purpose:
// Sets up a CarpetHDF5 database.
//
// Arguments:
// list A list of file names.
// nList The number of timesteps in list.
// nBlocks The number of blocks in the list.
//
// Returns: A CarpetHDF5 database from list.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
avtDatabase *
CarpetHDF5CommonPluginInfo::SetupDatabase(const char *const *list,
int nList, int nBlock)
{
// ignore any nBlocks past 1
// NOTE from Christian Reisswig:
// Visit tries to be smart with grouping files together.
// This feature is switched on by default in the file selector menu.
// The effect is that Visit tries to open all bla.file_*.h5 files
// and treats them as different timesteps!
// To avoid this, we only open the first file by setting
// nTimestepGroups = 1.
int nTimestepGroups = 1; //nList / nBlock;
avtMTMDFileFormat **ffl = new avtMTMDFileFormat*[nTimestepGroups];
for (int i = 0 ; i < nTimestepGroups ; i++)
{
ffl[i] = new avtCarpetHDF5FileFormat(list[i*nBlock]);
}
avtMTMDFileFormatInterface *inter
= new avtMTMDFileFormatInterface(ffl, nTimestepGroups);
return new avtGenericDatabase(inter);
}
......@@ -21,6 +21,8 @@
avtCarpetHDF5FileFormat.C
H5Index.C
</Files>
<Attribute name="" purpose="" persistent="false" keyframe="true" exportAPI="" exportInclude="">
<Attribute name="" purpose="" persistent="false" keyframe="true" exportAPI="" exportInclude="" codefile="CarpetHDF5.code">
<Function name="CarpetHDF5CommonPluginInfo::SetupDatabase" user="false" member="true">
</Function>
</Attribute>
</Plugin>
......@@ -96,3 +96,4 @@ CarpetHDF5CommonPluginInfo::SetupDatabase(const char *const *list,
= new avtMTMDFileFormatInterface(ffl, nTimestepGroups);
return new avtGenericDatabase(inter);
}
......@@ -43,7 +43,7 @@
#include <CarpetHDF5PluginInfo.h>
#include <visit-config.h>
extern "C" DBP_EXPORT const char *CarpetHDF5VisItPluginVersion = VISIT_VERSION;
VISIT_PLUGIN_VERSION(CarpetHDF5,DBP_EXPORT)
// ****************************************************************************
// Function: GetGeneralInfo
......@@ -95,7 +95,7 @@ CarpetHDF5GeneralPluginInfo::GetName() const
const char *
CarpetHDF5GeneralPluginInfo::GetVersion() const
{
return "2.0";
return "2.1";
}
// ****************************************************************************
......@@ -114,7 +114,7 @@ CarpetHDF5GeneralPluginInfo::GetVersion() const
const char *
CarpetHDF5GeneralPluginInfo::GetID() const
{
return "CarpetHDF5_2.0";
return "CarpetHDF5_2.1";
}
// ****************************************************************************
// Method: CarpetHDF5GeneralPluginInfo::EnabledByDefault
......
......@@ -36,6 +36,7 @@ Definition:
// as domains so multiblock files work again.
//
// ****************************************************************************
#include <string>
avtDatabase *
ExodusCommonPluginInfo::SetupDatabase(const char *const *list,
......
......@@ -41,8 +41,6 @@
#include <avtMTSDFileFormatInterface.h>
#include <avtGenericDatabase.h>
#include <string>
// ****************************************************************************
// Method: ExodusCommonPluginInfo::GetDatabaseType
//
......@@ -173,3 +171,4 @@ ExodusCommonPluginInfo::SetupDatabase(const char *const *list,
= new avtMTSDFileFormatInterface(ffl, nTimestepGroups, nBlock);
return new avtGenericDatabase(inter);
}
<?xml version="1.0"?>
<Plugin name="Geqdsk" type="database" label="avtGeqdsk" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" dbtype="MTSD" haswriter="false" hasoptions="false" filePatternsStrict="false" opensWholeDirectory="false">
<Plugin name="Geqdsk" type="database" label="avtGeqdsk" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" dbtype="MTSD" haswriter="false" hasoptions="true" filePatternsStrict="false" opensWholeDirectory="false">
<CXXFLAGS>
${GEQDSK_INCLUDE_DIR}
</CXXFLAGS>
......
......@@ -11,8 +11,8 @@
${ZLIB_LIB}
</LIBS>
<FilePatterns>
*.h5nimrod
*.h5
*.h5nimrod
</FilePatterns>
<Files components="M">
avtH5NimrodFileFormat.C
......
......@@ -43,7 +43,7 @@
#include <MFIXCDFPluginInfo.h>
#include <visit-config.h>
extern "C" DBP_EXPORT const char *MFIXCDFVisItPluginVersion = VISIT_VERSION;
VISIT_PLUGIN_VERSION(MFIXCDF,DBP_EXPORT)
// ****************************************************************************
// Function: GetGeneralInfo
......
......@@ -42,8 +42,6 @@
#include <avtGenericDatabase.h>
#include <avtNASTRANOptions.h>
using namespace NASTRANDBOptions;
// ****************************************************************************
// Method: NASTRANCommonPluginInfo::GetDatabaseType
//
......
......@@ -185,7 +185,7 @@ OpenFOAMGeneralPluginInfo::GetDefaultFilePatterns() const
bool
OpenFOAMGeneralPluginInfo::AreDefaultFilePatternsStrict() const
{
return false;
return true;
}
// ****************************************************************************
......
......@@ -50,7 +50,7 @@ PixieCommonPluginInfo::SetupDatabase(const char *const *list,
{
for (int j = 0 ; j < nBlock ; j++)
{
ffl[i][j] = new avtPixieFileFormat(list[i*nBlock+j]);
ffl[i][j] = new avtPixieFileFormat(list[i*nBlock+j], readOptions);
}
}
}
......
Target: xml2info
Function: SiloCommonPluginInfo::SetReadOptions
Declaration: virtual void SiloCommonPluginInfo::SetReadOptions(DBOptionsAttributes *opts)
Definition:
// ****************************************************************************
// Method: SiloCommonPluginInfo::SetReadOptions
//
// Purpose: Override default method so can provide a way of handling obsolete
// options.
//
// Programmer: Mark C. Miller
// Creation: Mon Mar 16 23:32:25 PDT 2009
//
// Mark C. Miller, Wed Jul 21 16:11:52 PDT 2010
// Resurrected after getting clobbered in r8950.
// ****************************************************************************
#include <string>
#include <DBOptionsAttributes.h>
#include <DebugStream.h>
using namespace SiloDBOptions;
using std::string;
void
SiloCommonPluginInfo::SetReadOptions(DBOptionsAttributes *opts)
{
DBOptionsAttributes *defaultReadOptions = GetReadOptions();
for (int i = 0; i < opts->GetNumberOfOptions(); i++)
{
string optname = opts->GetName(i);
// We only care about handling obsolete options here
if (!opts->IsObsolete(optname) && !defaultReadOptions->IsObsolete(optname))
continue;
if (optname == SILO_RDOPT_IGNORE_SEXTS2)
{
int enumval = -1;
for (int j = 0; j < opts->GetNumberOfOptions(); j++)
{
if (opts->GetName(j) == SILO_RDOPT_IGNORE_SEXTS)
{
enumval = opts->GetEnum(SILO_RDOPT_IGNORE_SEXTS);
break;
}
}
if (enumval == -1 || enumval == 3) // Undef
{
debug1 << "Using old option \"" << SILO_RDOPT_IGNORE_SEXTS2
<< "\" to set new option \"" << SILO_RDOPT_IGNORE_SEXTS;
if (opts->GetBool(SILO_RDOPT_IGNORE_SEXTS2))
{
debug1 << "\" to Always" << endl;
opts->SetEnum(SILO_RDOPT_IGNORE_SEXTS, 0); // Always
}
else
{
debug1 << "\" to Never" << endl;
opts->SetEnum(SILO_RDOPT_IGNORE_SEXTS, 2); // Never
}
opts->SetEnumStrings(SILO_RDOPT_IGNORE_SEXTS, defaultReadOptions->GetEnumStrings(SILO_RDOPT_IGNORE_SEXTS));
}
}
else if (optname == SILO_RDOPT_IGNORE_DEXTS2)
{
int enumval = -1;
for (int j = 0; j < opts->GetNumberOfOptions(); j++)
{
if (opts->GetName(j) == SILO_RDOPT_IGNORE_DEXTS)
{
enumval = opts->GetEnum(SILO_RDOPT_IGNORE_DEXTS);
break;
}
}
if (enumval == -1 || enumval == 3) // Undef
{
debug1 << "Using old option \"" << SILO_RDOPT_IGNORE_DEXTS2
<< "\" to set new option \"" << SILO_RDOPT_IGNORE_DEXTS;
if (opts->GetBool(SILO_RDOPT_IGNORE_DEXTS2))
{
debug1 << "\" to Always" << endl;
opts->SetEnum(SILO_RDOPT_IGNORE_DEXTS, 0); // Always
}
else
{
debug1 << "\" to Never" << endl;
opts->SetEnum(SILO_RDOPT_IGNORE_DEXTS, 2); // Never
}
opts->SetEnumStrings(SILO_RDOPT_IGNORE_DEXTS, defaultReadOptions->GetEnumStrings(SILO_RDOPT_IGNORE_DEXTS));
}
}
}
delete defaultReadOptions;
readOptions = opts;
}
......@@ -24,6 +24,8 @@
avtSiloOptions.C
avtSiloWriter.C
</Files>
<Attribute name="" purpose="" persistent="true" keyframe="true" exportAPI="" exportInclude="">
<Attribute name="" purpose="" persistent="true" keyframe="true" exportAPI="" exportInclude="" codefile="Silo.code">
<Function name="SiloCommonPluginInfo::SetReadOptions" user="false" member="true">
</Function>
</Attribute>
</Plugin>
......@@ -36,18 +36,11 @@
*
*****************************************************************************/
#include <string>
#include <SiloPluginInfo.h>
#include <avtSiloFileFormat.h>
#include <avtSTMDFileFormatInterface.h>
#include <avtGenericDatabase.h>
#include <avtSiloOptions.h>
#include <DBOptionsAttributes.h>
#include <DebugStream.h>
using namespace SiloDBOptions;
using std::string;
// ****************************************************************************
// Method: SiloCommonPluginInfo::GetDatabaseType
......@@ -128,7 +121,6 @@ SiloCommonPluginInfo::GetWriteOptions() const
{
return GetSiloWriteOptions();
}
// ****************************************************************************
// Method: SiloCommonPluginInfo::SetReadOptions
//
......@@ -141,6 +133,13 @@ SiloCommonPluginInfo::GetWriteOptions() const
// Mark C. Miller, Wed Jul 21 16:11:52 PDT 2010
// Resurrected after getting clobbered in r8950.
// ****************************************************************************
#include <string>
#include <DBOptionsAttributes.h>
#include <DebugStream.h>
using namespace SiloDBOptions;
using std::string;
void
SiloCommonPluginInfo::SetReadOptions(DBOptionsAttributes *opts)
{
......@@ -216,3 +215,4 @@ SiloCommonPluginInfo::SetReadOptions(DBOptionsAttributes *opts)
readOptions = opts;
}
......@@ -61,8 +61,6 @@ class avtDatabaseWriter;
//
// Modifications:
//
// Mark C. Miller, Wed Jul 21 16:11:12 PDT 2010
// Resurrected SetReadOptions after clobbered in r8950
// ****************************************************************************
class SiloGeneralPluginInfo : public virtual GeneralDatabasePluginInfo
......@@ -86,7 +84,7 @@ class SiloCommonPluginInfo : public virtual CommonDatabasePluginInfo, public vir
int nList, int nBlock);
virtual DBOptionsAttributes *GetReadOptions() const;
virtual DBOptionsAttributes *GetWriteOptions() const;
virtual void SetReadOptions(DBOptionsAttributes *);
virtual void SetReadOptions(DBOptionsAttributes *);
};
class SiloMDServerPluginInfo : public virtual MDServerDatabasePluginInfo, public virtual SiloCommonPluginInfo
......
......@@ -43,7 +43,7 @@
#include <WPPImagePluginInfo.h>
#include <visit-config.h>
extern "C" DBP_EXPORT const char *WPPImageVisItPluginVersion = VISIT_VERSION;
VISIT_PLUGIN_VERSION(WPPImage,DBP_EXPORT)
// ****************************************************************************
// Function: GetGeneralInfo
......
......@@ -41,8 +41,6 @@
#include <avtSTSDFileFormatInterface.h>
#include <avtGenericDatabase.h>
using namespace std;
// ****************************************************************************
// Method: paraDIS_tecplotCommonPluginInfo::GetDatabaseType
//
......
......@@ -43,7 +43,7 @@
#include <unvPluginInfo.h>
#include <visit-config.h>
extern "C" DBP_EXPORT const char *unvVisItPluginVersion = VISIT_VERSION;
VISIT_PLUGIN_VERSION(unv,DBP_EXPORT)
// ****************************************************************************
// Function: GetGeneralInfo
......
......@@ -718,6 +718,9 @@ class InfoGeneratorPlugin : public Plugin
<< endl;
h << " virtual DBOptionsAttributes *GetWriteOptions() const;"
<< endl;
QString infoName = name + "CommonPluginInfo";
if(OverrideBuiltin(infoName + "::SetReadOptions"))
h << " virtual void SetReadOptions(DBOptionsAttributes *);" << endl;
}
h << "};" << endl;
h << "" << endl;
......@@ -1198,6 +1201,8 @@ class InfoGeneratorPlugin : public Plugin
c << " return Get"<<name<<"WriteOptions();" << endl;
c << "}" << endl;
}
funcName = name + "CommonPluginInfo::SetReadOptions";
ReplaceBuiltin(c, funcName);
}
}
......
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