Commit b21e77f1 authored by hrchilds's avatar hrchilds

Update from June 2, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@254 18c085ea-50e0-402c-830e-de6fd14e8384
parent b062997a
......@@ -10,20 +10,21 @@
static const char *PickType_strings[] = {
"Zone", "Node", "CurveZone",
"CurveNode"};
"CurveNode", "DomainZone", "DomainNode"
};
std::string
PickAttributes::PickType_ToString(PickAttributes::PickType t)
{
int index = int(t);
if(index < 0 || index >= 4) index = 0;
if(index < 0 || index >= 6) index = 0;
return PickType_strings[index];
}
std::string
PickAttributes::PickType_ToString(int t)
{
int index = (t < 0 || t >= 4) ? 0 : t;
int index = (t < 0 || t >= 6) ? 0 : t;
return PickType_strings[index];
}
......@@ -31,7 +32,7 @@ bool
PickAttributes::PickType_FromString(const std::string &s, PickAttributes::PickType &val)
{
val = PickAttributes::Zone;
for(int i = 0; i < 4; ++i)
for(int i = 0; i < 6; ++i)
{
if(s == PickType_strings[i])
{
......@@ -51,13 +52,13 @@ PickAttributes::PickType_FromString(const std::string &s, PickAttributes::PickTy
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
// ****************************************************************************
PickAttributes::PickAttributes() : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFFFsii*s*s*s*s*s*ba*s*bsb")
PickAttributes::PickAttributes() : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFFFsii*s*s*s*s*s*ba*s*bsbbb")
{
variables.push_back("default");
displayIncidentElements = true;
......@@ -100,6 +101,8 @@ PickAttributes::PickAttributes() : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFF
needTransformMessage = false;
doTimeCurve = false;
error = false;
matSelected = false;
needActualCoords = false;
}
// ****************************************************************************
......@@ -111,13 +114,13 @@ PickAttributes::PickAttributes() : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFF
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
// ****************************************************************************
PickAttributes::PickAttributes(const PickAttributes &obj) : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFFFsii*s*s*s*s*s*ba*s*bsb")
PickAttributes::PickAttributes(const PickAttributes &obj) : AttributeSubject("s*bbbbbbbbbsbiiii*iissFFFFFFsii*s*s*s*s*s*ba*s*bsbbb")
{
AttributeGroupVector::const_iterator pos;
int i;
......@@ -193,6 +196,8 @@ PickAttributes::PickAttributes(const PickAttributes &obj) : AttributeSubject("s*
doTimeCurve = obj.doTimeCurve;
errorMessage = obj.errorMessage;
error = obj.error;
matSelected = obj.matSelected;
needActualCoords = obj.needActualCoords;
SelectAll();
}
......@@ -206,7 +211,7 @@ PickAttributes::PickAttributes(const PickAttributes &obj) : AttributeSubject("s*
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -230,7 +235,7 @@ PickAttributes::~PickAttributes()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -313,6 +318,8 @@ PickAttributes::operator = (const PickAttributes &obj)
doTimeCurve = obj.doTimeCurve;
errorMessage = obj.errorMessage;
error = obj.error;
matSelected = obj.matSelected;
needActualCoords = obj.needActualCoords;
SelectAll();
}
......@@ -326,7 +333,7 @@ PickAttributes::operator = (const PickAttributes &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -416,7 +423,9 @@ PickAttributes::operator == (const PickAttributes &obj) const
(invalidVars == obj.invalidVars) &&
(doTimeCurve == obj.doTimeCurve) &&
(errorMessage == obj.errorMessage) &&
(error == obj.error));
(error == obj.error) &&
(matSelected == obj.matSelected) &&
(needActualCoords == obj.needActualCoords));
}
// ****************************************************************************
......@@ -428,7 +437,7 @@ PickAttributes::operator == (const PickAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -449,7 +458,7 @@ PickAttributes::operator != (const PickAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -470,7 +479,7 @@ PickAttributes::TypeName() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -498,7 +507,7 @@ PickAttributes::CopyAttributes(const AttributeGroup *atts)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -524,7 +533,7 @@ PickAttributes::CreateCompatible(const std::string &tname) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -551,7 +560,7 @@ PickAttributes::NewInstance(bool copy) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -600,6 +609,8 @@ PickAttributes::SelectAll()
Select(37, (void *)&doTimeCurve);
Select(38, (void *)&errorMessage);
Select(39, (void *)&error);
Select(40, (void *)&matSelected);
Select(41, (void *)&needActualCoords);
}
// ****************************************************************************
......@@ -611,7 +622,7 @@ PickAttributes::SelectAll()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -1050,6 +1061,20 @@ PickAttributes::SetError(bool error_)
Select(39, (void *)&error);
}
void
PickAttributes::SetMatSelected(bool matSelected_)
{
matSelected = matSelected_;
Select(40, (void *)&matSelected);
}
void
PickAttributes::SetNeedActualCoords(bool needActualCoords_)
{
needActualCoords = needActualCoords_;
Select(41, (void *)&needActualCoords);
}
///////////////////////////////////////////////////////////////////////////////
// Get property methods
///////////////////////////////////////////////////////////////////////////////
......@@ -1420,6 +1445,18 @@ PickAttributes::GetError() const
return error;
}
bool
PickAttributes::GetMatSelected() const
{
return matSelected;
}
bool
PickAttributes::GetNeedActualCoords() const
{
return needActualCoords;
}
///////////////////////////////////////////////////////////////////////////////
// Select property methods
///////////////////////////////////////////////////////////////////////////////
......@@ -1563,7 +1600,7 @@ PickAttributes::SelectErrorMessage()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -1588,7 +1625,7 @@ PickAttributes::AddPickVarInfo(const PickVarInfo &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -1616,7 +1653,7 @@ PickAttributes::ClearPickVarInfos()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -1651,7 +1688,7 @@ PickAttributes::RemovePickVarInfo(int index)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -1672,7 +1709,7 @@ PickAttributes::GetNumPickVarInfos() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -1693,7 +1730,7 @@ PickAttributes::GetPickVarInfo(int i)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -1714,7 +1751,7 @@ PickAttributes::GetPickVarInfo(int i) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -1735,7 +1772,7 @@ PickAttributes::operator [] (int i)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -1760,7 +1797,7 @@ PickAttributes::operator [] (int i) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -1811,6 +1848,8 @@ PickAttributes::GetFieldName(int index) const
case 37: return "doTimeCurve";
case 38: return "errorMessage";
case 39: return "error";
case 40: return "matSelected";
case 41: return "needActualCoords";
default: return "invalid index";
}
}
......@@ -1824,7 +1863,7 @@ PickAttributes::GetFieldName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -1875,6 +1914,8 @@ PickAttributes::GetFieldType(int index) const
case 37: return FieldType_bool;
case 38: return FieldType_string;
case 39: return FieldType_bool;
case 40: return FieldType_bool;
case 41: return FieldType_bool;
default: return FieldType_unknown;
}
}
......@@ -1888,7 +1929,7 @@ PickAttributes::GetFieldType(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -1939,6 +1980,8 @@ PickAttributes::GetFieldTypeName(int index) const
case 37: return "bool";
case 38: return "string";
case 39: return "bool";
case 40: return "bool";
case 41: return "bool";
default: return "invalid index";
}
}
......@@ -1952,7 +1995,7 @@ PickAttributes::GetFieldTypeName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 4 13:33:25 PST 2004
// Creation: Tue Jun 1 16:47:03 PST 2004
//
// Modifications:
//
......@@ -2206,6 +2249,16 @@ PickAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) const
retval = (error == obj.error);
}
break;
case 40:
{ // new scope
retval = (matSelected == obj.matSelected);
}
break;
case 41:
{ // new scope
retval = (needActualCoords == obj.needActualCoords);
}
break;
default: retval = false;
}
......@@ -2239,6 +2292,9 @@ PickAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) const
// Kathleen Bonnell, Wed Dec 17 15:19:46 PST 2003
// Support multiple types of coordinates.
//
// Kathleen Bonnell, Tue Jun 1 16:44:44 PDT 2004
// Support new pick types 'DomainNode', 'DomainZone'.
//
// ****************************************************************************
void
PickAttributes::PrintSelf(ostream &os)
......@@ -2301,7 +2357,7 @@ PickAttributes::PrintSelf(ostream &os)
<< cellPoint[2] << ">\n";
}
}
if (pickType == Zone)
if (pickType == Zone || pickType == DomainZone)
{
os << "Zone " ;
if (showZoneId)
......@@ -2316,7 +2372,7 @@ PickAttributes::PrintSelf(ostream &os)
}
os << "\n";
}
else if (pickType == Node)
else if (pickType == Node || pickType == DomainNode)
{
os << "Node ";
if (showNodeId)
......@@ -2338,12 +2394,12 @@ PickAttributes::PrintSelf(ostream &os)
if (displayIncidentElements)
{
bool showId;
if (pickType == Zone)
if (pickType == Zone || pickType == DomainZone)
{
os << "Incident Nodes " ;
showId = showNodeId;
}
else if (pickType == Node)
else if (pickType == Node || pickType == DomainNode)
{
os << "Incident Zones " ;
showId = showZoneId;
......@@ -2352,7 +2408,7 @@ PickAttributes::PrintSelf(ostream &os)
{
if (showId)
os << incidentElements[i] << " ";
if (pickType == Zone)
if (pickType == Zone || pickType == DomainZone)
{
if (showNodePhysicalCoords && !pnodeCoords.empty())
os << " " << pnodeCoords[i].c_str() << "\n";
......@@ -2361,7 +2417,7 @@ PickAttributes::PrintSelf(ostream &os)
if (showNodeBlockLogicalCoords && !bnodeCoords.empty())
os << " block " << bnodeCoords[i].c_str() << "\n";
}
else if (pickType == Node)
else if (pickType == Node || pickType == DomainNode)
{
if (showZoneDomainLogicalCoords && !dzoneCoords.empty())
os << " domain " << dzoneCoords[i].c_str() << "\n";
......@@ -2417,6 +2473,9 @@ PickAttributes::PrintSelf(ostream &os)
// Kathleen Bonnell, Tue Mar 16 16:02:05 PST 2004
// Create message regarding invalid variables.
//
// Kathleen Bonnell, Tue Jun 1 16:44:44 PDT 2004
// Support new pick types 'DomainNode', 'DomainZone'.
//
// ****************************************************************************
void
PickAttributes::CreateOutputString(std::string &os, bool withLetter)
......@@ -2511,7 +2570,7 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
bool showNodeCoords = (showNodePhysicalCoords && !pnodeCoords.empty())||
(showNodeDomainLogicalCoords && !dnodeCoords.empty())||
(showNodeBlockLogicalCoords && !bnodeCoords.empty());
if (pickType == Zone)
if (pickType == Zone || pickType == DomainZone)
{
if (showZoneId || showZoneCoords)
os += "Zone: ";
......@@ -2533,7 +2592,7 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
if (showZoneId || showZoneCoords)
os += "\n";
}
else if (pickType == Node)
else if (pickType == Node || pickType == DomainNode)
{
if (showNodeId || showNodeCoords)
os += "Node: ";
......@@ -2563,7 +2622,7 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
if (displayIncidentElements)
{
bool showId;
if (pickType == Zone)
if (pickType == Zone || pickType == DomainZone)
{
os += "Incident Nodes: " ;
if (showNodeCoords)
......@@ -2572,7 +2631,7 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
}
showId = showNodeId;
}
else if (pickType == Node)
else if (pickType == Node || pickType == DomainNode)
{
os += "Incident zones: " ;
if (showZoneCoords)
......@@ -2589,7 +2648,7 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
SNPRINTF(buff, 512, "%d ", incidentElements[i]);
os += buff;
}
if (pickType == Zone)
if (pickType == Zone || pickType == DomainZone)
{
if (showNodePhysicalCoords & !pnodeCoords.empty())
{
......@@ -2611,7 +2670,7 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
os += "\n ";
}
}
else if (pickType == Node)
else if (pickType == Node || pickType == DomainNode)
{
if (showZoneDomainLogicalCoords & !dzoneCoords.empty())
{
......@@ -2680,6 +2739,9 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
// Kathleen Bonnell, Tue Mar 16 16:02:05 PST 2004
// Clear invalidVars.
//
// Kathleen Bonnell, Tue Jun 1 16:44:44 PDT 2004
// Reset matSelected and needActualCoords.
//
// ****************************************************************************
void
......@@ -2728,5 +2790,9 @@ PickAttributes::PrepareForNewPick()
errorMessage = "";
error = false;
matSelected = false;
needActualCoords = false;
}
......@@ -24,6 +24,9 @@ Definition:
// Kathleen Bonnell, Wed Dec 17 15:19:46 PST 2003
// Support multiple types of coordinates.
//
// Kathleen Bonnell, Tue Jun 1 16:44:44 PDT 2004
// Support new pick types 'DomainNode', 'DomainZone'.
//
// ****************************************************************************
void
PickAttributes::PrintSelf(ostream &os)
......@@ -86,7 +89,7 @@ PickAttributes::PrintSelf(ostream &os)
<< cellPoint[2] << ">\n";
}
}
if (pickType == Zone)
if (pickType == Zone || pickType == DomainZone)
{
os << "Zone " ;
if (showZoneId)
......@@ -101,7 +104,7 @@ PickAttributes::PrintSelf(ostream &os)
}
os << "\n";
}
else if (pickType == Node)
else if (pickType == Node || pickType == DomainNode)
{
os << "Node ";
if (showNodeId)
......@@ -123,12 +126,12 @@ PickAttributes::PrintSelf(ostream &os)
if (displayIncidentElements)
{
bool showId;
if (pickType == Zone)
if (pickType == Zone || pickType == DomainZone)
{
os << "Incident Nodes " ;
showId = showNodeId;
}
else if (pickType == Node)
else if (pickType == Node || pickType == DomainNode)
{
os << "Incident Zones " ;
showId = showZoneId;
......@@ -137,7 +140,7 @@ PickAttributes::PrintSelf(ostream &os)
{
if (showId)
os << incidentElements[i] << " ";
if (pickType == Zone)
if (pickType == Zone || pickType == DomainZone)
{
if (showNodePhysicalCoords && !pnodeCoords.empty())
os << " " << pnodeCoords[i].c_str() << "\n";
......@@ -146,7 +149,7 @@ PickAttributes::PrintSelf(ostream &os)
if (showNodeBlockLogicalCoords && !bnodeCoords.empty())
os << " block " << bnodeCoords[i].c_str() << "\n";
}
else if (pickType == Node)
else if (pickType == Node || pickType == DomainNode)
{
if (showZoneDomainLogicalCoords && !dzoneCoords.empty())
os << " domain " << dzoneCoords[i].c_str() << "\n";
......@@ -205,6 +208,9 @@ Definition:
// Kathleen Bonnell, Tue Mar 16 16:02:05 PST 2004
// Create message regarding invalid variables.
//
// Kathleen Bonnell, Tue Jun 1 16:44:44 PDT 2004
// Support new pick types 'DomainNode', 'DomainZone'.
//
// ****************************************************************************
void
PickAttributes::CreateOutputString(std::string &os, bool withLetter)
......@@ -299,7 +305,7 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
bool showNodeCoords = (showNodePhysicalCoords && !pnodeCoords.empty())||
(showNodeDomainLogicalCoords && !dnodeCoords.empty())||
(showNodeBlockLogicalCoords && !bnodeCoords.empty());
if (pickType == Zone)
if (pickType == Zone || pickType == DomainZone)
{
if (showZoneId || showZoneCoords)
os += "Zone: ";
......@@ -321,7 +327,7 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
if (showZoneId || showZoneCoords)
os += "\n";
}
else if (pickType == Node)
else if (pickType == Node || pickType == DomainNode)
{
if (showNodeId || showNodeCoords)
os += "Node: ";
......@@ -351,7 +357,7 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
if (displayIncidentElements)
{
bool showId;
if (pickType == Zone)
if (pickType == Zone || pickType == DomainZone)
{
os += "Incident Nodes: " ;
if (showNodeCoords)
......@@ -360,7 +366,7 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
}
showId = showNodeId;
}
else if (pickType == Node)
else if (pickType == Node || pickType == DomainNode)
{
os += "Incident zones: " ;
if (showZoneCoords)
......@@ -377,7 +383,7 @@ PickAttributes::CreateOutputString(std::string &os, bool withLetter)
SNPRINTF(buff, 512, "%d ", incidentElements[i]);
os += buff;