Commit d7beaccc authored by miller86's avatar miller86
Browse files

fixing missing call to SelectAll() for some constructors of derived state...

fixing missing call to SelectAll() for some constructors of derived state objects; minor fixes to Tecplot plugin for POINT zones where topological dimension < spatial dimension.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@8283 18c085ea-50e0-402c-830e-de6fd14e8384
parent fd91ce9d
...@@ -58,6 +58,8 @@ ...@@ -58,6 +58,8 @@
void avtArrayMetaData::Init() void avtArrayMetaData::Init()
{ {
nVars = 0; nVars = 0;
avtArrayMetaData::SelectAll();
} }
// **************************************************************************** // ****************************************************************************
......
...@@ -61,6 +61,8 @@ void avtCurveMetaData::Init() ...@@ -61,6 +61,8 @@ void avtCurveMetaData::Init()
hasSpatialExtents = false; hasSpatialExtents = false;
minSpatialExtents = 0; minSpatialExtents = 0;
maxSpatialExtents = 0; maxSpatialExtents = 0;
avtCurveMetaData::SelectAll();
} }
// **************************************************************************** // ****************************************************************************
......
...@@ -56,6 +56,8 @@ ...@@ -56,6 +56,8 @@
void avtLabelMetaData::Init() void avtLabelMetaData::Init()
{ {
avtLabelMetaData::SelectAll();
} }
// **************************************************************************** // ****************************************************************************
......
...@@ -57,6 +57,8 @@ ...@@ -57,6 +57,8 @@
void avtMaterialMetaData::Init() void avtMaterialMetaData::Init()
{ {
numMaterials = 0; numMaterials = 0;
avtMaterialMetaData::SelectAll();
} }
// **************************************************************************** // ****************************************************************************
......
...@@ -142,6 +142,8 @@ void avtScalarMetaData::Init() ...@@ -142,6 +142,8 @@ void avtScalarMetaData::Init()
enumPartialCellMode = Exclude; enumPartialCellMode = Exclude;
enumNChooseRN = 0; enumNChooseRN = 0;
enumNChooseRMaxR = 0; enumNChooseRMaxR = 0;
avtScalarMetaData::SelectAll();
} }
// **************************************************************************** // ****************************************************************************
......
...@@ -136,6 +136,8 @@ void avtSubsetsMetaData::Init() ...@@ -136,6 +136,8 @@ void avtSubsetsMetaData::Init()
isMaterialCat = false; isMaterialCat = false;
isUnionOfChunks = false; isUnionOfChunks = false;
hasPartialCells = false; hasPartialCells = false;
avtSubsetsMetaData::SelectAll();
} }
// **************************************************************************** // ****************************************************************************
...@@ -158,9 +160,6 @@ void avtSubsetsMetaData::Copy(const avtSubsetsMetaData &obj) ...@@ -158,9 +160,6 @@ void avtSubsetsMetaData::Copy(const avtSubsetsMetaData &obj)
catName = obj.catName; catName = obj.catName;
catCount = obj.catCount; catCount = obj.catCount;
nameScheme = obj.nameScheme; nameScheme = obj.nameScheme;
nameSchemeArrayData = obj.nameSchemeArrayData;
nameSchemeArrayOffsets = obj.nameSchemeArrayOffsets;
nameSchemeArrayNames = obj.nameSchemeArrayNames;
colorScheme = obj.colorScheme; colorScheme = obj.colorScheme;
setsToChunksMaps = obj.setsToChunksMaps; setsToChunksMaps = obj.setsToChunksMaps;
graphEdges = obj.graphEdges; graphEdges = obj.graphEdges;
...@@ -309,9 +308,6 @@ avtSubsetsMetaData::operator = (const avtSubsetsMetaData &obj) ...@@ -309,9 +308,6 @@ avtSubsetsMetaData::operator = (const avtSubsetsMetaData &obj)
catName = obj.catName; catName = obj.catName;
catCount = obj.catCount; catCount = obj.catCount;
nameScheme = obj.nameScheme; nameScheme = obj.nameScheme;
nameSchemeArrayData = obj.nameSchemeArrayData;
nameSchemeArrayOffsets = obj.nameSchemeArrayOffsets;
nameSchemeArrayNames = obj.nameSchemeArrayNames;
colorScheme = obj.colorScheme; colorScheme = obj.colorScheme;
setsToChunksMaps = obj.setsToChunksMaps; setsToChunksMaps = obj.setsToChunksMaps;
graphEdges = obj.graphEdges; graphEdges = obj.graphEdges;
...@@ -349,9 +345,6 @@ avtSubsetsMetaData::operator == (const avtSubsetsMetaData &obj) const ...@@ -349,9 +345,6 @@ avtSubsetsMetaData::operator == (const avtSubsetsMetaData &obj) const
return ((catName == obj.catName) && return ((catName == obj.catName) &&
(catCount == obj.catCount) && (catCount == obj.catCount) &&
(nameScheme == obj.nameScheme) && (nameScheme == obj.nameScheme) &&
(nameSchemeArrayData == obj.nameSchemeArrayData) &&
(nameSchemeArrayOffsets == obj.nameSchemeArrayOffsets) &&
(nameSchemeArrayNames == obj.nameSchemeArrayNames) &&
(colorScheme == obj.colorScheme) && (colorScheme == obj.colorScheme) &&
(setsToChunksMaps == obj.setsToChunksMaps) && (setsToChunksMaps == obj.setsToChunksMaps) &&
(graphEdges == obj.graphEdges) && (graphEdges == obj.graphEdges) &&
...@@ -507,21 +500,18 @@ avtSubsetsMetaData::SelectAll() ...@@ -507,21 +500,18 @@ avtSubsetsMetaData::SelectAll()
{ {
// call the base class' SelectAll() first // call the base class' SelectAll() first
avtVarMetaData::SelectAll(); avtVarMetaData::SelectAll();
Select(ID_catName, (void *)&catName); Select(ID_catName, (void *)&catName);
Select(ID_catCount, (void *)&catCount); Select(ID_catCount, (void *)&catCount);
Select(ID_nameScheme, (void *)&nameScheme); Select(ID_nameScheme, (void *)&nameScheme);
Select(ID_nameSchemeArrayData, (void *)&nameSchemeArrayData); Select(ID_colorScheme, (void *)&colorScheme);
Select(ID_nameSchemeArrayOffsets, (void *)&nameSchemeArrayOffsets); Select(ID_setsToChunksMaps, (void *)&setsToChunksMaps);
Select(ID_nameSchemeArrayNames, (void *)&nameSchemeArrayNames); Select(ID_graphEdges, (void *)&graphEdges);
Select(ID_colorScheme, (void *)&colorScheme); Select(ID_isChunkCat, (void *)&isChunkCat);
Select(ID_setsToChunksMaps, (void *)&setsToChunksMaps); Select(ID_isMaterialCat, (void *)&isMaterialCat);
Select(ID_graphEdges, (void *)&graphEdges); Select(ID_isUnionOfChunks, (void *)&isUnionOfChunks);
Select(ID_isChunkCat, (void *)&isChunkCat); Select(ID_hasPartialCells, (void *)&hasPartialCells);
Select(ID_isMaterialCat, (void *)&isMaterialCat); Select(ID_decompMode, (void *)&decompMode);
Select(ID_isUnionOfChunks, (void *)&isUnionOfChunks); Select(ID_maxTopoDim, (void *)&maxTopoDim);
Select(ID_hasPartialCells, (void *)&hasPartialCells);
Select(ID_decompMode, (void *)&decompMode);
Select(ID_maxTopoDim, (void *)&maxTopoDim);
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
...@@ -529,24 +519,24 @@ avtSubsetsMetaData::SelectAll() ...@@ -529,24 +519,24 @@ avtSubsetsMetaData::SelectAll()
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
void void
avtSubsetsMetaData::SetNameSchemeArrayData(const intVector &nameSchemeArrayData_) avtSubsetsMetaData::SetCatName(const std::string &catName_)
{ {
nameSchemeArrayData = nameSchemeArrayData_; catName = catName_;
Select(ID_nameSchemeArrayData, (void *)&nameSchemeArrayData); Select(ID_catName, (void *)&catName);
} }
void void
avtSubsetsMetaData::SetNameSchemeArrayOffsets(const intVector &nameSchemeArrayOffsets_) avtSubsetsMetaData::SetCatCount(int catCount_)
{ {
nameSchemeArrayOffsets = nameSchemeArrayOffsets_; catCount = catCount_;
Select(ID_nameSchemeArrayOffsets, (void *)&nameSchemeArrayOffsets); Select(ID_catCount, (void *)&catCount);
} }
void void
avtSubsetsMetaData::SetNameSchemeArrayNames(const stringVector &nameSchemeArrayNames_) avtSubsetsMetaData::SetNameScheme(const NameschemeAttributes &nameScheme_)
{ {
nameSchemeArrayNames = nameSchemeArrayNames_; nameScheme = nameScheme_;
Select(ID_nameSchemeArrayNames, (void *)&nameSchemeArrayNames); Select(ID_nameScheme, (void *)&nameScheme);
} }
void void
...@@ -567,40 +557,34 @@ avtSubsetsMetaData::SetGraphEdges(const intVector &graphEdges_) ...@@ -567,40 +557,34 @@ avtSubsetsMetaData::SetGraphEdges(const intVector &graphEdges_)
// Get property methods // Get property methods
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
const intVector & const std::string &
avtSubsetsMetaData::GetNameSchemeArrayData() const avtSubsetsMetaData::GetCatName() const
{ {
return nameSchemeArrayData; return catName;
} }
intVector & std::string &
avtSubsetsMetaData::GetNameSchemeArrayData() avtSubsetsMetaData::GetCatName()
{
return nameSchemeArrayData;
}
const intVector &
avtSubsetsMetaData::GetNameSchemeArrayOffsets() const
{ {
return nameSchemeArrayOffsets; return catName;
} }
intVector & int
avtSubsetsMetaData::GetNameSchemeArrayOffsets() avtSubsetsMetaData::GetCatCount() const
{ {
return nameSchemeArrayOffsets; return catCount;
} }
const stringVector & const NameschemeAttributes &
avtSubsetsMetaData::GetNameSchemeArrayNames() const avtSubsetsMetaData::GetNameScheme() const
{ {
return nameSchemeArrayNames; return nameScheme;
} }
stringVector & NameschemeAttributes &
avtSubsetsMetaData::GetNameSchemeArrayNames() avtSubsetsMetaData::GetNameScheme()
{ {
return nameSchemeArrayNames; return nameScheme;
} }
const intVector & const intVector &
...@@ -632,21 +616,15 @@ avtSubsetsMetaData::GetGraphEdges() ...@@ -632,21 +616,15 @@ avtSubsetsMetaData::GetGraphEdges()
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
void void
avtSubsetsMetaData::SelectNameSchemeArrayData() avtSubsetsMetaData::SelectCatName()
{
Select(ID_nameSchemeArrayData, (void *)&nameSchemeArrayData);
}
void
avtSubsetsMetaData::SelectNameSchemeArrayOffsets()
{ {
Select(ID_nameSchemeArrayOffsets, (void *)&nameSchemeArrayOffsets); Select(ID_catName, (void *)&catName);
} }
void void
avtSubsetsMetaData::SelectNameSchemeArrayNames() avtSubsetsMetaData::SelectNameScheme()
{ {
Select(ID_nameSchemeArrayNames, (void *)&nameSchemeArrayNames); Select(ID_nameScheme, (void *)&nameScheme);
} }
void void
...@@ -685,21 +663,18 @@ avtSubsetsMetaData::GetFieldName(int index) const ...@@ -685,21 +663,18 @@ avtSubsetsMetaData::GetFieldName(int index) const
{ {
switch (index) switch (index)
{ {
case ID_catName: return "catName"; case ID_catName: return "catName";
case ID_catCount: return "catCount"; case ID_catCount: return "catCount";
case ID_nameScheme: return "nameScheme"; case ID_nameScheme: return "nameScheme";
case ID_nameSchemeArrayData: return "nameSchemeArrayData"; case ID_colorScheme: return "colorScheme";
case ID_nameSchemeArrayOffsets: return "nameSchemeArrayOffsets"; case ID_setsToChunksMaps: return "setsToChunksMaps";
case ID_nameSchemeArrayNames: return "nameSchemeArrayNames"; case ID_graphEdges: return "graphEdges";
case ID_colorScheme: return "colorScheme"; case ID_isChunkCat: return "isChunkCat";
case ID_setsToChunksMaps: return "setsToChunksMaps"; case ID_isMaterialCat: return "isMaterialCat";
case ID_graphEdges: return "graphEdges"; case ID_isUnionOfChunks: return "isUnionOfChunks";
case ID_isChunkCat: return "isChunkCat"; case ID_hasPartialCells: return "hasPartialCells";
case ID_isMaterialCat: return "isMaterialCat"; case ID_decompMode: return "decompMode";
case ID_isUnionOfChunks: return "isUnionOfChunks"; case ID_maxTopoDim: return "maxTopoDim";
case ID_hasPartialCells: return "hasPartialCells";
case ID_decompMode: return "decompMode";
case ID_maxTopoDim: return "maxTopoDim";
default: return "invalid index"; default: return "invalid index";
} }
} }
...@@ -724,21 +699,18 @@ avtSubsetsMetaData::GetFieldType(int index) const ...@@ -724,21 +699,18 @@ avtSubsetsMetaData::GetFieldType(int index) const
{ {
switch (index) switch (index)
{ {
case ID_catName: return FieldType_string; case ID_catName: return FieldType_string;
case ID_catCount: return FieldType_int; case ID_catCount: return FieldType_int;
case ID_nameScheme: return FieldType_stringVector; case ID_nameScheme: return FieldType_att;
case ID_nameSchemeArrayData: return FieldType_intVector; case ID_colorScheme: return FieldType_stringVector;
case ID_nameSchemeArrayOffsets: return FieldType_intVector; case ID_setsToChunksMaps: return FieldType_intVector;
case ID_nameSchemeArrayNames: return FieldType_stringVector; case ID_graphEdges: return FieldType_intVector;
case ID_colorScheme: return FieldType_stringVector; case ID_isChunkCat: return FieldType_bool;
case ID_setsToChunksMaps: return FieldType_intVector; case ID_isMaterialCat: return FieldType_bool;
case ID_graphEdges: return FieldType_intVector; case ID_isUnionOfChunks: return FieldType_bool;
case ID_isChunkCat: return FieldType_bool; case ID_hasPartialCells: return FieldType_bool;
case ID_isMaterialCat: return FieldType_bool; case ID_decompMode: return FieldType_enum;
case ID_isUnionOfChunks: return FieldType_bool; case ID_maxTopoDim: return FieldType_int;
case ID_hasPartialCells: return FieldType_bool;
case ID_decompMode: return FieldType_enum;
case ID_maxTopoDim: return FieldType_int;
default: return FieldType_unknown; default: return FieldType_unknown;
} }
} }
...@@ -763,21 +735,18 @@ avtSubsetsMetaData::GetFieldTypeName(int index) const ...@@ -763,21 +735,18 @@ avtSubsetsMetaData::GetFieldTypeName(int index) const
{ {
switch (index) switch (index)
{ {
case ID_catName: return "string"; case ID_catName: return "string";
case ID_catCount: return "int"; case ID_catCount: return "int";
case ID_nameScheme: return "stringVector"; case ID_nameScheme: return "att";
case ID_nameSchemeArrayData: return "intVector"; case ID_colorScheme: return "stringVector";
case ID_nameSchemeArrayOffsets: return "intVector"; case ID_setsToChunksMaps: return "intVector";
case ID_nameSchemeArrayNames: return "stringVector"; case ID_graphEdges: return "intVector";
case ID_colorScheme: return "stringVector"; case ID_isChunkCat: return "bool";
case ID_setsToChunksMaps: return "intVector"; case ID_isMaterialCat: return "bool";
case ID_graphEdges: return "intVector"; case ID_isUnionOfChunks: return "bool";
case ID_isChunkCat: return "bool"; case ID_hasPartialCells: return "bool";
case ID_isMaterialCat: return "bool"; case ID_decompMode: return "enum";
case ID_isUnionOfChunks: return "bool"; case ID_maxTopoDim: return "int";
case ID_hasPartialCells: return "bool";
case ID_decompMode: return "enum";
case ID_maxTopoDim: return "int";
default: return "invalid index"; default: return "invalid index";
} }
} }
...@@ -819,21 +788,6 @@ avtSubsetsMetaData::FieldsEqual(int index_, const AttributeGroup *rhs) const ...@@ -819,21 +788,6 @@ avtSubsetsMetaData::FieldsEqual(int index_, const AttributeGroup *rhs) const
retval = (nameScheme == obj.nameScheme); retval = (nameScheme == obj.nameScheme);
} }
break; break;
case ID_nameSchemeArrayData:
{ // new scope
retval = (nameSchemeArrayData == obj.nameSchemeArrayData);
}
break;
case ID_nameSchemeArrayOffsets:
{ // new scope
retval = (nameSchemeArrayOffsets == obj.nameSchemeArrayOffsets);
}
break;
case ID_nameSchemeArrayNames:
{ // new scope
retval = (nameSchemeArrayNames == obj.nameSchemeArrayNames);
}
break;
case ID_colorScheme: case ID_colorScheme:
{ // new scope { // new scope
retval = (colorScheme == obj.colorScheme); retval = (colorScheme == obj.colorScheme);
...@@ -937,6 +891,7 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const ...@@ -937,6 +891,7 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
Indent(out, indent); Indent(out, indent);
out << "maxTopoDim = " << maxTopoDim << endl; out << "maxTopoDim = " << maxTopoDim << endl;
#if 0
if (nameScheme.size() == 1) if (nameScheme.size() == 1)
{ {
Indent(out, indent); Indent(out, indent);
...@@ -981,6 +936,7 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const ...@@ -981,6 +936,7 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
} }
} }
} }
#endif
if (setsToChunksMaps.size()) if (setsToChunksMaps.size())
{ {
...@@ -1069,10 +1025,7 @@ avtSubsetsMetaData::AddGraphEdge(int head, int tail) ...@@ -1069,10 +1025,7 @@ avtSubsetsMetaData::AddGraphEdge(int head, int tail)
void avtSubsetsMetaData::SetChunksForSet(int setId, std::vector<int> &chunks) void avtSubsetsMetaData::SetChunksForSet(int setId, std::vector<int> &chunks)
{ {
setsToChunksMaps.push_back(setId); SetChunksForSet(setId, &chunks[0], (int) chunks.size());
setsToChunksMaps.push_back(chunks.size());
for (size_t i = 0; i < chunks.size(); i++)
setsToChunksMaps.push_back(chunks[i]);
} }
// **************************************************************************** // ****************************************************************************
...@@ -1093,82 +1046,33 @@ avtSubsetsMetaData::avtSubsetsMetaData(const char *catName, int catCount, int ma ...@@ -1093,82 +1046,33 @@ avtSubsetsMetaData::avtSubsetsMetaData(const char *catName, int catCount, int ma
} }
// **************************************************************************** // ****************************************************************************
// Method: avtSubsetsMetaData::AddArrayForNameScheme // Method: avtSubsetsMetaData constructor
//
// Purpose: Add integer array data to be used in name scheme
//
// Programmer: Mark C. Miller
// Creation: August 18, 2009
// ****************************************************************************
void
avtSubsetsMetaData::AddArrayForNameScheme(const char *name, const int *data, int len)
{
nameSchemeArrayNames.push_back(name);
nameSchemeArrayOffsets.push_back(nameSchemeArrayData.size());
for (int i = 0; i < len; i++)
nameSchemeArrayData.push_back(data[i]);
}
// ****************************************************************************
// Method: avtSubsetsMetaData::AddArrayForNameScheme
// //
// Purpose: Add integer array data to be used in name scheme // Purpose: convenient constructor
// //
// Programmer: Mark C. Miller // Programmer: Mark C. Miller
// Creation: August 18, 2009 // Creation: August 18, 2009
// **************************************************************************** // ****************************************************************************
void avtSubsetsMetaData::avtSubsetsMetaData(const std::string &catName, int catCount, int maxTopoDim)
avtSubsetsMetaData::AddArrayForNameScheme(const std::string name, const std::vector<int> &data) : avtVarMetaData(avtSubsetsMetaData::TmfsStruct)
{ {
AddArrayForNameScheme(name.c_str(), &data[0], (int) data.size()); *this = avtSubsetsMetaData(catName.c_str(), catCount, maxTopoDim);
} }
// **************************************************************************** // ****************************************************************************
// Method: avtSubsetsMetaData::AddArrayForNameScheme // Method: avtSubsetsMetaData::SetChunksForSet
// //
// Purpose: Add integer array data to be used in name scheme // Purpose: Indicate which chunks a given set exists on.
// //
// Programmer: Mark C. Miller // Programmer: Mark C. Miller
// Creation: August 18, 2009 // Creation: August 18, 2009
// **************************************************************************** // ****************************************************************************
const int*
avtSubsetsMetaData::GetNameSchemeArray(int i)
{
if (i < 0 || i > nameSchemeArrayOffsets.size())
return 0;
return &nameSchemeArrayData[nameSchemeArrayOffsets[i]];
}
// **************************************************************************** void avtSubsetsMetaData::SetChunksForSet(int setId, const int *chunks, int len)
// Method: avtSubsetsMetaData::AddArrayForNameScheme
//
// Purpose: Add integer array data to be used in name scheme
//
// Programmer: Mark C. Miller
// Creation: August 18, 2009
// ****************************************************************************
const int*
avtSubsetsMetaData::GetNameSchemeArray(const char *name)
{ {
std::vector<std::string>::iterator it = setsToChunksMaps.push_back(setId);
find(nameSchemeArrayNames.begin(), nameSchemeArrayNames.end(), name); setsToChunksMaps.push_back(len);
if (it == nameSchemeArrayNames.end()) for (int i = 0; i < len; i++)
return 0; setsToChunksMaps.push_back(chunks[i]);
return GetNameSchemeArray((int) distance(nameSchemeArrayNames.begin(),it));
}
// ****************************************************************************
// Method: avtSubsetsMetaData constructor
//
// Purpose: convenient constructor
//
// Programmer: Mark C. Miller
// Creation: August 18, 2009
// ****************************************************************************
avtSubsetsMetaData::avtSubsetsMetaData(const std::string &catName, int catCount, int maxTopoDim)
: avtVarMetaData(avtSubsetsMetaData::TmfsStruct)
{
*this = avtSubsetsMetaData(catName.c_str(), catCount, maxTopoDim);
} }