Commit 80777a31 authored by hrchilds's avatar hrchilds

Update from May 27, 2005

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@477 18c085ea-50e0-402c-830e-de6fd14e8384
parent 911a960c
......@@ -263,21 +263,32 @@ cd ..
curdate=`date +%Y-%m-%d-%p%I%M`
theDay=`date +%A`
# set mode to run in
# set mode to run in (optimized mode is handled below)
modes="serial parallel scalable,parallel purify"
if test "$theDay" = "Sunday"; then
modes="hdf5 dlb serial,purify scalable,parallel,purify"
fi
case $theDay in
"Saturday")
modes="serial parallel scalable,parallel"
;;
"Sunday")
modes="hdf5 dlb serial scalable,parallel"
;;
esac
# set list of tests/modes to skip
skipList="scalable,parallel:tests/databases/boxlib.py \
scalable,parallel:tests/hybrid/locus.py \
dlb:tests/databases/global_node_ids.py \
dlb:tests/queries/pick.py \
purify:tests/databases/global_node_ids.py \
purify:tests/databases/pdbdatabase.py \
purify:tests/queries/queriesOverTime.py \
purify:tests/queries/pick.py"
serial:tests/databases/pdbdatabase.py \
parallel:tests/databases/pdbdatabase.py \
scalable,parallel:tests/databases/pdbdatabase.py \
hdf5:tests/databases/pdbdatabase.py \
dlb:tests/databases/pdbdatabase.py \
serial:tests/hybrid/timelock.py \
parallel:tests/hybrid/timelock.py \
scalable,parallel:tests/hybrid/timelock.py \
hdf5:tests/hybrid/timelock.py \
dlb:tests/hybrid/timelock.py"
# run the test(s)
error=0
......
// ************************************************************************* //
// DatabasePluginInfo.C //
// ************************************************************************* //
#include <DatabasePluginInfo.h>
#include <DBOptionsAttributes.h>
// ****************************************************************************
// Method: CommonDatabasePluginInfo constructor
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
CommonDatabasePluginInfo::CommonDatabasePluginInfo()
{
readOptions = NULL;
writeOptions = NULL;
}
// ****************************************************************************
// Method: CommonDatabasePluginInfo destructor
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
CommonDatabasePluginInfo::~CommonDatabasePluginInfo()
{
if (readOptions != NULL)
delete readOptions;
if (writeOptions != NULL)
delete writeOptions;
}
// ****************************************************************************
// Method: CommonDatabasePluginInfo::GetReadOptions
//
// Purpose:
// Gets the read options.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
DBOptionsAttributes *
CommonDatabasePluginInfo::GetReadOptions(void) const
{
DBOptionsAttributes *rv = new DBOptionsAttributes;
return rv;
}
// ****************************************************************************
// Method: CommonDatabasePluginInfo::GetWriteOptions
//
// Purpose:
// Gets the write options.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
DBOptionsAttributes *
CommonDatabasePluginInfo::GetWriteOptions(void) const
{
DBOptionsAttributes *rv = new DBOptionsAttributes;
return rv;
}
// ****************************************************************************
// Method: CommonDatabasePluginInfo::SetReadOptions
//
// Purpose:
// Sets the read options.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
void
CommonDatabasePluginInfo::SetReadOptions(DBOptionsAttributes *ro)
{
readOptions = ro;
}
// ****************************************************************************
// Method: CommonDatabasePluginInfo::SetWriteOptions
//
// Purpose:
// Sets the write options.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
void
CommonDatabasePluginInfo::SetWriteOptions(DBOptionsAttributes *wo)
{
writeOptions = wo;
}
......@@ -22,6 +22,7 @@ enum DatabaseType
// Forward declarations.
class avtDatabase;
class avtDatabaseWriter;
class DBOptionsAttributes;
// ****************************************************************************
// Class: *DatabasePluginInfo
......@@ -53,6 +54,9 @@ class avtDatabaseWriter;
// Hank Childs, Tue Mar 22 16:06:15 PST 2005
// Make destructor virtual.
//
// Hank Childs, Mon May 23 16:31:36 PDT 2005
// Add DBOptions.
//
// ****************************************************************************
class PLUGIN_API GeneralDatabasePluginInfo
......@@ -69,6 +73,9 @@ class PLUGIN_API GeneralDatabasePluginInfo
class PLUGIN_API CommonDatabasePluginInfo : public virtual GeneralDatabasePluginInfo
{
public:
CommonDatabasePluginInfo();
virtual ~CommonDatabasePluginInfo();
virtual DatabaseType GetDatabaseType() = 0;
virtual std::vector<std::string> GetDefaultExtensions()
{ std::vector<std::string> rv; return rv; };
......@@ -76,6 +83,15 @@ class PLUGIN_API CommonDatabasePluginInfo : public virtual GeneralDatabasePlugin
{ std::vector<std::string> rv; return rv; };
virtual avtDatabase *SetupDatabase(const char * const *list,
int nList, int nBlock) = 0;
virtual DBOptionsAttributes *GetReadOptions(void) const;
virtual DBOptionsAttributes *GetWriteOptions(void) const;
virtual void SetReadOptions(DBOptionsAttributes *);
virtual void SetWriteOptions(DBOptionsAttributes *);
protected:
DBOptionsAttributes *readOptions;
DBOptionsAttributes *writeOptions;
};
class PLUGIN_API MDServerDatabasePluginInfo : public virtual CommonDatabasePluginInfo
......
......@@ -65,6 +65,9 @@
# Jeremy Meredith, Thu Aug 22 13:56:49 PDT 2002
# Added database plugins.
#
# Hank Childs, Mon May 23 17:21:33 PDT 2005
# Add database plugins.
#
##############################################################################
##
......@@ -84,7 +87,7 @@ CPPFLAGS=@CPPFLAGS@ -I. -I../../include -I../../include/visit
##
SRC=PluginManager.C DatabasePluginManager.C \
PlotPluginManager.C OperatorPluginManager.C \
InvalidDirectoryException.C InvalidPluginException.C
InvalidDirectoryException.C InvalidPluginException.C DatabasePluginInfo.C
OBJ=$(SRC:.C=.o)
LIB=libplugin
......
This diff is collapsed.
Function: FindIndex
Declaration: int FindIndex(const std::string &name);
Definition:
// ****************************************************************************
// Method: DBOptionsAttributes::FindIndex
//
// Purpose:
// Finds the index of a member.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
int
DBOptionsAttributes::FindIndex(const std::string &name)
{
for (int i = 0 ; i < names.size() ; i++)
if (names[i] == name)
{
// Now find the index within its type.
int nMatches = 0;
for (int j = 0 ; j < i ; j++)
if (types[j] == types[i])
nMatches++;
return nMatches;
}
return -1;
}
Function: SetBool
Declaration: void SetBool(const std::string &name, bool defaultValue);
Definition:
// ****************************************************************************
// Method: DBOptionsAttributes::SetBool
//
// Purpose:
// Sets a boolean value.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
void
DBOptionsAttributes::SetBool(const std::string &name, bool defaultValue)
{
int bIndex = FindIndex(name);
if (bIndex < 0)
{
names.push_back(name);
types.push_back(Bool);
optBools.push_back(defaultValue);
}
else
optBools[bIndex] = defaultValue;
}
Function: GetBool
Declaration: bool GetBool(const std::string &name);
Definition:
// ****************************************************************************
// Method: DBOptionsAttributes::GetBool
//
// Purpose:
// Gets a boolean value.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
bool
DBOptionsAttributes::GetBool(const std::string &name)
{
int bIndex = FindIndex(name);
if (bIndex < 0)
EXCEPTION0(BadDeclareFormatString);
return (bool) optBools[bIndex];
}
Function: SetFloat
Declaration: void SetFloat(const std::string &name, float defaultValue);
Definition:
// ****************************************************************************
// Method: DBOptionsAttributes::SetFloat
//
// Purpose:
// Sets a floating point value.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
void
DBOptionsAttributes::SetFloat(const std::string &name, float defaultValue)
{
int bIndex = FindIndex(name);
if (bIndex < 0)
{
names.push_back(name);
types.push_back(Float);
optFloats.push_back(defaultValue);
}
else
optFloats[bIndex] = defaultValue;
}
Function: GetFloat
Declaration: float GetFloat(const std::string &name);
Definition:
// ****************************************************************************
// Method: DBOptionsAttributes::GetFloat
//
// Purpose:
// Gets a floating point value.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
float
DBOptionsAttributes::GetFloat(const std::string &name)
{
int bIndex = FindIndex(name);
if (bIndex < 0)
EXCEPTION0(BadDeclareFormatString);
return (float) optFloats[bIndex];
}
Function: SetDouble
Declaration: void SetDouble(const std::string &name, double defaultValue);
Definition:
// ****************************************************************************
// Method: DBOptionsAttributes::SetDouble
//
// Purpose:
// Sets a double precision value.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
void
DBOptionsAttributes::SetDouble(const std::string &name, double defaultValue)
{
int bIndex = FindIndex(name);
if (bIndex < 0)
{
names.push_back(name);
types.push_back(Double);
optDoubles.push_back(defaultValue);
}
else
optDoubles[bIndex] = defaultValue;
}
Function: GetDouble
Declaration: double GetDouble(const std::string &name);
Definition:
// ****************************************************************************
// Method: DBOptionsAttributes::GetDouble
//
// Purpose:
// Gets a double precision value.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
double
DBOptionsAttributes::GetDouble(const std::string &name)
{
int bIndex = FindIndex(name);
if (bIndex < 0)
EXCEPTION0(BadDeclareFormatString);
return optDoubles[bIndex];
}
Function: SetInt
Declaration: void SetInt(const std::string &name, int defaultValue);
Definition:
// ****************************************************************************
// Method: DBOptionsAttributes::SetInt
//
// Purpose:
// Sets an integer value.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
void
DBOptionsAttributes::SetInt(const std::string &name, int defaultValue)
{
int bIndex = FindIndex(name);
if (bIndex < 0)
{
names.push_back(name);
types.push_back(Int);
optInts.push_back(defaultValue);
}
else
optInts[bIndex] = defaultValue;
}
Function: GetInt
Declaration: int GetInt(const std::string &name);
Definition:
// ****************************************************************************
// Method: DBOptionsAttributes::GetInt
//
// Purpose:
// Gets an integer value.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
int
DBOptionsAttributes::GetInt(const std::string &name)
{
int bIndex = FindIndex(name);
if (bIndex < 0)
EXCEPTION0(BadDeclareFormatString);
return optInts[bIndex];
}
Function: SetString
Declaration: void SetString(const std::string &name, const std::string &defaultValue);
Definition:
// ****************************************************************************
// Method: DBOptionsAttributes::SetString
//
// Purpose:
// Sets a string value.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
void
DBOptionsAttributes::SetString(const std::string &name, const std::string &defaultValue)
{
int bIndex = FindIndex(name);
if (bIndex < 0)
{
names.push_back(name);
types.push_back(String);
optStrings.push_back(defaultValue);
}
else
optStrings[bIndex] = defaultValue;
}
Function: GetString
Declaration: const std::string &GetString(const std::string &name);
Definition:
// ****************************************************************************
// Method: DBOptionsAttributes::GetString
//
// Purpose:
// Gets a string value.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
const std::string &
DBOptionsAttributes::GetString(const std::string &name)
{
int bIndex = FindIndex(name);
if (bIndex < 0)
EXCEPTION0(BadDeclareFormatString);
return optStrings[bIndex];
}
Function: SetEnum
Declaration: void SetEnum(const std::string &name, int defaultValue);
Definition:
// ****************************************************************************
// Method: DBOptionsAttributes::SetEnum
//
// Purpose:
// Sets a enumerated value (encoded as int).
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
void
DBOptionsAttributes::SetEnum(const std::string &name, int defaultValue)
{
int bIndex = FindIndex(name);
if (bIndex < 0)
{
names.push_back(name);
types.push_back(Enum);
optEnums.push_back(defaultValue);
}
else
optEnums[bIndex] = defaultValue;
}
Function: GetEnum
Declaration: int GetEnum(const std::string &name);
Definition:
// ****************************************************************************
// Method: DBOptionsAttributes::GetEnum
//
// Purpose:
// Gets a enumerated value (encoded as int).
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
int
DBOptionsAttributes::GetEnum(const std::string &name)
{
int bIndex = FindIndex(name);
if (bIndex < 0)
EXCEPTION0(BadDeclareFormatString);
return optEnums[bIndex];
}
Function: SetEnumStrings
Declaration: void SetEnumStrings(const std::string &name, const std::vector<std::string> &values);
Definition:
// ****************************************************************************
// Method: DBOptionsAttributes::SetEnumStrings
//
// Purpose:
// Sets the strings for an enumerated type.
//
// Programmer: Hank Childs
// Creation: May 23, 2005
//
// ****************************************************************************
void
DBOptionsAttributes::SetEnumStrings(const std::string &name,
const std::vector<std::string> &values)
{
int eIndex = FindIndex(name);
if (eIndex < 0)
EXCEPTION0(BadDeclareFormatString);
int numEnums = optEnums.size();
std::vector<std::string> newList;
int idx = 0;
for (int i = 0 ; i < numEnums ; i++)
{
if (i == eIndex)
{
for (int j = 0 ; j < values.size() ; j++)
newList.push_back(values[j]);
}
else
{
for (int j = 0 ; j < enumStringsSizes[i] ; j++)
newList.push_back(enumStrings[idx+j]);
}
idx += enumStringsSizes[i];
}
enumStrings = newList;
enumStringsSizes[eIndex] = values.size();
}
Function: GetNumberOfOptions
Declaration: int GetNumberOfOptions(void);
Definition:
int
DBOptionsAttributes::GetNumberOfOptions(void)
{
return names.size();
}
Function: GetType
Declaration: DBOptionsAttributes::OptionType GetType(int);
Definition:
DBOptionsAttributes::OptionType