Commit c2e6de47 authored by hrchilds's avatar hrchilds
Browse files

Update from February 11, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@173 18c085ea-50e0-402c-830e-de6fd14e8384
parent 240b131d
......@@ -79,6 +79,43 @@ QueryAttributes::VarType_FromString(const std::string &s, QueryAttributes::VarTy
return false;
}
//
// Enum conversion methods for QueryAttributes::DataType
//
static const char *DataType_strings[] = {
"ActualData", "OriginalData"};
std::string
QueryAttributes::DataType_ToString(QueryAttributes::DataType t)
{
int index = int(t);
if(index < 0 || index >= 2) index = 0;
return DataType_strings[index];
}
std::string
QueryAttributes::DataType_ToString(int t)
{
int index = (t < 0 || t >= 2) ? 0 : t;
return DataType_strings[index];
}
bool
QueryAttributes::DataType_FromString(const std::string &s, QueryAttributes::DataType &val)
{
val = QueryAttributes::ActualData;
for(int i = 0; i < 2; ++i)
{
if(s == DataType_strings[i])
{
val = (DataType)i;
return true;
}
}
return false;
}
// ****************************************************************************
// Method: QueryAttributes::QueryAttributes
//
......@@ -88,13 +125,13 @@ QueryAttributes::VarType_FromString(const std::string &s, QueryAttributes::VarTy
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
// ****************************************************************************
QueryAttributes::QueryAttributes() : AttributeSubject("ss*sFiid*iii*b")
QueryAttributes::QueryAttributes() : AttributeSubject("ss*sFiid*iii*i")
{
variables.push_back("default");
worldPoint[0] = 0;
......@@ -105,7 +142,7 @@ QueryAttributes::QueryAttributes() : AttributeSubject("ss*sFiid*iii*b")
resultsValue.push_back(0);
elementType = Zone;
timeStep = 0;
currentPlotOnly = false;
dataType = ActualData;
}
// ****************************************************************************
......@@ -117,13 +154,13 @@ QueryAttributes::QueryAttributes() : AttributeSubject("ss*sFiid*iii*b")
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
// ****************************************************************************
QueryAttributes::QueryAttributes(const QueryAttributes &obj) : AttributeSubject("ss*sFiid*iii*b")
QueryAttributes::QueryAttributes(const QueryAttributes &obj) : AttributeSubject("ss*sFiid*iii*i")
{
name = obj.name;
variables = obj.variables;
......@@ -138,7 +175,7 @@ QueryAttributes::QueryAttributes(const QueryAttributes &obj) : AttributeSubject(
elementType = obj.elementType;
timeStep = obj.timeStep;
varTypes = obj.varTypes;
currentPlotOnly = obj.currentPlotOnly;
dataType = obj.dataType;
SelectAll();
}
......@@ -152,7 +189,7 @@ QueryAttributes::QueryAttributes(const QueryAttributes &obj) : AttributeSubject(
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -172,7 +209,7 @@ QueryAttributes::~QueryAttributes()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -194,7 +231,7 @@ QueryAttributes::operator = (const QueryAttributes &obj)
elementType = obj.elementType;
timeStep = obj.timeStep;
varTypes = obj.varTypes;
currentPlotOnly = obj.currentPlotOnly;
dataType = obj.dataType;
SelectAll();
}
......@@ -208,7 +245,7 @@ QueryAttributes::operator = (const QueryAttributes &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -235,7 +272,7 @@ QueryAttributes::operator == (const QueryAttributes &obj) const
(elementType == obj.elementType) &&
(timeStep == obj.timeStep) &&
(varTypes == obj.varTypes) &&
(currentPlotOnly == obj.currentPlotOnly));
(dataType == obj.dataType));
}
// ****************************************************************************
......@@ -247,7 +284,7 @@ QueryAttributes::operator == (const QueryAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -268,7 +305,7 @@ QueryAttributes::operator != (const QueryAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -289,7 +326,7 @@ QueryAttributes::TypeName() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -317,7 +354,7 @@ QueryAttributes::CopyAttributes(const AttributeGroup *atts)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -343,7 +380,7 @@ QueryAttributes::CreateCompatible(const std::string &tname) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -370,7 +407,7 @@ QueryAttributes::NewInstance(bool copy) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -389,7 +426,7 @@ QueryAttributes::SelectAll()
Select(7, (void *)&elementType);
Select(8, (void *)&timeStep);
Select(9, (void *)&varTypes);
Select(10, (void *)&currentPlotOnly);
Select(10, (void *)&dataType);
}
///////////////////////////////////////////////////////////////////////////////
......@@ -405,7 +442,7 @@ QueryAttributes::SelectAll()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -485,7 +522,7 @@ QueryAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceA
if(completeSave || !FieldsEqual(10, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("currentPlotOnly", currentPlotOnly));
node->AddNode(new DataNode("dataType", DataType_ToString(dataType)));
}
......@@ -507,7 +544,7 @@ QueryAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceA
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -559,8 +596,22 @@ QueryAttributes::SetFromNode(DataNode *parentNode)
SetTimeStep(node->AsInt());
if((node = searchNode->GetNode("varTypes")) != 0)
SetVarTypes(node->AsIntVector());
if((node = searchNode->GetNode("currentPlotOnly")) != 0)
SetCurrentPlotOnly(node->AsBool());
if((node = searchNode->GetNode("dataType")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 2)
SetDataType(DataType(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
DataType value;
if(DataType_FromString(node->AsString(), value))
SetDataType(value);
}
}
}
///////////////////////////////////////////////////////////////////////////////
......@@ -640,10 +691,10 @@ QueryAttributes::SetVarTypes(const intVector &varTypes_)
}
void
QueryAttributes::SetCurrentPlotOnly(bool currentPlotOnly_)
QueryAttributes::SetDataType(QueryAttributes::DataType dataType_)
{
currentPlotOnly = currentPlotOnly_;
Select(10, (void *)&currentPlotOnly);
dataType = dataType_;
Select(10, (void *)&dataType);
}
///////////////////////////////////////////////////////////////////////////////
......@@ -746,10 +797,10 @@ QueryAttributes::GetVarTypes()
return varTypes;
}
bool
QueryAttributes::GetCurrentPlotOnly() const
QueryAttributes::DataType
QueryAttributes::GetDataType() const
{
return currentPlotOnly;
return DataType(dataType);
}
///////////////////////////////////////////////////////////////////////////////
......@@ -805,7 +856,7 @@ QueryAttributes::SelectVarTypes()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -826,7 +877,7 @@ QueryAttributes::GetFieldName(int index) const
case 7: return "elementType";
case 8: return "timeStep";
case 9: return "varTypes";
case 10: return "currentPlotOnly";
case 10: return "dataType";
default: return "invalid index";
}
}
......@@ -840,7 +891,7 @@ QueryAttributes::GetFieldName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -861,7 +912,7 @@ QueryAttributes::GetFieldType(int index) const
case 7: return FieldType_enum;
case 8: return FieldType_int;
case 9: return FieldType_intVector;
case 10: return FieldType_bool;
case 10: return FieldType_enum;
default: return FieldType_unknown;
}
}
......@@ -875,7 +926,7 @@ QueryAttributes::GetFieldType(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -896,7 +947,7 @@ QueryAttributes::GetFieldTypeName(int index) const
case 7: return "enum";
case 8: return "int";
case 9: return "intVector";
case 10: return "bool";
case 10: return "enum";
default: return "invalid index";
}
}
......@@ -910,7 +961,7 @@ QueryAttributes::GetFieldTypeName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -982,7 +1033,7 @@ QueryAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) const
break;
case 10:
{ // new scope
retval = (currentPlotOnly == obj.currentPlotOnly);
retval = (dataType == obj.dataType);
}
break;
default: retval = false;
......
......@@ -14,7 +14,7 @@
// Notes: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:25 PDT 2003
// Creation: Wed Feb 11 09:37:41 PDT 2004
//
// Modifications:
//
......@@ -40,6 +40,11 @@ public:
Curve,
Unknown
};
enum DataType
{
ActualData,
OriginalData
};
QueryAttributes();
QueryAttributes(const QueryAttributes &obj);
......@@ -74,7 +79,7 @@ public:
void SetElementType(ElementType elementType_);
void SetTimeStep(int timeStep_);
void SetVarTypes(const intVector &varTypes_);
void SetCurrentPlotOnly(bool currentPlotOnly_);
void SetDataType(DataType dataType_);
// Property getting methods
const std::string &GetName() const;
......@@ -93,7 +98,7 @@ public:
int GetTimeStep() const;
const intVector &GetVarTypes() const;
intVector &GetVarTypes();
bool GetCurrentPlotOnly() const;
DataType GetDataType() const;
// Persistence methods
virtual bool CreateNode(DataNode *node, bool completeSave, bool forceAdd);
......@@ -110,6 +115,11 @@ public:
protected:
static std::string VarType_ToString(int);
public:
static std::string DataType_ToString(DataType);
static bool DataType_FromString(const std::string &, DataType &);
protected:
static std::string DataType_ToString(int);
public:
// Keyframing methods
virtual std::string GetFieldName(int index) const;
......@@ -133,7 +143,7 @@ private:
int elementType;
int timeStep;
intVector varTypes;
bool currentPlotOnly;
int dataType;
};
#endif
......@@ -15,6 +15,10 @@
Curve
Unknown
</Enum>
<Enum name="DataType">
ActualData
OriginalData
</Enum>
<Field name="name" label="name" type="string">
</Field>
<Field name="variables" label="variables" type="stringVector">
......@@ -44,8 +48,8 @@
</Field>
<Field name="varTypes" label="varTypes" type="intVector" internal="true">
</Field>
<Field name="currentPlotOnly" label="currentPlotOnly" type="bool" internal="true">
false
<Field name="dataType" label="dataType" type="enum" subtype="DataType" internal="true">
ActualData
</Field>
<Function name="Reset" user="true" member="true">
</Function>
......
......@@ -82,8 +82,8 @@ QueryList::CoordinateRepresentation_FromString(const std::string &s, QueryList::
static const char *WindowType_strings[] = {
"Basic", "SinglePoint", "DoublePoint",
"DomainNode", "DomainZone", "CurrentPlot",
"CurrentPlotVars"};
"DomainNode", "DomainZone", "ActualData",
"ActualDataVars"};
std::string
QueryList::WindowType_ToString(QueryList::WindowType t)
......@@ -124,7 +124,7 @@ QueryList::WindowType_FromString(const std::string &s, QueryList::WindowType &va
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:26 PDT 2003
// Creation: Tue Feb 10 15:35:35 PST 2004
//
// Modifications:
//
......@@ -143,7 +143,7 @@ QueryList::QueryList() : AttributeSubject("s*i*i*i*i*i*i*")
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:26 PDT 2003
// Creation: Tue Feb 10 15:35:35 PST 2004
//
// Modifications:
//
......@@ -157,7 +157,7 @@ QueryList::QueryList(const QueryList &obj) : AttributeSubject("s*i*i*i*i*i*i*")
numInputs = obj.numInputs;
allowedVarTypes = obj.allowedVarTypes;
winType = obj.winType;
currentPlot = obj.currentPlot;
actualData = obj.actualData;
SelectAll();
}
......@@ -171,7 +171,7 @@ QueryList::QueryList(const QueryList &obj) : AttributeSubject("s*i*i*i*i*i*i*")
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:26 PDT 2003
// Creation: Tue Feb 10 15:35:35 PST 2004
//
// Modifications:
//
......@@ -191,7 +191,7 @@ QueryList::~QueryList()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:26 PDT 2003
// Creation: Tue Feb 10 15:35:35 PST 2004
//
// Modifications:
//
......@@ -206,7 +206,7 @@ QueryList::operator = (const QueryList &obj)
numInputs = obj.numInputs;
allowedVarTypes = obj.allowedVarTypes;
winType = obj.winType;
currentPlot = obj.currentPlot;
actualData = obj.actualData;
SelectAll();
}
......@@ -220,7 +220,7 @@ QueryList::operator = (const QueryList &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:26 PDT 2003
// Creation: Tue Feb 10 15:35:35 PST 2004
//
// Modifications:
//
......@@ -236,7 +236,7 @@ QueryList::operator == (const QueryList &obj) const
(numInputs == obj.numInputs) &&
(allowedVarTypes == obj.allowedVarTypes) &&
(winType == obj.winType) &&
(currentPlot == obj.currentPlot));
(actualData == obj.actualData));
}
// ****************************************************************************
......@@ -248,7 +248,7 @@ QueryList::operator == (const QueryList &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:26 PDT 2003
// Creation: Tue Feb 10 15:35:35 PST 2004
//
// Modifications:
//
......@@ -269,7 +269,7 @@ QueryList::operator != (const QueryList &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:26 PDT 2003
// Creation: Tue Feb 10 15:35:35 PST 2004
//
// Modifications:
//
......@@ -290,7 +290,7 @@ QueryList::TypeName() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:26 PDT 2003
// Creation: Tue Feb 10 15:35:35 PST 2004
//
// Modifications:
//
......@@ -318,7 +318,7 @@ QueryList::CopyAttributes(const AttributeGroup *atts)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:26 PDT 2003
// Creation: Tue Feb 10 15:35:35 PST 2004
//
// Modifications:
//
......@@ -344,7 +344,7 @@ QueryList::CreateCompatible(const std::string &tname) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:26 PDT 2003
// Creation: Tue Feb 10 15:35:35 PST 2004
//
// Modifications:
//
......@@ -371,7 +371,7 @@ QueryList::NewInstance(bool copy) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:26 PDT 2003
// Creation: Tue Feb 10 15:35:35 PST 2004
//
// Modifications:
//
......@@ -386,7 +386,7 @@ QueryList::SelectAll()
Select(3, (void *)&numInputs);
Select(4, (void *)&allowedVarTypes);
Select(5, (void *)&winType);
Select(6, (void *)&currentPlot);
Select(6, (void *)&actualData);
}
///////////////////////////////////////////////////////////////////////////////
......@@ -402,7 +402,7 @@ QueryList::SelectAll()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:26 PDT 2003
// Creation: Tue Feb 10 15:35:35 PST 2004
//
// Modifications:
//
......@@ -458,7 +458,7 @@ QueryList::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
if(completeSave || !FieldsEqual(6, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("currentPlot", currentPlot));
node->AddNode(new DataNode("actualData", actualData));
}
......@@ -480,7 +480,7 @@ QueryList::CreateNode(DataNode *parentNode, bool completeSave, bool forceAdd)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:24:26 PDT 2003
// Creation: Tue Feb 10 15:35:35 PST 2004
//
// Modifications:
//
......@@ -510,8 +510,8 @@ QueryList::SetFromNode(DataNode *parentNode)
SetAllowedVarTypes(node->AsIntVector());
if((node = searchNode->GetNode("winType")) != 0)
SetWinType(node->AsIntVector());
if((node = searchNode->GetNode("currentPlot")) != 0)
SetCurrentPlot(node->AsIntVector());
if((node = searchNode->GetNode("actualData")) != 0)
SetActualData(node->AsIntVector());
}
///////////////////////////////////////////////////////////////////////////////
......@@ -561,10 +561,10 @@ QueryList::SetWinType(const intVector &winType_)
}
void
QueryList::SetCurrentPlot(const intVector &currentPlot_)
QueryList::SetActualData(const intVector &actualData_)
{
currentPlot = currentPlot_;
Select(6, (void *)&currentPlot);
actualData = actualData_;
Select(6, (void *)&actualData);
}
///////////////////////////////////////////////////////////////////////////////
......@@ -644,15 +644,15 @@ QueryList::GetWinType()
}
const intVector &
QueryList::GetCurrentPlot() const
QueryList::GetActualData() const
{
return currentPlot;
return actualData;
}
intVector &
QueryList::GetCurrentPlot()
QueryList::GetActualData()
{
return currentPlot;
return actualData;
}
///////////////////////////////////////////////////////////////////////////////
......@@ -696,9 +696,9 @@ QueryList::SelectWinType()
}
void
QueryList::SelectCurrentPlot()
QueryList::SelectActualData()
{
Select(6, (void *)&currentPlot);
Select(6, (void *)&actualData);
}