Commit 94bb23a9 authored by hrchilds's avatar hrchilds

Finish merge of 1.12RC to trunk, fixing conflicts with PersistentParticles

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@9382 18c085ea-50e0-402c-830e-de6fd14e8384
parent ae9def35
......@@ -61,6 +61,7 @@ Lineout
Merge
OnionPeel
PDF
PersistentParticles
Project
Reflect
Replicate
......
<?xml version="1.0"?>
<Plugin name="PersistentParticles" type="operator" label="PersistentParticles" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" iconFile="PersistentParticles.xpm">
<Plugin name="PersistentParticles" type="operator" label="PersistentParticles" version="2.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" iconFile="PersistentParticles.xpm">
<Attribute name="PersistentParticlesAttributes" purpose="This class contains attributes for the PersistentParticles operator." persistent="true" keyframe="true" exportAPI="" exportInclude="">
<Field name="startIndex" label="Index of first time slice" type="int">
0
......@@ -16,9 +16,15 @@
<Field name="stride" label="Skip rate between time slices" type="int">
1
</Field>
<Field name="indexVariable" label="Index Variable" type="variablename" vartypes="01000000000">
<Field name="traceVariableX" label="X-Coordinate" type="variablename" vartypes="01000000000">
</Field>
<Field name="traceVariableY" label="Y-Coordinate" type="variablename" vartypes="01000000000">
</Field>
<Field name="traceVariableZ" label="Z-Coordinate" type="variablename" vartypes="01000000000">
</Field>
<Field name="connectParticles" label="Connect Particles" type="bool">
</Field>
<Field name="indexVariable" label="Index Variable" type="variablename" enabler="connectParticles:true" vartypes="01000000000">
</Field>
</Attribute>
</Plugin>
......@@ -39,14 +39,11 @@
#include <PersistentParticlesAttributes.h>
#include <DataNode.h>
// Type map format string
const char *PersistentParticlesAttributes::TypeMapFormatString = "ibibisb";
// ****************************************************************************
// Method: PersistentParticlesAttributes::PersistentParticlesAttributes
//
// Purpose:
// Constructor for the PersistentParticlesAttributes class.
// Init utility for the PersistentParticlesAttributes class.
//
// Note: Autogenerated by xml2atts.
//
......@@ -57,22 +54,22 @@ const char *PersistentParticlesAttributes::TypeMapFormatString = "ibibisb";
//
// ****************************************************************************
PersistentParticlesAttributes::PersistentParticlesAttributes() :
AttributeSubject(PersistentParticlesAttributes::TypeMapFormatString),
indexVariable("default")
void PersistentParticlesAttributes::Init()
{
startIndex = 0;
startIndexRelative = false;
stopIndex = 1;
stopIndexRelative = false;
stride = 1;
PersistentParticlesAttributes::SelectAll();
}
// ****************************************************************************
// Method: PersistentParticlesAttributes::PersistentParticlesAttributes
//
// Purpose:
// Copy constructor for the PersistentParticlesAttributes class.
// Copy utility for the PersistentParticlesAttributes class.
//
// Note: Autogenerated by xml2atts.
//
......@@ -83,18 +80,113 @@ PersistentParticlesAttributes::PersistentParticlesAttributes() :
//
// ****************************************************************************
PersistentParticlesAttributes::PersistentParticlesAttributes(const PersistentParticlesAttributes &obj) :
AttributeSubject(PersistentParticlesAttributes::TypeMapFormatString)
void PersistentParticlesAttributes::Copy(const PersistentParticlesAttributes &obj)
{
startIndex = obj.startIndex;
startIndexRelative = obj.startIndexRelative;
stopIndex = obj.stopIndex;
stopIndexRelative = obj.stopIndexRelative;
stride = obj.stride;
indexVariable = obj.indexVariable;
traceVariableX = obj.traceVariableX;
traceVariableY = obj.traceVariableY;
traceVariableZ = obj.traceVariableZ;
connectParticles = obj.connectParticles;
indexVariable = obj.indexVariable;
PersistentParticlesAttributes::SelectAll();
}
// Type map format string
const char *PersistentParticlesAttributes::TypeMapFormatString = PERSISTENTPARTICLESATTRIBUTES_TMFS;
const AttributeGroup::private_tmfs_t PersistentParticlesAttributes::TmfsStruct = {PERSISTENTPARTICLESATTRIBUTES_TMFS};
// ****************************************************************************
// Method: PersistentParticlesAttributes::PersistentParticlesAttributes
//
// Purpose:
// Default constructor for the PersistentParticlesAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
SelectAll();
PersistentParticlesAttributes::PersistentParticlesAttributes() :
AttributeSubject(PersistentParticlesAttributes::TypeMapFormatString),
traceVariableX("default"), traceVariableY("default"),
traceVariableZ("default"), indexVariable("default")
{
PersistentParticlesAttributes::Init();
}
// ****************************************************************************
// Method: PersistentParticlesAttributes::PersistentParticlesAttributes
//
// Purpose:
// Constructor for the derived classes of PersistentParticlesAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
PersistentParticlesAttributes::PersistentParticlesAttributes(private_tmfs_t tmfs) :
AttributeSubject(tmfs.tmfs),
traceVariableX("default"), traceVariableY("default"),
traceVariableZ("default"), indexVariable("default")
{
PersistentParticlesAttributes::Init();
}
// ****************************************************************************
// Method: PersistentParticlesAttributes::PersistentParticlesAttributes
//
// Purpose:
// Copy constructor for the PersistentParticlesAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
PersistentParticlesAttributes::PersistentParticlesAttributes(const PersistentParticlesAttributes &obj) :
AttributeSubject(PersistentParticlesAttributes::TypeMapFormatString)
{
PersistentParticlesAttributes::Copy(obj);
}
// ****************************************************************************
// Method: PersistentParticlesAttributes::PersistentParticlesAttributes
//
// Purpose:
// Copy constructor for derived classes of the PersistentParticlesAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
PersistentParticlesAttributes::PersistentParticlesAttributes(const PersistentParticlesAttributes &obj, private_tmfs_t tmfs) :
AttributeSubject(tmfs.tmfs)
{
PersistentParticlesAttributes::Copy(obj);
}
// ****************************************************************************
......@@ -136,15 +228,9 @@ PersistentParticlesAttributes&
PersistentParticlesAttributes::operator = (const PersistentParticlesAttributes &obj)
{
if (this == &obj) return *this;
startIndex = obj.startIndex;
startIndexRelative = obj.startIndexRelative;
stopIndex = obj.stopIndex;
stopIndexRelative = obj.stopIndexRelative;
stride = obj.stride;
indexVariable = obj.indexVariable;
connectParticles = obj.connectParticles;
SelectAll();
PersistentParticlesAttributes::Copy(obj);
return *this;
}
......@@ -172,8 +258,11 @@ PersistentParticlesAttributes::operator == (const PersistentParticlesAttributes
(stopIndex == obj.stopIndex) &&
(stopIndexRelative == obj.stopIndexRelative) &&
(stride == obj.stride) &&
(indexVariable == obj.indexVariable) &&
(connectParticles == obj.connectParticles));
(traceVariableX == obj.traceVariableX) &&
(traceVariableY == obj.traceVariableY) &&
(traceVariableZ == obj.traceVariableZ) &&
(connectParticles == obj.connectParticles) &&
(indexVariable == obj.indexVariable));
}
// ****************************************************************************
......@@ -322,8 +411,11 @@ PersistentParticlesAttributes::SelectAll()
Select(ID_stopIndex, (void *)&stopIndex);
Select(ID_stopIndexRelative, (void *)&stopIndexRelative);
Select(ID_stride, (void *)&stride);
Select(ID_indexVariable, (void *)&indexVariable);
Select(ID_traceVariableX, (void *)&traceVariableX);
Select(ID_traceVariableY, (void *)&traceVariableY);
Select(ID_traceVariableZ, (void *)&traceVariableZ);
Select(ID_connectParticles, (void *)&connectParticles);
Select(ID_indexVariable, (void *)&indexVariable);
}
///////////////////////////////////////////////////////////////////////////////
......@@ -386,10 +478,22 @@ PersistentParticlesAttributes::CreateNode(DataNode *parentNode, bool completeSav
node->AddNode(new DataNode("stride", stride));
}
if(completeSave || !FieldsEqual(ID_indexVariable, &defaultObject))
if(completeSave || !FieldsEqual(ID_traceVariableX, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("indexVariable", indexVariable));
node->AddNode(new DataNode("traceVariableX", traceVariableX));
}
if(completeSave || !FieldsEqual(ID_traceVariableY, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("traceVariableY", traceVariableY));
}
if(completeSave || !FieldsEqual(ID_traceVariableZ, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("traceVariableZ", traceVariableZ));
}
if(completeSave || !FieldsEqual(ID_connectParticles, &defaultObject))
......@@ -398,6 +502,12 @@ PersistentParticlesAttributes::CreateNode(DataNode *parentNode, bool completeSav
node->AddNode(new DataNode("connectParticles", connectParticles));
}
if(completeSave || !FieldsEqual(ID_indexVariable, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("indexVariable", indexVariable));
}
// Add the node to the parent node.
if(addToParent || forceAdd)
......@@ -444,10 +554,16 @@ PersistentParticlesAttributes::SetFromNode(DataNode *parentNode)
SetStopIndexRelative(node->AsBool());
if((node = searchNode->GetNode("stride")) != 0)
SetStride(node->AsInt());
if((node = searchNode->GetNode("indexVariable")) != 0)
SetIndexVariable(node->AsString());
if((node = searchNode->GetNode("traceVariableX")) != 0)
SetTraceVariableX(node->AsString());
if((node = searchNode->GetNode("traceVariableY")) != 0)
SetTraceVariableY(node->AsString());
if((node = searchNode->GetNode("traceVariableZ")) != 0)
SetTraceVariableZ(node->AsString());
if((node = searchNode->GetNode("connectParticles")) != 0)
SetConnectParticles(node->AsBool());
if((node = searchNode->GetNode("indexVariable")) != 0)
SetIndexVariable(node->AsString());
}
///////////////////////////////////////////////////////////////////////////////
......@@ -490,10 +606,24 @@ PersistentParticlesAttributes::SetStride(int stride_)
}
void
PersistentParticlesAttributes::SetIndexVariable(const std::string &indexVariable_)
PersistentParticlesAttributes::SetTraceVariableX(const std::string &traceVariableX_)
{
indexVariable = indexVariable_;
Select(ID_indexVariable, (void *)&indexVariable);
traceVariableX = traceVariableX_;
Select(ID_traceVariableX, (void *)&traceVariableX);
}
void
PersistentParticlesAttributes::SetTraceVariableY(const std::string &traceVariableY_)
{
traceVariableY = traceVariableY_;
Select(ID_traceVariableY, (void *)&traceVariableY);
}
void
PersistentParticlesAttributes::SetTraceVariableZ(const std::string &traceVariableZ_)
{
traceVariableZ = traceVariableZ_;
Select(ID_traceVariableZ, (void *)&traceVariableZ);
}
void
......@@ -503,6 +633,13 @@ PersistentParticlesAttributes::SetConnectParticles(bool connectParticles_)
Select(ID_connectParticles, (void *)&connectParticles);
}
void
PersistentParticlesAttributes::SetIndexVariable(const std::string &indexVariable_)
{
indexVariable = indexVariable_;
Select(ID_indexVariable, (void *)&indexVariable);
}
///////////////////////////////////////////////////////////////////////////////
// Get property methods
///////////////////////////////////////////////////////////////////////////////
......@@ -538,15 +675,39 @@ PersistentParticlesAttributes::GetStride() const
}
const std::string &
PersistentParticlesAttributes::GetIndexVariable() const
PersistentParticlesAttributes::GetTraceVariableX() const
{
return indexVariable;
return traceVariableX;
}
std::string &
PersistentParticlesAttributes::GetIndexVariable()
PersistentParticlesAttributes::GetTraceVariableX()
{
return indexVariable;
return traceVariableX;
}
const std::string &
PersistentParticlesAttributes::GetTraceVariableY() const
{
return traceVariableY;
}
std::string &
PersistentParticlesAttributes::GetTraceVariableY()
{
return traceVariableY;
}
const std::string &
PersistentParticlesAttributes::GetTraceVariableZ() const
{
return traceVariableZ;
}
std::string &
PersistentParticlesAttributes::GetTraceVariableZ()
{
return traceVariableZ;
}
bool
......@@ -555,10 +716,40 @@ PersistentParticlesAttributes::GetConnectParticles() const
return connectParticles;
}
const std::string &
PersistentParticlesAttributes::GetIndexVariable() const
{
return indexVariable;
}
std::string &
PersistentParticlesAttributes::GetIndexVariable()
{
return indexVariable;
}
///////////////////////////////////////////////////////////////////////////////
// Select property methods
///////////////////////////////////////////////////////////////////////////////
void
PersistentParticlesAttributes::SelectTraceVariableX()
{
Select(ID_traceVariableX, (void *)&traceVariableX);
}
void
PersistentParticlesAttributes::SelectTraceVariableY()
{
Select(ID_traceVariableY, (void *)&traceVariableY);
}
void
PersistentParticlesAttributes::SelectTraceVariableZ()
{
Select(ID_traceVariableZ, (void *)&traceVariableZ);
}
void
PersistentParticlesAttributes::SelectIndexVariable()
{
......@@ -594,8 +785,11 @@ PersistentParticlesAttributes::GetFieldName(int index) const
case ID_stopIndex: return "stopIndex";
case ID_stopIndexRelative: return "stopIndexRelative";
case ID_stride: return "stride";
case ID_indexVariable: return "indexVariable";
case ID_traceVariableX: return "traceVariableX";
case ID_traceVariableY: return "traceVariableY";
case ID_traceVariableZ: return "traceVariableZ";
case ID_connectParticles: return "connectParticles";
case ID_indexVariable: return "indexVariable";
default: return "invalid index";
}
}
......@@ -625,8 +819,11 @@ PersistentParticlesAttributes::GetFieldType(int index) const
case ID_stopIndex: return FieldType_int;
case ID_stopIndexRelative: return FieldType_bool;
case ID_stride: return FieldType_int;
case ID_indexVariable: return FieldType_variablename;
case ID_traceVariableX: return FieldType_variablename;
case ID_traceVariableY: return FieldType_variablename;
case ID_traceVariableZ: return FieldType_variablename;
case ID_connectParticles: return FieldType_bool;
case ID_indexVariable: return FieldType_variablename;
default: return FieldType_unknown;
}
}
......@@ -656,8 +853,11 @@ PersistentParticlesAttributes::GetFieldTypeName(int index) const
case ID_stopIndex: return "int";
case ID_stopIndexRelative: return "bool";
case ID_stride: return "int";
case ID_indexVariable: return "variablename";
case ID_traceVariableX: return "variablename";
case ID_traceVariableY: return "variablename";
case ID_traceVariableZ: return "variablename";
case ID_connectParticles: return "bool";
case ID_indexVariable: return "variablename";
default: return "invalid index";
}
}
......@@ -709,9 +909,19 @@ PersistentParticlesAttributes::FieldsEqual(int index_, const AttributeGroup *rhs
retval = (stride == obj.stride);
}
break;
case ID_indexVariable:
case ID_traceVariableX:
{ // new scope
retval = (indexVariable == obj.indexVariable);
retval = (traceVariableX == obj.traceVariableX);
}
break;
case ID_traceVariableY:
{ // new scope
retval = (traceVariableY == obj.traceVariableY);
}
break;
case ID_traceVariableZ:
{ // new scope
retval = (traceVariableZ == obj.traceVariableZ);
}
break;
case ID_connectParticles:
......@@ -719,6 +929,11 @@ PersistentParticlesAttributes::FieldsEqual(int index_, const AttributeGroup *rhs
retval = (connectParticles == obj.connectParticles);
}
break;
case ID_indexVariable:
{ // new scope
retval = (indexVariable == obj.indexVariable);
}
break;
default: retval = false;
}
......
......@@ -41,6 +41,7 @@
#include <string>
#include <AttributeSubject.h>
// ****************************************************************************
// Class: PersistentParticlesAttributes
//
......@@ -59,13 +60,23 @@
class PersistentParticlesAttributes : public AttributeSubject
{
public:
// These constructors are for objects of this class
PersistentParticlesAttributes();
PersistentParticlesAttributes(const PersistentParticlesAttributes &obj);
protected:
// These constructors are for objects derived from this class
PersistentParticlesAttributes(private_tmfs_t tmfs);
PersistentParticlesAttributes(const PersistentParticlesAttributes &obj, private_tmfs_t tmfs);
public:
virtual ~PersistentParticlesAttributes();
virtual PersistentParticlesAttributes& operator = (const PersistentParticlesAttributes &obj);
virtual bool operator == (const PersistentParticlesAttributes &obj) const;
virtual bool operator != (const PersistentParticlesAttributes &obj) const;
private:
void Init();
void Copy(const PersistentParticlesAttributes &obj);
public:
virtual const std::string TypeName() const;
virtual bool CopyAttributes(const AttributeGroup *);
......@@ -74,6 +85,9 @@ public:
// Property selection methods
virtual void SelectAll();
void SelectTraceVariableX();
void SelectTraceVariableY();
void SelectTraceVariableZ();
void SelectIndexVariable();
// Property setting methods
......@@ -82,8 +96,11 @@ public:
void SetStopIndex(int stopIndex_);
void SetStopIndexRelative(bool stopIndexRelative_);
void SetStride(int stride_);
void SetIndexVariable(const std::string &indexVariable_);
void SetTraceVariableX(const std::string &traceVariableX_);
void SetTraceVariableY(const std::string &traceVariableY_);
void SetTraceVariableZ(const std::string &traceVariableZ_);
void SetConnectParticles(bool connectParticles_);
void SetIndexVariable(const std::string &indexVariable_);
// Property getting methods
int GetStartIndex() const;
......@@ -91,9 +108,15 @@ public:
int GetStopIndex() const;
bool GetStopIndexRelative() const;
int GetStride() const;
const std::string &GetTraceVariableX() const;
std::string &GetTraceVariableX();
const std::string &GetTraceVariableY() const;
std::string &GetTraceVariableY();
const std::string &GetTraceVariableZ() const;
std::string &GetTraceVariableZ();
bool GetConnectParticles() const;
const std::string &GetIndexVariable() const;
std::string &GetIndexVariable();
bool GetConnectParticles() const;
// Persistence methods
virtual bool CreateNode(DataNode *node, bool completeSave, bool forceAdd);
......@@ -114,8 +137,12 @@ public:
ID_stopIndex,
ID_stopIndexRelative,
ID_stride,
ID_traceVariableX,
ID_traceVariableY,
ID_traceVariableZ,
ID_connectParticles,
ID_indexVariable,
ID_connectParticles
ID__LAST
};
private:
......@@ -124,11 +151,16 @@ private:
int stopIndex;
bool stopIndexRelative;
int stride;
std::string indexVariable;
std::string traceVariableX;
std::string traceVariableY;
std::string traceVariableZ;
bool connectParticles;
std::string indexVariable;
// Static class format string for type map.
static const char *TypeMapFormatString;
static const private_tmfs_t TmfsStruct;
};
#define PERSISTENTPARTICLESATTRIBUTES_TMFS "ibibisssbs"
#endif
......@@ -59,7 +59,7 @@ import llnl.visit.Plugin;
public class PersistentParticlesAttributes extends AttributeSubject implements Plugin
{
private static int numAdditionalAttributes = 7;
private static int numAdditionalAttributes = 10;
public PersistentParticlesAttributes()
{
......@@ -70,8 +70,11 @@ public class PersistentParticlesAttributes extends AttributeSubject implements P
stopIndex = 1;
stopIndexRelative = false;
stride = 1;
indexVariable = new String("");
traceVariableX = new String("");
traceVariableY = new String("");
traceVariableZ = new String("");
connectParticles = false;
indexVariable = new String("");
}
public PersistentParticlesAttributes(int nMoreFields)
......@@ -83,8 +86,11 @@ public class PersistentParticlesAttributes extends AttributeSubject implements P
stopIndex = 1;
stopIndexRelative = false;
stride = 1;
indexVariable = new String("");
traceVariableX = new String("");
traceVariableY = new String("");
traceVariableZ = new String("");
connectParticles = false;
indexVariable = new String("");
}
public PersistentParticlesAttributes(PersistentParticlesAttributes obj)
......@@ -96,8 +102,11 @@ public class PersistentParticlesAttributes extends AttributeSubject implements P
stopIndex = obj.stopIndex;
stopIndexRelative = obj.stopInd