Commit 1cd70c04 authored by hrchilds's avatar hrchilds
Browse files

Update from May 4, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@234 18c085ea-50e0-402c-830e-de6fd14e8384
parent ba9d1ea2
......@@ -51,13 +51,13 @@ PickAttributes::PickType_FromString(const std::string &s, PickAttributes::PickTy
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
// ****************************************************************************
PickAttributes::PickAttributes() : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFFFsii*s*s*s*s*s*ba*s*b")
PickAttributes::PickAttributes() : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFFFsii*s*s*s*s*s*ba*s*bsb")
{
variables.push_back("default");
displayIncidentElements = true;
......@@ -99,6 +99,7 @@ PickAttributes::PickAttributes() : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFF
realElementNumber = -1;
needTransformMessage = false;
doTimeCurve = false;
error = false;
}
// ****************************************************************************
......@@ -110,13 +111,13 @@ PickAttributes::PickAttributes() : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFF
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
// ****************************************************************************
PickAttributes::PickAttributes(const PickAttributes &obj) : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFFFsii*s*s*s*s*s*ba*s*b")
PickAttributes::PickAttributes(const PickAttributes &obj) : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFFFsii*s*s*s*s*s*ba*s*bsb")
{
AttributeGroupVector::const_iterator pos;
int i;
......@@ -190,6 +191,8 @@ PickAttributes::PickAttributes(const PickAttributes &obj) : AttributeSubject("s*
invalidVars = obj.invalidVars;
doTimeCurve = obj.doTimeCurve;
errorMessage = obj.errorMessage;
error = obj.error;
SelectAll();
}
......@@ -203,7 +206,7 @@ PickAttributes::PickAttributes(const PickAttributes &obj) : AttributeSubject("s*
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -227,7 +230,7 @@ PickAttributes::~PickAttributes()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -308,6 +311,8 @@ PickAttributes::operator = (const PickAttributes &obj)
invalidVars = obj.invalidVars;
doTimeCurve = obj.doTimeCurve;
errorMessage = obj.errorMessage;
error = obj.error;
SelectAll();
}
......@@ -321,7 +326,7 @@ PickAttributes::operator = (const PickAttributes &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -409,7 +414,9 @@ PickAttributes::operator == (const PickAttributes &obj) const
(needTransformMessage == obj.needTransformMessage) &&
varInfo_equal &&
(invalidVars == obj.invalidVars) &&
(doTimeCurve == obj.doTimeCurve));
(doTimeCurve == obj.doTimeCurve) &&
(errorMessage == obj.errorMessage) &&
(error == obj.error));
}
// ****************************************************************************
......@@ -421,7 +428,7 @@ PickAttributes::operator == (const PickAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -442,7 +449,7 @@ PickAttributes::operator != (const PickAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -463,7 +470,7 @@ PickAttributes::TypeName() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -491,7 +498,7 @@ PickAttributes::CopyAttributes(const AttributeGroup *atts)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -517,7 +524,7 @@ PickAttributes::CreateCompatible(const std::string &tname) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -544,7 +551,7 @@ PickAttributes::NewInstance(bool copy) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -591,6 +598,8 @@ PickAttributes::SelectAll()
Select(35, (void *)&varInfo);
Select(36, (void *)&invalidVars);
Select(37, (void *)&doTimeCurve);
Select(38, (void *)&errorMessage);
Select(39, (void *)&error);
}
// ****************************************************************************
......@@ -602,7 +611,7 @@ PickAttributes::SelectAll()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -1027,6 +1036,20 @@ PickAttributes::SetDoTimeCurve(bool doTimeCurve_)
Select(37, (void *)&doTimeCurve);
}
void
PickAttributes::SetErrorMessage(const std::string &errorMessage_)
{
errorMessage = errorMessage_;
Select(38, (void *)&errorMessage);
}
void
PickAttributes::SetError(bool error_)
{
error = error_;
Select(39, (void *)&error);
}
///////////////////////////////////////////////////////////////////////////////
// Get property methods
///////////////////////////////////////////////////////////////////////////////
......@@ -1379,6 +1402,24 @@ PickAttributes::GetDoTimeCurve() const
return doTimeCurve;
}
const std::string &
PickAttributes::GetErrorMessage() const
{
return errorMessage;
}
std::string &
PickAttributes::GetErrorMessage()
{
return errorMessage;
}
bool
PickAttributes::GetError() const
{
return error;
}
///////////////////////////////////////////////////////////////////////////////
// Select property methods
///////////////////////////////////////////////////////////////////////////////
......@@ -1503,6 +1544,12 @@ PickAttributes::SelectInvalidVars()
Select(36, (void *)&invalidVars);
}
void
PickAttributes::SelectErrorMessage()
{
Select(38, (void *)&errorMessage);
}
///////////////////////////////////////////////////////////////////////////////
// AttributeGroupVector convenience methods.
///////////////////////////////////////////////////////////////////////////////
......@@ -1516,7 +1563,7 @@ PickAttributes::SelectInvalidVars()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -1541,7 +1588,7 @@ PickAttributes::AddPickVarInfo(const PickVarInfo &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -1569,7 +1616,7 @@ PickAttributes::ClearPickVarInfos()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -1604,7 +1651,7 @@ PickAttributes::RemovePickVarInfo(int index)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -1625,7 +1672,7 @@ PickAttributes::GetNumPickVarInfos() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -1646,7 +1693,7 @@ PickAttributes::GetPickVarInfo(int i)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -1667,7 +1714,7 @@ PickAttributes::GetPickVarInfo(int i) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -1688,7 +1735,7 @@ PickAttributes::operator [] (int i)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -1713,7 +1760,7 @@ PickAttributes::operator [] (int i) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -1762,6 +1809,8 @@ PickAttributes::GetFieldName(int index) const
case 35: return "varInfo";
case 36: return "invalidVars";
case 37: return "doTimeCurve";
case 38: return "errorMessage";
case 39: return "error";
default: return "invalid index";
}
}
......@@ -1775,7 +1824,7 @@ PickAttributes::GetFieldName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -1824,6 +1873,8 @@ PickAttributes::GetFieldType(int index) const
case 35: return FieldType_attVector;
case 36: return FieldType_stringVector;
case 37: return FieldType_bool;
case 38: return FieldType_string;
case 39: return FieldType_bool;
default: return FieldType_unknown;
}
}
......@@ -1837,7 +1888,7 @@ PickAttributes::GetFieldType(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -1886,6 +1937,8 @@ PickAttributes::GetFieldTypeName(int index) const
case 35: return "attVector";
case 36: return "stringVector";
case 37: return "bool";
case 38: return "string";
case 39: return "bool";
default: return "invalid index";
}
}
......@@ -1899,7 +1952,7 @@ PickAttributes::GetFieldTypeName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -2143,6 +2196,16 @@ PickAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) const
retval = (doTimeCurve == obj.doTimeCurve);
}
break;
case 38:
{ // new scope
retval = (errorMessage == obj.errorMessage);
}
break;
case 39:
{ // new scope
retval = (error == obj.error);
}
break;
default: retval = false;
}
......@@ -2358,6 +2421,12 @@ PickAttributes::PrintSelf(ostream &os)
void
PickAttributes::CreateOutputString(std::string &os, bool withLetter)
{
if (error)
{
os = errorMessage;
return;
}
if (!fulfilled)
return;
......@@ -2656,5 +2725,8 @@ PickAttributes::PrepareForNewPick()
if (!invalidVars.empty())
invalidVars.clear();
errorMessage = "";
error = false;
}
......@@ -209,6 +209,12 @@ Definition:
void
PickAttributes::CreateOutputString(std::string &os, bool withLetter)
{
if (error)
{
os = errorMessage;
return;
}
if (!fulfilled)
return;
......@@ -510,6 +516,9 @@ PickAttributes::PrepareForNewPick()
if (!invalidVars.empty())
invalidVars.clear();
errorMessage = "";
error = false;
}
Function: SetFromNode
......
......@@ -15,7 +15,7 @@ class PickVarInfo;
// Notes: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Apr 1 18:53:03 PST 2004
// Creation: Tue May 4 13:33:25 PST 2004
//
// Modifications:
//
......@@ -67,6 +67,7 @@ public:
void SelectBzoneCoords();
void SelectVarInfo();
void SelectInvalidVars();
void SelectErrorMessage();
// Property setting methods
void SetVariables(const stringVector &variables_);
......@@ -107,6 +108,8 @@ public:
void SetVarInfo(const AttributeGroupVector &varInfo_);
void SetInvalidVars(const stringVector &invalidVars_);
void SetDoTimeCurve(bool doTimeCurve_);
void SetErrorMessage(const std::string &errorMessage_);
void SetError(bool error_);
// Property getting methods
const stringVector &GetVariables() const;
......@@ -167,6 +170,9 @@ public:
const stringVector &GetInvalidVars() const;
stringVector &GetInvalidVars();
bool GetDoTimeCurve() const;
const std::string &GetErrorMessage() const;
std::string &GetErrorMessage();
bool GetError() const;
// Persistence methods
virtual bool CreateNode(DataNode *node, bool completeSave, bool forceAdd);
......@@ -242,6 +248,8 @@ private:
AttributeGroupVector varInfo;
stringVector invalidVars;
bool doTimeCurve;
std::string errorMessage;
bool error;
};
#endif
......@@ -122,6 +122,11 @@
<Field name="doTimeCurve" label="doTimeCurve" type="bool">
false
</Field>
<Field name="errorMessage" label="errorMessage" type="string" internal="true">
</Field>
<Field name="error" label="error" type="bool" internal="true">
false
</Field>
<Function name="PrintSelf" user="true" member="true">
</Function>
<Function name="CreateOutputString" user="true" member="true">
......
......@@ -95,11 +95,13 @@ avtSTMDFileFormatInterface::~avtSTMDFileFormatInterface()
// Creation: February 22, 2001
//
// Modifications:
//
// Hank Childs, Fri Dec 5 11:08:54 PST 2003
// Try to handle bad timesteps, since the viewer's state is out-of-whack
// and a fix cannot get in by 1.2.5.
//
// Brad Whitlock, Tue May 4 13:47:45 PST 2004
// Reenabled exception.
//.
// ****************************************************************************
vtkDataSet *
......@@ -107,11 +109,7 @@ avtSTMDFileFormatInterface::GetMesh(int ts, int dom, const char *mesh)
{
if (ts < 0 || ts >= nTimesteps)
{
//EXCEPTION2(BadIndexException, ts, nTimesteps);
debug1 << "INTERNAL ERROR: bad timestep = " << ts << " out of "
<< nTimesteps << ". To avoid a crash, ignorning fix until "
<< "state issues are resolved." << endl;
ts = nTimesteps-1;
EXCEPTION2(BadIndexException, ts, nTimesteps);
}
return timesteps[ts]->GetMesh(dom, mesh);
......@@ -142,6 +140,9 @@ avtSTMDFileFormatInterface::GetMesh(int ts, int dom, const char *mesh)
// Try to handle bad timesteps, since the viewer's state is out-of-whack
// and a fix cannot get in by 1.2.5.
//
// Brad Whitlock, Tue May 4 13:47:45 PST 2004
// Reenabled exception.
//
// ****************************************************************************
vtkDataArray *
......@@ -149,11 +150,7 @@ avtSTMDFileFormatInterface::GetVar(int ts, int dom, const char *var)
{
if (ts < 0 || ts >= nTimesteps)
{
//EXCEPTION2(BadIndexException, ts, nTimesteps);
debug1 << "INTERNAL ERROR: bad timestep = " << ts << " out of "
<< nTimesteps << ". To avoid a crash, ignorning fix until "
<< "state issues are resolved." << endl;
ts = nTimesteps-1;
EXCEPTION2(BadIndexException, ts, nTimesteps);
}
return timesteps[ts]->GetVar(dom, var);
......@@ -184,6 +181,9 @@ avtSTMDFileFormatInterface::GetVar(int ts, int dom, const char *var)
// Try to handle bad timesteps, since the viewer's state is out-of-whack
// and a fix cannot get in by 1.2.5.
//
// Brad Whitlock, Tue May 4 13:47:45 PST 2004
// Reenabled exception.
//
// ****************************************************************************
vtkDataArray *
......@@ -191,11 +191,7 @@ avtSTMDFileFormatInterface::GetVectorVar(int ts, int dom, const char *var)
{
if (ts < 0 || ts >= nTimesteps)
{
//EXCEPTION2(BadIndexException, ts, nTimesteps);
debug1 << "INTERNAL ERROR: bad timestep = " << ts << " out of "
<< nTimesteps << ". To avoid a crash, ignorning fix until "
<< "state issues are resolved." << endl;
ts = nTimesteps-1;
EXCEPTION2(BadIndexException, ts, nTimesteps);
}
return timesteps[ts]->GetVectorVar(dom, var);
......@@ -221,11 +217,13 @@ avtSTMDFileFormatInterface::GetVectorVar(int ts, int dom, const char *var)
// Craetion: February 22, 2001
//
// Modifications:
//
// Hank Childs, Fri Dec 5 11:08:54 PST 2003
// Try to handle bad timesteps, since the viewer's state is out-of-whack
// and a fix cannot get in by 1.2.5.
//
// Brad Whitlock, Tue May 4 13:47:45 PST 2004
// Reenabled exception.
//
// ****************************************************************************
void *
......@@ -235,11 +233,7 @@ avtSTMDFileFormatInterface::GetAuxiliaryData(const char *var, int ts, int dom,
{
if (ts < 0 || ts >= nTimesteps)
{
//EXCEPTION2(BadIndexException, ts, nTimesteps);
debug1 << "INTERNAL ERROR: bad timestep = " << ts << " out of "
<< nTimesteps << ". To avoid a crash, ignorning fix until "
<< "state issues are resolved." << endl;
ts = nTimesteps-1;
EXCEPTION2(BadIndexException, ts, nTimesteps);
}
return timesteps[ts]->GetAuxiliaryData(var, dom, type, args, df);
......@@ -256,11 +250,13 @@ avtSTMDFileFormatInterface::GetAuxiliaryData(const char *var, int ts, int dom,
// Creation: March 12, 2002
//
// Modifications:
//
// Hank Childs, Fri Dec 5 11:08:54 PST 2003
// Try to handle bad timesteps, since the viewer's state is out-of-whack
// and a fix cannot get in by 1.2.5.
//
// Brad Whitlock, Tue May 4 13:47:45 PST 2004
// Reenabled exception.
//
// ****************************************************************************
const char *
......@@ -268,11 +264,7 @@ avtSTMDFileFormatInterface::GetFilename(int ts)
{
if (ts < 0 || ts >= nTimesteps)
{
//EXCEPTION2(BadIndexException, ts, nTimesteps);
debug1 << "INTERNAL ERROR: bad timestep = " << ts << " out of "
<< nTimesteps << ". To avoid a crash, ignorning fix until "
<< "state issues are resolved." << endl;
ts = nTimesteps-1;
EXCEPTION2(BadIndexException, ts, nTimesteps);
}
return timesteps[ts]->GetFilename();
......@@ -305,6 +297,9 @@ avtSTMDFileFormatInterface::GetFilename(int ts)
// Try to handle bad timesteps, since the viewer's state is out-of-whack
// and a fix cannot get in by 1.2.5.
//
// Brad Whitlock, Tue May 4 13:47:45 PST 2004
// Reenabled exception.
//
// ****************************************************************************
void
......@@ -316,11 +311,7 @@ avtSTMDFileFormatInterface::SetDatabaseMetaData(avtDatabaseMetaData *md,
//
if(timeState < 0 || timeState >= nTimesteps)
{
//EXCEPTION2(BadIndexException, timeState, nTimesteps);
debug1 << "INTERNAL ERROR: bad timestep = " << timeState << " out of "
<< nTimesteps << ". To avoid a crash, ignorning fix until "
<< "state issues are resolved." << endl;
timeState = nTimesteps-1;
EXCEPTION2(BadIndexException, timeState, nTimesteps);
}
//
......@@ -395,6 +386,9 @@ avtSTMDFileFormatInterface::SetDatabaseMetaData(avtDatabaseMetaData *md,
// Try to handle bad timesteps, since the viewer's state is out-of-whack
// and a fix cannot get in by 1.2.5.
//
// Brad Whitlock, Tue May 4 13:47:45 PST 2004
// Reenabled exception.
//
// ****************************************************************************
void
......@@ -411,11 +405,7 @@ avtSTMDFileFormatInterface::FreeUpResources(int ts, int)
{
if (ts < 0 || ts >= nTimesteps)
{
//EXCEPTION2(BadIndexException, ts, nTimesteps);
debug1 << "INTERNAL ERROR: bad timestep = " << ts << " out of "
<< nTimesteps << ". To avoid a crash, ignorning fix until "
<< "state issues are resolved." << endl;
ts = nTimesteps-1;
EXCEPTION2(BadIndexException, ts, nTimesteps);
}
timesteps[ts]->FreeUpResources();
}
......@@ -431,6 +421,10 @@ avtSTMDFileFormatInterface::FreeUpResources(int ts, int)
// Programmer: Mark C. Miller
// Creation: February 23, 2004
//
// Modifications:
// Brad Whitlock, Tue May 4 13:47:45 PST 2004
// Reenabled e