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 @@
void avtArrayMetaData::Init()
{
nVars = 0;
avtArrayMetaData::SelectAll();
}
// ****************************************************************************
......
......@@ -61,6 +61,8 @@ void avtCurveMetaData::Init()
hasSpatialExtents = false;
minSpatialExtents = 0;
maxSpatialExtents = 0;
avtCurveMetaData::SelectAll();
}
// ****************************************************************************
......
......@@ -56,6 +56,8 @@
void avtLabelMetaData::Init()
{
avtLabelMetaData::SelectAll();
}
// ****************************************************************************
......
......@@ -57,6 +57,8 @@
void avtMaterialMetaData::Init()
{
numMaterials = 0;
avtMaterialMetaData::SelectAll();
}
// ****************************************************************************
......
......@@ -142,6 +142,8 @@ void avtScalarMetaData::Init()
enumPartialCellMode = Exclude;
enumNChooseRN = 0;
enumNChooseRMaxR = 0;
avtScalarMetaData::SelectAll();
}
// ****************************************************************************
......
......@@ -136,6 +136,8 @@ void avtSubsetsMetaData::Init()
isMaterialCat = false;
isUnionOfChunks = false;
hasPartialCells = false;
avtSubsetsMetaData::SelectAll();
}
// ****************************************************************************
......@@ -158,9 +160,6 @@ void avtSubsetsMetaData::Copy(const avtSubsetsMetaData &obj)
catName = obj.catName;
catCount = obj.catCount;
nameScheme = obj.nameScheme;
nameSchemeArrayData = obj.nameSchemeArrayData;
nameSchemeArrayOffsets = obj.nameSchemeArrayOffsets;
nameSchemeArrayNames = obj.nameSchemeArrayNames;
colorScheme = obj.colorScheme;
setsToChunksMaps = obj.setsToChunksMaps;
graphEdges = obj.graphEdges;
......@@ -309,9 +308,6 @@ avtSubsetsMetaData::operator = (const avtSubsetsMetaData &obj)
catName = obj.catName;
catCount = obj.catCount;
nameScheme = obj.nameScheme;
nameSchemeArrayData = obj.nameSchemeArrayData;
nameSchemeArrayOffsets = obj.nameSchemeArrayOffsets;
nameSchemeArrayNames = obj.nameSchemeArrayNames;
colorScheme = obj.colorScheme;
setsToChunksMaps = obj.setsToChunksMaps;
graphEdges = obj.graphEdges;
......@@ -349,9 +345,6 @@ avtSubsetsMetaData::operator == (const avtSubsetsMetaData &obj) const
return ((catName == obj.catName) &&
(catCount == obj.catCount) &&
(nameScheme == obj.nameScheme) &&
(nameSchemeArrayData == obj.nameSchemeArrayData) &&
(nameSchemeArrayOffsets == obj.nameSchemeArrayOffsets) &&
(nameSchemeArrayNames == obj.nameSchemeArrayNames) &&
(colorScheme == obj.colorScheme) &&
(setsToChunksMaps == obj.setsToChunksMaps) &&
(graphEdges == obj.graphEdges) &&
......@@ -510,9 +503,6 @@ avtSubsetsMetaData::SelectAll()
Select(ID_catName, (void *)&catName);
Select(ID_catCount, (void *)&catCount);
Select(ID_nameScheme, (void *)&nameScheme);
Select(ID_nameSchemeArrayData, (void *)&nameSchemeArrayData);
Select(ID_nameSchemeArrayOffsets, (void *)&nameSchemeArrayOffsets);
Select(ID_nameSchemeArrayNames, (void *)&nameSchemeArrayNames);
Select(ID_colorScheme, (void *)&colorScheme);
Select(ID_setsToChunksMaps, (void *)&setsToChunksMaps);
Select(ID_graphEdges, (void *)&graphEdges);
......@@ -529,24 +519,24 @@ avtSubsetsMetaData::SelectAll()
///////////////////////////////////////////////////////////////////////////////
void
avtSubsetsMetaData::SetNameSchemeArrayData(const intVector &nameSchemeArrayData_)
avtSubsetsMetaData::SetCatName(const std::string &catName_)
{
nameSchemeArrayData = nameSchemeArrayData_;
Select(ID_nameSchemeArrayData, (void *)&nameSchemeArrayData);
catName = catName_;
Select(ID_catName, (void *)&catName);
}
void
avtSubsetsMetaData::SetNameSchemeArrayOffsets(const intVector &nameSchemeArrayOffsets_)
avtSubsetsMetaData::SetCatCount(int catCount_)
{
nameSchemeArrayOffsets = nameSchemeArrayOffsets_;
Select(ID_nameSchemeArrayOffsets, (void *)&nameSchemeArrayOffsets);
catCount = catCount_;
Select(ID_catCount, (void *)&catCount);
}
void
avtSubsetsMetaData::SetNameSchemeArrayNames(const stringVector &nameSchemeArrayNames_)
avtSubsetsMetaData::SetNameScheme(const NameschemeAttributes &nameScheme_)
{
nameSchemeArrayNames = nameSchemeArrayNames_;
Select(ID_nameSchemeArrayNames, (void *)&nameSchemeArrayNames);
nameScheme = nameScheme_;
Select(ID_nameScheme, (void *)&nameScheme);
}
void
......@@ -567,40 +557,34 @@ avtSubsetsMetaData::SetGraphEdges(const intVector &graphEdges_)
// Get property methods
///////////////////////////////////////////////////////////////////////////////
const intVector &
avtSubsetsMetaData::GetNameSchemeArrayData() const
const std::string &
avtSubsetsMetaData::GetCatName() const
{
return nameSchemeArrayData;
return catName;
}
intVector &
avtSubsetsMetaData::GetNameSchemeArrayData()
std::string &
avtSubsetsMetaData::GetCatName()
{
return nameSchemeArrayData;
return catName;
}
const intVector &
avtSubsetsMetaData::GetNameSchemeArrayOffsets() const
int
avtSubsetsMetaData::GetCatCount() const
{
return nameSchemeArrayOffsets;
return catCount;
}
intVector &
avtSubsetsMetaData::GetNameSchemeArrayOffsets()
const NameschemeAttributes &
avtSubsetsMetaData::GetNameScheme() const
{
return nameSchemeArrayOffsets;
return nameScheme;
}
const stringVector &
avtSubsetsMetaData::GetNameSchemeArrayNames() const
NameschemeAttributes &
avtSubsetsMetaData::GetNameScheme()
{
return nameSchemeArrayNames;
}
stringVector &
avtSubsetsMetaData::GetNameSchemeArrayNames()
{
return nameSchemeArrayNames;
return nameScheme;
}
const intVector &
......@@ -632,21 +616,15 @@ avtSubsetsMetaData::GetGraphEdges()
///////////////////////////////////////////////////////////////////////////////
void
avtSubsetsMetaData::SelectNameSchemeArrayData()
avtSubsetsMetaData::SelectCatName()
{
Select(ID_nameSchemeArrayData, (void *)&nameSchemeArrayData);
}
void
avtSubsetsMetaData::SelectNameSchemeArrayOffsets()
{
Select(ID_nameSchemeArrayOffsets, (void *)&nameSchemeArrayOffsets);
Select(ID_catName, (void *)&catName);
}
void
avtSubsetsMetaData::SelectNameSchemeArrayNames()
avtSubsetsMetaData::SelectNameScheme()
{
Select(ID_nameSchemeArrayNames, (void *)&nameSchemeArrayNames);
Select(ID_nameScheme, (void *)&nameScheme);
}
void
......@@ -688,9 +666,6 @@ avtSubsetsMetaData::GetFieldName(int index) const
case ID_catName: return "catName";
case ID_catCount: return "catCount";
case ID_nameScheme: return "nameScheme";
case ID_nameSchemeArrayData: return "nameSchemeArrayData";
case ID_nameSchemeArrayOffsets: return "nameSchemeArrayOffsets";
case ID_nameSchemeArrayNames: return "nameSchemeArrayNames";
case ID_colorScheme: return "colorScheme";
case ID_setsToChunksMaps: return "setsToChunksMaps";
case ID_graphEdges: return "graphEdges";
......@@ -726,10 +701,7 @@ avtSubsetsMetaData::GetFieldType(int index) const
{
case ID_catName: return FieldType_string;
case ID_catCount: return FieldType_int;
case ID_nameScheme: return FieldType_stringVector;
case ID_nameSchemeArrayData: return FieldType_intVector;
case ID_nameSchemeArrayOffsets: return FieldType_intVector;
case ID_nameSchemeArrayNames: return FieldType_stringVector;
case ID_nameScheme: return FieldType_att;
case ID_colorScheme: return FieldType_stringVector;
case ID_setsToChunksMaps: return FieldType_intVector;
case ID_graphEdges: return FieldType_intVector;
......@@ -765,10 +737,7 @@ avtSubsetsMetaData::GetFieldTypeName(int index) const
{
case ID_catName: return "string";
case ID_catCount: return "int";
case ID_nameScheme: return "stringVector";
case ID_nameSchemeArrayData: return "intVector";
case ID_nameSchemeArrayOffsets: return "intVector";
case ID_nameSchemeArrayNames: return "stringVector";
case ID_nameScheme: return "att";
case ID_colorScheme: return "stringVector";
case ID_setsToChunksMaps: return "intVector";
case ID_graphEdges: return "intVector";
......@@ -819,21 +788,6 @@ avtSubsetsMetaData::FieldsEqual(int index_, const AttributeGroup *rhs) const
retval = (nameScheme == obj.nameScheme);
}
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:
{ // new scope
retval = (colorScheme == obj.colorScheme);
......@@ -937,6 +891,7 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
Indent(out, indent);
out << "maxTopoDim = " << maxTopoDim << endl;
#if 0
if (nameScheme.size() == 1)
{
Indent(out, indent);
......@@ -981,6 +936,7 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
}
}
}
#endif
if (setsToChunksMaps.size())
{
......@@ -1069,10 +1025,7 @@ avtSubsetsMetaData::AddGraphEdge(int head, int tail)
void avtSubsetsMetaData::SetChunksForSet(int setId, std::vector<int> &chunks)
{
setsToChunksMaps.push_back(setId);
setsToChunksMaps.push_back(chunks.size());
for (size_t i = 0; i < chunks.size(); i++)
setsToChunksMaps.push_back(chunks[i]);
SetChunksForSet(setId, &chunks[0], (int) chunks.size());
}
// ****************************************************************************
......@@ -1093,82 +1046,33 @@ avtSubsetsMetaData::avtSubsetsMetaData(const char *catName, int catCount, int ma
}
// ****************************************************************************
// Method: avtSubsetsMetaData::AddArrayForNameScheme
//
// 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
//
// Programmer: Mark C. Miller
// Creation: August 18, 2009
// ****************************************************************************
void
avtSubsetsMetaData::AddArrayForNameScheme(const std::string name, const std::vector<int> &data)
{
AddArrayForNameScheme(name.c_str(), &data[0], (int) data.size());
}
// ****************************************************************************
// Method: avtSubsetsMetaData::AddArrayForNameScheme
// Method: avtSubsetsMetaData constructor
//
// Purpose: Add integer array data to be used in name scheme
// Purpose: convenient constructor
//
// Programmer: Mark C. Miller
// Creation: August 18, 2009
// ****************************************************************************
const int*
avtSubsetsMetaData::GetNameSchemeArray(int i)
avtSubsetsMetaData::avtSubsetsMetaData(const std::string &catName, int catCount, int maxTopoDim)
: avtVarMetaData(avtSubsetsMetaData::TmfsStruct)
{
if (i < 0 || i > nameSchemeArrayOffsets.size())
return 0;
return &nameSchemeArrayData[nameSchemeArrayOffsets[i]];
*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
// Creation: August 18, 2009
// ****************************************************************************
const int*
avtSubsetsMetaData::GetNameSchemeArray(const char *name)
{
std::vector<std::string>::iterator it =
find(nameSchemeArrayNames.begin(), nameSchemeArrayNames.end(), name);
if (it == nameSchemeArrayNames.end())
return 0;
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)
void avtSubsetsMetaData::SetChunksForSet(int setId, const int *chunks, int len)
{
*this = avtSubsetsMetaData(catName.c_str(), catCount, maxTopoDim);
setsToChunksMaps.push_back(setId);
setsToChunksMaps.push_back(len);
for (int i = 0; i < len; i++)
setsToChunksMaps.push_back(chunks[i]);
}
......@@ -49,6 +49,7 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
Indent(out, indent);
out << "maxTopoDim = " << maxTopoDim << endl;
#if 0
if (nameScheme.size() == 1)
{
Indent(out, indent);
......@@ -93,6 +94,7 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
}
}
}
#endif
if (setsToChunksMaps.size())
{
......@@ -210,84 +212,6 @@ avtSubsetsMetaData::avtSubsetsMetaData(const char *catName, int catCount, int ma
this->maxTopoDim = maxTopoDim;
}
Function: AddArrayForNameScheme
Declaration: void AddArrayForNameScheme(const char *name, const int *data, int len);
Definition:
// ****************************************************************************
// Method: avtSubsetsMetaData::AddArrayForNameScheme
//
// 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]);
}
Function: AddArrayForNameScheme2
Declaration: void AddArrayForNameScheme(const std::string name, const std::vector<int> &data);
Definition:
// ****************************************************************************
// Method: avtSubsetsMetaData::AddArrayForNameScheme
//
// Purpose: Add integer array data to be used in name scheme
//
// Programmer: Mark C. Miller
// Creation: August 18, 2009
// ****************************************************************************
void
avtSubsetsMetaData::AddArrayForNameScheme(const std::string name, const std::vector<int> &data)
{
AddArrayForNameScheme(name.c_str(), &data[0], (int) data.size());
}
Function: GetNameSchemeArray
Declaration: const int *GetNameSchemeArray(int i);
Definition:
// ****************************************************************************
// 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(int i)
{
if (i < 0 || i > nameSchemeArrayOffsets.size())
return 0;
return &nameSchemeArrayData[nameSchemeArrayOffsets[i]];
}
Function: GetNameSchemeArray2
Declaration: const int *GetNameSchemeArray(const char *);
Definition:
// ****************************************************************************
// 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 =
find(nameSchemeArrayNames.begin(), nameSchemeArrayNames.end(), name);
if (it == nameSchemeArrayNames.end())
return 0;
return GetNameSchemeArray((int) distance(nameSchemeArrayNames.begin(),it));
}
Function: avtSubsetsMetaData2
Declaration: avtSubsetsMetaData(const std::string &catName, int catCount, int maxTopoDim);
Definition:
......@@ -325,67 +249,3 @@ void avtSubsetsMetaData::SetChunksForSet(int setId, const int *chunks, int len)
setsToChunksMaps.push_back(chunks[i]);
}
Function: GetNameForSet
Declaration: const char *GetNameForSet(int setId);
Definition:
typedef struct _DBnamescheme
{
char *fmt; /* orig. format string */
const char **fmtptrs; /* ptrs into first (printf) part of fmt for each conversion spec. */
int fmtlen; /* len of first part of fmt */
int ncspecs; /* # of conversion specs in first part of fmt */
char delim; /* delimiter char used for parts of fmt */
int nembed; /* number of last embedded string encountered */
char *embedstrs[DB_MAX_EXPSTRS]; /* ptrs to copies of embedded strings */
int narrefs; /* number of array refs in conversion specs */
char **arrnames; /* array names used by array refs */
const int **arrvals; /* pointer to actual array data assoc. with each name */
char **exprstrs; /* expressions to be evaluated for each conv. spec. */
} DBnamescheme;
// ****************************************************************************
// Method: avtSubsetsMetaData::GetNameForSet
//
// Purpose: Return name for a set. If the namescheme is explicit, this
// function just looks up the name. Otherwise, it uses the nameschem
// to generate the the name.
//
// Programmer: Mark C. Miller
// Creation: August 18, 2009
// ****************************************************************************
Function: SetNameScheme
Declaration: SetNameScheme(const char **ns_or_names, int cnt=1);
Definition:
// ****************************************************************************
// Method: avtSubsetsMetaData::SetNameScheme
//
// Purpose: Sets the namescheme (printf style) used to name sets in this
// category. The ns_or_names argument can be an explicit list of names
// which is VERY EXPENSIVE to store, or a single 'namescheme'.
//
// Programmer: Mark C. Miller
// Creation: August 18, 2009
// ****************************************************************************
void avtSubsetsMetaData::SetNameScheme(const char **ns_or_names, cnt)
{
if (cnt == 1)
{
nameScheme.push_back(ns_or_names[0]);
DBMakeNamescheme(ns_or_names[0]);
}
else
{
for (int i = 0; i < cnt; i++)
nameScheme.push_back(ns_or_names[i]);
}
}
Function: avtSubsetsMetaData
Declaration: avtSubsetsMetaData();
Definition:
avtSubsetsMetaData::avtSubsetsMetaData() : avtVarMetaData(avtSubsetsMetaData::TmfsStruct)
{
avtSubsetsMetaData::Init();
}
......@@ -42,8 +42,10 @@
#include <string>
#include <avtVarMetaData.h>
#include <NameschemeAttributes.h>
#include <vector>
#include <algorithm>
#include <NameschemeAttributes.h>
// ****************************************************************************
// Class: avtSubsetsMetaData
......@@ -101,26 +103,24 @@ public:
// Property selection methods
virtual void SelectAll();
void SelectNameSchemeArrayData();
void SelectNameSchemeArrayOffsets();
void SelectNameSchemeArrayNames();
void SelectCatName();
void SelectNameScheme();
void SelectSetsToChunksMaps();
void SelectGraphEdges();
// Property setting methods
void SetNameSchemeArrayData(const intVector &nameSchemeArrayData_);
void SetNameSchemeArrayOffsets(const intVector &nameSchemeArrayOffsets_);
void SetNameSchemeArrayNames(const stringVector &nameSchemeArrayNames_);
void SetCatName(const std::string &catName_);
void SetCatCount(int catCount_);
void SetNameScheme(const NameschemeAttributes &nameScheme_);
void SetSetsToChunksMaps(const intVector &setsToChunksMaps_);
void SetGraphEdges(const intVector &graphEdges_);
// Property getting methods
const intVector &GetNameSchemeArrayData() const;
intVector &GetNameSchemeArrayData();
const intVector &GetNameSchemeArrayOffsets() const;
intVector &GetNameSchemeArrayOffsets();
const stringVector &GetNameSchemeArrayNames() const;
stringVector &GetNameSchemeArrayNames();
const std::string &GetCatName() const;
std::string &GetCatName();
int GetCatCount() const;
const NameschemeAttributes &GetNameScheme() const;
NameschemeAttributes &GetNameScheme();
const intVector &GetSetsToChunksMaps() const;
intVector &GetSetsToChunksMaps();
const intVector &GetGraphEdges() const;
......@@ -149,20 +149,14 @@ public:
void AddGraphEdge(int head, int tail);
void SetChunksForSet(int setId, std::vector<int> &chunks);
avtSubsetsMetaData(const char *catName, int catCount, int maxTopoDim);
void AddArrayForNameScheme(const char *name, const