Commit ad0de3c0 authored by hrchilds's avatar hrchilds

Update from July 11, 2003

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@32 18c085ea-50e0-402c-830e-de6fd14e8384
parent 2e2ce937
......@@ -4,10 +4,10 @@
namespace Init
{
void MISC_API Initialize(int &argc, char *argv[], int r=0, int n=1, bool strip=true);
void MISC_API SetComponentName(const char *);
const char * MISC_API GetExecutableName();
const char * MISC_API GetComponentName();
MISC_API void Initialize(int &argc, char *argv[], int r=0, int n=1, bool strip=true);
MISC_API void SetComponentName(const char *);
MISC_API const char * GetExecutableName();
MISC_API const char * GetComponentName();
}
#endif
......@@ -216,13 +216,16 @@ ColorTableManager::ImportHelper(void *data, const std::string &ctFileName,
// Creation: Mon Jul 7 15:43:49 PST 2003
//
// Modifications:
//
// Brad Whitlock, Fri Jul 11 15:44:40 PST 2003
// Fixed so it works on Windows.
//
// ****************************************************************************
void
ColorTableManager::ImportColorTable(const std::string &ctFileName)
{
if(ctFileName.substr(ctFileName.size() - 3, 3) == ".ct")
if(ctFileName.size() > 3 &&
ctFileName.substr(ctFileName.size() - 3) == ".ct")
{
//
// Read the color table from the XML file.
......
......@@ -11,17 +11,15 @@
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
// ****************************************************************************
QueryAttributes::QueryAttributes() : AttributeSubject("ss*sFiiFFF")
QueryAttributes::QueryAttributes() : AttributeSubject("ss*sFiiFFFd")
{
name = " ";
variables.push_back("default");
resultsMessage = " ";
worldPoint[0] = 0;
worldPoint[1] = 0;
worldPoint[2] = 0;
......@@ -36,6 +34,7 @@ QueryAttributes::QueryAttributes() : AttributeSubject("ss*sFiiFFF")
cellPoint[0] = 0;
cellPoint[1] = 0;
cellPoint[2] = 0;
resultsValue = 0;
}
// ****************************************************************************
......@@ -47,13 +46,13 @@ QueryAttributes::QueryAttributes() : AttributeSubject("ss*sFiiFFF")
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
// ****************************************************************************
QueryAttributes::QueryAttributes(const QueryAttributes &obj) : AttributeSubject("ss*sFiiFFF")
QueryAttributes::QueryAttributes(const QueryAttributes &obj) : AttributeSubject("ss*sFiiFFFd")
{
name = obj.name;
variables = obj.variables;
......@@ -76,6 +75,7 @@ QueryAttributes::QueryAttributes(const QueryAttributes &obj) : AttributeSubject(
cellPoint[1] = obj.cellPoint[1];
cellPoint[2] = obj.cellPoint[2];
resultsValue = obj.resultsValue;
SelectAll();
}
......@@ -89,7 +89,7 @@ QueryAttributes::QueryAttributes(const QueryAttributes &obj) : AttributeSubject(
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -109,7 +109,7 @@ QueryAttributes::~QueryAttributes()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -139,6 +139,7 @@ QueryAttributes::operator = (const QueryAttributes &obj)
cellPoint[1] = obj.cellPoint[1];
cellPoint[2] = obj.cellPoint[2];
resultsValue = obj.resultsValue;
SelectAll();
}
......@@ -152,7 +153,7 @@ QueryAttributes::operator = (const QueryAttributes &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -192,7 +193,8 @@ QueryAttributes::operator == (const QueryAttributes &obj) const
(zone == obj.zone) &&
rayPoint1_equal &&
rayPoint2_equal &&
cellPoint_equal);
cellPoint_equal &&
(resultsValue == obj.resultsValue));
}
// ****************************************************************************
......@@ -204,7 +206,7 @@ QueryAttributes::operator == (const QueryAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -225,7 +227,7 @@ QueryAttributes::operator != (const QueryAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -246,7 +248,7 @@ QueryAttributes::TypeName() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -274,7 +276,7 @@ QueryAttributes::CopyAttributes(const AttributeGroup *atts)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -300,7 +302,7 @@ QueryAttributes::CreateCompatible(const std::string &tname) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -318,6 +320,7 @@ QueryAttributes::SelectAll()
Select(6, (void *)rayPoint1, 3);
Select(7, (void *)rayPoint2, 3);
Select(8, (void *)cellPoint, 3);
Select(9, (void *)&resultsValue);
}
///////////////////////////////////////////////////////////////////////////////
......@@ -333,7 +336,7 @@ QueryAttributes::SelectAll()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -404,6 +407,12 @@ QueryAttributes::CreateNode(DataNode *parentNode, bool forceAdd)
node->AddNode(new DataNode("cellPoint", cellPoint, 3));
}
if(!FieldsEqual(9, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("resultsValue", resultsValue));
}
// Add the node to the parent node.
if(addToParent || forceAdd)
......@@ -423,7 +432,7 @@ QueryAttributes::CreateNode(DataNode *parentNode, bool forceAdd)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -458,6 +467,8 @@ QueryAttributes::SetFromNode(DataNode *parentNode)
SetRayPoint2(node->AsFloatArray());
if((node = searchNode->GetNode("cellPoint")) != 0)
SetCellPoint(node->AsFloatArray());
if((node = searchNode->GetNode("resultsValue")) != 0)
SetResultsValue(node->AsDouble());
}
///////////////////////////////////////////////////////////////////////////////
......@@ -535,6 +546,13 @@ QueryAttributes::SetCellPoint(const float *cellPoint_)
Select(8, (void *)cellPoint, 3);
}
void
QueryAttributes::SetResultsValue(double resultsValue_)
{
resultsValue = resultsValue_;
Select(9, (void *)&resultsValue);
}
///////////////////////////////////////////////////////////////////////////////
// Get property methods
///////////////////////////////////////////////////////////////////////////////
......@@ -635,6 +653,12 @@ QueryAttributes::GetCellPoint()
return cellPoint;
}
double
QueryAttributes::GetResultsValue() const
{
return resultsValue;
}
///////////////////////////////////////////////////////////////////////////////
// Select property methods
///////////////////////////////////////////////////////////////////////////////
......@@ -694,7 +718,7 @@ QueryAttributes::SelectCellPoint()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -714,6 +738,7 @@ QueryAttributes::GetFieldName(int index) const
case 6: return "rayPoint1";
case 7: return "rayPoint2";
case 8: return "cellPoint";
case 9: return "resultsValue";
default: return "invalid index";
}
}
......@@ -727,7 +752,7 @@ QueryAttributes::GetFieldName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -747,6 +772,7 @@ QueryAttributes::GetFieldType(int index) const
case 6: return FieldType_floatArray;
case 7: return FieldType_floatArray;
case 8: return FieldType_floatArray;
case 9: return FieldType_double;
default: return FieldType_unknown;
}
}
......@@ -760,7 +786,7 @@ QueryAttributes::GetFieldType(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -780,6 +806,7 @@ QueryAttributes::GetFieldTypeName(int index) const
case 6: return "floatArray";
case 7: return "floatArray";
case 8: return "floatArray";
case 9: return "double";
default: return "invalid index";
}
}
......@@ -793,7 +820,7 @@ QueryAttributes::GetFieldTypeName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -873,6 +900,11 @@ QueryAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) const
retval = cellPoint_equal;
}
break;
case 9:
{ // new scope
retval = (resultsValue == obj.resultsValue);
}
break;
default: retval = false;
}
......
......@@ -14,7 +14,7 @@
// Notes: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:06 PST 2003
// Creation: Fri Jul 11 11:56:17 PDT 2003
//
// Modifications:
//
......@@ -55,6 +55,7 @@ public:
void SetRayPoint1(const float *rayPoint1_);
void SetRayPoint2(const float *rayPoint2_);
void SetCellPoint(const float *cellPoint_);
void SetResultsValue(double resultsValue_);
// Property getting methods
const std::string &GetName() const;
......@@ -73,6 +74,7 @@ public:
float *GetRayPoint2();
const float *GetCellPoint() const;
float *GetCellPoint();
double GetResultsValue() const;
// Persistence methods
virtual bool CreateNode(DataNode *node, bool forceAdd);
......@@ -98,6 +100,7 @@ private:
float rayPoint1[3];
float rayPoint2[3];
float cellPoint[3];
double resultsValue;
};
#endif
<?xml version="1.0"?>
<Attribute name="QueryAttributes" codefile="QueryAttributes.code" persistent="true" purpose="This class contains attributes used for query." exportAPI="STATE_API" exportInclude="state_exports.h">
<Field name = "name" type = "string"> " " </Field>
<Field name = "variables" type = "stringVector" > "default" </Field>
<Field name = "resultsMessage" type = "string" > " " </Field>
<Field name = "worldPoint" type = "floatArray" length = "3" > 0. 0. 0.</Field>
<Field name = "domain" type = "int" > -1 </Field>
<Field name = "zone" type = "int" > -1 </Field>
<Field name = "rayPoint1" type = "floatArray" length = "3" > 0. 0. 0. </Field>
<Field name = "rayPoint2" type = "floatArray" length = "3" > 0. 0. 0. </Field>
<Field name = "cellPoint" type = "floatArray" length = "3" > 0. 0. 0. </Field>
<Include file="source" quoted="false"> stdio.h </Include>
<Include file="header" quoted="false"> iostream.h </Include>
<Function name = "Reset" member = "true" user = "true"> </Function>
<Function name = "PrintSelf" member = "true" user = "true"> </Function>
<Attribute name="QueryAttributes" purpose="This class contains attributes used for query." persistent="true" exportAPI="STATE_API" exportInclude="state_exports.h" codefile="QueryAttributes.code">
<Field name="name" label="name" type="string">
</Field>
<Field name="variables" label="variables" type="stringVector">
default
</Field>
<Field name="resultsMessage" label="resultsMessage" type="string">
</Field>
<Field name="worldPoint" label="worldPoint" type="floatArray" length="3">
0.000000
0.000000
0.000000
</Field>
<Field name="domain" label="domain" type="int">
-1
</Field>
<Field name="zone" label="zone" type="int">
-1
</Field>
<Field name="rayPoint1" label="rayPoint1" type="floatArray" length="3">
0.000000
0.000000
0.000000
</Field>
<Field name="rayPoint2" label="rayPoint2" type="floatArray" length="3">
0.000000
0.000000
0.000000
</Field>
<Field name="cellPoint" label="cellPoint" type="floatArray" length="3">
0.000000
0.000000
0.000000
</Field>
<Field name="resultsValue" label="resultsValue" type="double">
0.000000
</Field>
<Function name="Reset" user="true" member="true">
</Function>
<Function name="PrintSelf" user="true" member="true">
</Function>
<Include file="source" quoted="false">
stdio.h
</Include>
<Include file="header" quoted="false">
iostream.h
</Include>
</Attribute>
......@@ -77,7 +77,7 @@ QueryList::CoordinateRepresentation_FromString(const std::string &s, QueryList::
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -96,7 +96,7 @@ QueryList::QueryList() : AttributeSubject("s*i*i*")
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -120,7 +120,7 @@ QueryList::QueryList(const QueryList &obj) : AttributeSubject("s*i*i*")
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -140,7 +140,7 @@ QueryList::~QueryList()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -165,7 +165,7 @@ QueryList::operator = (const QueryList &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -189,7 +189,7 @@ QueryList::operator == (const QueryList &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -210,7 +210,7 @@ QueryList::operator != (const QueryList &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -231,7 +231,7 @@ QueryList::TypeName() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -259,7 +259,7 @@ QueryList::CopyAttributes(const AttributeGroup *atts)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -285,7 +285,7 @@ QueryList::CreateCompatible(const std::string &tname) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -312,7 +312,7 @@ QueryList::SelectAll()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -366,7 +366,7 @@ QueryList::CreateNode(DataNode *parentNode, bool forceAdd)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -491,7 +491,7 @@ QueryList::SelectCoordRep()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -518,7 +518,7 @@ QueryList::GetFieldName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -545,7 +545,7 @@ QueryList::GetFieldType(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -572,7 +572,7 @@ QueryList::GetFieldTypeName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -630,3 +630,34 @@ QueryList::AddQuery(const std::string &name, QueryList::QueryType t,
coordRep.push_back((int)rep);
}
// ****************************************************************************
// Method: QueryExists
//
// Purpose:
// Checks if a query matches the passed parameters.
//
// Programmer: Kathlene Bonnell
// Creation: July 11, 2003
//
// ****************************************************************************
bool
QueryList::QueryExists(const std::string &name, QueryList::QueryType t,
QueryList::CoordinateRepresentation rep)
{
int i;
bool match = false;
for (i = 0; i < names.size(); i++)
{
if (name == names[i])
{
if (t == types[i] && rep == coordRep[i])
{
match = true;
}
break;
}
}
return match;
}
......@@ -20,3 +20,38 @@ QueryList::AddQuery(const std::string &name, QueryList::QueryType t,
types.push_back((int)t);
coordRep.push_back((int)rep);
}
Function: QueryExists
Declaration: bool QueryExists(const std::string &name, QueryType t, CoordinateRepresentation rep = WorldSpace);
Definition:
// ****************************************************************************
// Method: QueryExists
//
// Purpose:
// Checks if a query matches the passed parameters.
//
// Programmer: Kathlene Bonnell
// Creation: July 11, 2003
//
// ****************************************************************************
bool
QueryList::QueryExists(const std::string &name, QueryList::QueryType t,
QueryList::CoordinateRepresentation rep)
{
int i;
bool match = false;
for (i = 0; i < names.size(); i++)
{
if (name == names[i])
{
if (t == types[i] && rep == coordRep[i])
{
match = true;
}
break;
}
}
return match;
}
......@@ -13,7 +13,7 @@
// Notes: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 20 13:40:07 PST 2003
// Creation: Fri Jul 11 10:05:12 PDT 2003
//
// Modifications:
//
......@@ -89,6 +89,7 @@ public:
// User-defined methods
void AddQuery(const std::string &name, QueryType t, CoordinateRepresentation rep = WorldSpace);
bool QueryExists(const std::string &name, QueryType t, CoordinateRepresentation rep = WorldSpace);
private:
stringVector names;