Commit 218be504 authored by fogal1's avatar fogal1

Added a const version of `GetInput'.

... and propagated that out so that everything would still
compile.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@8006 18c085ea-50e0-402c-830e-de6fd14e8384
parent 24baa9f5
......@@ -104,6 +104,24 @@ avtFacadeFilter::GetInput(void)
return GetIthFacadedFilter(0)->GetInput();
}
// ****************************************************************************
// Method: avtFacadeFilter::GetInput
//
// Purpose:
// Gets the input for this filter. Since this is a facade, it goes to the
// first input in the pipeline and gets its filter.
//
// Programmer: Tom Fogal
// Creation: June 23, 2009
//
// ****************************************************************************
const avtDataObject_p
avtFacadeFilter::GetInput(void) const
{
return GetIthFacadedFilter(0)->GetInput();
}
// ****************************************************************************
// Method: avtFacadeFilter::GetOutput
......
......@@ -70,6 +70,9 @@
// Add methods to access all facaded filters, as well as populating common
// avtFilter methods (release data, perform restriction).
//
// Tom Fogal, Tue Jun 23 20:34:38 MDT 2009
// Added const version of GetInput and GetIthFacadedFilter.
//
// ****************************************************************************
class PIPELINE_API avtFacadeFilter : virtual public avtFilter
......@@ -79,6 +82,7 @@ class PIPELINE_API avtFacadeFilter : virtual public avtFilter
virtual ~avtFacadeFilter();
virtual avtDataObject_p GetInput(void);
virtual const avtDataObject_p GetInput(void) const;
virtual avtDataObject_p GetOutput(void);
virtual avtOriginatingSource *GetOriginatingSource(void);
......@@ -91,16 +95,13 @@ class PIPELINE_API avtFacadeFilter : virtual public avtFilter
virtual int GetNumberOfFacadedFilters(void) = 0;
virtual avtFilter *GetIthFacadedFilter(int) = 0;
virtual const avtFilter *GetIthFacadedFilter(int) const = 0;
virtual void Execute(void);
virtual avtContract_p ModifyContract(
avtContract_p);
virtual avtContract_p ModifyContract(avtContract_p);
virtual void UpdateDataObjectInfo(void);
};
#endif
......@@ -72,3 +72,22 @@ avtSingleFilterFacade::GetIthFacadedFilter(int f)
}
// ****************************************************************************
// Method: avtSingleFilterFacade::GetIthFacadedFilter
//
// Purpose:
// Gets one of the filters.
//
// Programmer: Tom Fogal
// Creation: June 23, 2009
//
// ****************************************************************************
const avtFilter *
avtSingleFilterFacade::GetIthFacadedFilter(int f) const
{
if (f != 0)
EXCEPTION0(ImproperUseException);
return GetFacadedFilter();
}
......@@ -66,6 +66,9 @@
// Hank Childs, Tue Jun 7 15:04:09 PDT 2005
// Use new interface for creating facaded filters.
//
// Tom Fogal, Tue Jun 23 20:37:54 MDT 2009
// Added const versions of some methods.
//
// ****************************************************************************
class PIPELINE_API avtSingleFilterFacade : public avtFacadeFilter
......@@ -77,11 +80,10 @@ class PIPELINE_API avtSingleFilterFacade : public avtFacadeFilter
protected:
virtual int GetNumberOfFacadedFilters(void) { return 1; };
virtual avtFilter *GetIthFacadedFilter(int);
virtual const avtFilter *GetIthFacadedFilter(int) const;
virtual avtFilter *GetFacadedFilter(void) = 0;
virtual const avtFilter *GetFacadedFilter(void) const = 0;
};
#endif
......@@ -76,6 +76,9 @@
// Define private copy constructor and assignment operator to prevent
// accidental use of default, bitwise copy implementations.
//
// Tom Fogal, Tue Jun 23 19:54:03 MDT 2009
// Added a const version of GetInput.
//
// ****************************************************************************
class PIPELINE_API avtDataObjectSink
......@@ -88,6 +91,7 @@ class PIPELINE_API avtDataObjectSink
void SetInput(avtDataObject_p);
virtual avtDataObject_p GetInput(void) = 0;
virtual const avtDataObject_p GetInput(void) const = 0;
protected:
virtual void SetTypedInput(avtDataObject_p) = 0;
......
......@@ -144,6 +144,26 @@ avtDatasetSink::GetInput(void)
return rv;
}
// ****************************************************************************
// Method: avtDatasetSink::GetInput
//
// Purpose:
// Gets the input of the sink (properly typed as an avtDataObject).
//
// Returns: The input of the sink.
//
// Programmer: Tom Fogal
// Creation: June 23, 2009
//
// ****************************************************************************
const avtDataObject_p
avtDatasetSink::GetInput(void) const
{
avtDataObject_p rv;
CopyTo(rv, input);
return rv;
}
// ****************************************************************************
// Method: avtDatasetSink::GetInputDataTree
......
......@@ -69,23 +69,27 @@
// Moved inlined destructor definition to .C file because certain compilers
// have problems with them.
//
// Tom Fogal, Tue Jun 23 19:57:34 MDT 2009
// Added const edition of GetInput.
//
// ****************************************************************************
class PIPELINE_API avtDatasetSink : virtual public avtDataObjectSink
{
friend class avtMultipleInputSink;
friend class avtMultipleInputSink;
public:
avtDatasetSink();
virtual ~avtDatasetSink();
avtDatasetSink();
virtual ~avtDatasetSink();
virtual avtDataObject_p GetInput(void);
virtual avtDataObject_p GetInput(void);
virtual const avtDataObject_p GetInput(void) const;
protected:
avtDataTree_p GetInputDataTree();
avtDataset_p GetTypedInput(void) { return input; };
avtDataTree_p GetInputDataTree();
avtDataset_p GetTypedInput(void) { return input; };
virtual void SetTypedInput(avtDataObject_p);
virtual void SetTypedInput(avtDataObject_p);
private:
avtDataset_p input;
......
......@@ -143,6 +143,26 @@ avtImageSink::GetInput(void)
return rv;
}
// ****************************************************************************
// Method: avtImageSink::GetInput
//
// Purpose:
// Gets the input of the sink (properly typed as an avtDataObject).
//
// Returns: The input of the sink.
//
// Programmer: Tom Fogal
// Creation: June 23, 2009
//
// ****************************************************************************
const avtDataObject_p
avtImageSink::GetInput(void) const
{
avtDataObject_p rv;
CopyTo(rv, input);
return rv;
}
// ****************************************************************************
// Method: avtImageSink::GetImageRep
......
......@@ -72,6 +72,9 @@
// Moved inlined destructor definition to .C file because certain compilers
// have problems with them.
//
// Tom Fogal, Tue Jun 23 20:01:31 MDT 2009
// Added const version of GetInput.
//
// ****************************************************************************
class PIPELINE_API avtImageSink : virtual public avtDataObjectSink
......@@ -82,6 +85,7 @@ class PIPELINE_API avtImageSink : virtual public avtDataObjectSink
protected:
virtual avtDataObject_p GetInput(void);
virtual const avtDataObject_p GetInput(void) const;
virtual void SetTypedInput(avtDataObject_p);
avtImageRepresentation &GetImageRep(void);
avtImage_p GetTypedInput(void) { return input; };
......
......@@ -183,6 +183,27 @@ avtMultipleInputSink::GetInput(void)
return sinks[0]->GetInput();
}
// ****************************************************************************
// Method: avtMultipleInputSink::GetInput
//
// Purpose:
// The GetInput routine must be defined for sinks. Meet that interface.
//
// Programmer: Tom Fogal
// Creation: June 23, 2009
//
// ****************************************************************************
const avtDataObject_p
avtMultipleInputSink::GetInput(void) const
{
if (nSinks <= 0)
{
EXCEPTION2(BadIndexException, 0, nSinks);
}
return sinks[0]->GetInput();
}
// ****************************************************************************
// Method: avtMultipleInputSink::SetTypedInput
......
......@@ -76,6 +76,7 @@ class PIPELINE_API avtMultipleInputSink : virtual public avtDataObjectSink
int nSinks;
virtual avtDataObject_p GetInput(void);
virtual const avtDataObject_p GetInput(void) const;
virtual void SetTypedInput(avtDataObject_p);
virtual bool UpdateInput(avtContract_p);
......
......@@ -130,3 +130,24 @@ avtNullDataSink::GetInput(void)
return rv;
}
// ****************************************************************************
// Method: avtNullDataSink::GetInput
//
// Purpose:
// Gets the input of the sink (properly typed as an avtDataObject).
//
// Returns: The input of the sink.
//
// Programmer: Tom Fogal
// Creation: June 23, 2009
//
// ****************************************************************************
const avtDataObject_p
avtNullDataSink::GetInput(void) const
{
avtDataObject_p rv;
CopyTo(rv, input);
return rv;
}
......@@ -63,6 +63,9 @@
// Moved inlined destructor definition to .C file because certain compilers
// have problems with them.
//
// Tom Fogal, Tue Jun 23 20:02:47 MDT 2009
// Added const version of GetInput.
//
// ****************************************************************************
class PIPELINE_API avtNullDataSink : virtual public avtDataObjectSink
......@@ -73,6 +76,7 @@ class PIPELINE_API avtNullDataSink : virtual public avtDataObjectSink
protected:
virtual avtDataObject_p GetInput();
virtual const avtDataObject_p GetInput() const;
virtual void SetTypedInput(avtDataObject_p in);
avtNullData_p GetTypedInput() { return input; };
......
......@@ -139,4 +139,23 @@ avtSamplePointsSink::GetInput(void)
return rv;
}
// ****************************************************************************
// Method: avtSamplePointsSink::GetInput
//
// Purpose:
// Gets the input of the sink (properly typed as an avtDataObject).
//
// Returns: The input of the sink.
//
// Programmer: Tom Fogal
// Creation: June 23, 2008
//
// ****************************************************************************
const avtDataObject_p
avtSamplePointsSink::GetInput(void) const
{
avtDataObject_p rv;
CopyTo(rv, input);
return rv;
}
......@@ -67,6 +67,9 @@
// Moved inlined destructor definition to .C file because certain compilers
// have problems with them.
//
// Tom Fogal, Tue Jun 23 20:00:22 MDT 2009
// Added const version of GetInput.
//
// ****************************************************************************
class PIPELINE_API avtSamplePointsSink : virtual public avtDataObjectSink
......@@ -77,6 +80,7 @@ class PIPELINE_API avtSamplePointsSink : virtual public avtDataObjectSink
protected:
virtual avtDataObject_p GetInput(void);
virtual const avtDataObject_p GetInput(void) const;
virtual void SetTypedInput(avtDataObject_p);
avtSamplePoints_p GetTypedInput(void) { return input; };
......
......@@ -64,6 +64,9 @@
// Moved inlined constructor and destructor definitions to .C files
// because certain compilers have problems with them.
//
// Tom Fogal, Tue Jun 23 20:29:54 MDT 2009
// Added const version of GetInput.
//
// ****************************************************************************
class QUERY_API avtGeneralQuery : public avtDataObjectQuery
......@@ -78,6 +81,7 @@ class QUERY_API avtGeneralQuery : public avtDataObjectQuery
void SetTypedInput(avtDataObject_p in)
{ input = in; };
avtDataObject_p GetInput(void) { return input; };
const avtDataObject_p GetInput(void) const { return input; }
};
......
......@@ -169,3 +169,19 @@ avtDisplacePluginFilter::GetFacadedFilter(void)
}
// ****************************************************************************
// Method: avtDisplacePluginFilter::GetFacadedFilter
//
// Purpose:
// Gets the filter that the filter that we are a facade of.
//
// Programmer: Tom Fogal
// Creation: June 23, 2009
//
// ****************************************************************************
const avtFilter *
avtDisplacePluginFilter::GetFacadedFilter(void) const
{
return displacer;
}
......@@ -60,6 +60,11 @@ class avtDisplaceFilter;
// Programmer: childs -- generated by xml2avt
// Creation: May 18, 2007
//
// Modifications:
//
// Tom Fogal, Tue Jun 23 20:44:11 MDT 2009
// Added const version of GetFacaded filter.
//
// ****************************************************************************
class avtDisplacePluginFilter : virtual public avtPluginFilter,
......@@ -83,9 +88,7 @@ class avtDisplacePluginFilter : virtual public avtPluginFilter,
DisplaceAttributes atts;
virtual avtFilter *GetFacadedFilter();
virtual const avtFilter *GetFacadedFilter() const;
};
#endif
......@@ -175,3 +175,21 @@ avtElevateFilter::GetFacadedFilter(void)
{
return surface_filter;
}
// ****************************************************************************
// Method: avtResamplePluginFilter::GetFacadedFilter
//
// Purpose:
// Gets the filter that the filter that we are a facade of.
//
// Programmer: Tom Fogal
// Creation: June 23, 2009
//
// ****************************************************************************
const avtFilter *
avtElevateFilter::GetFacadedFilter(void) const
{
return surface_filter;
}
......@@ -62,6 +62,11 @@ class avtSurfaceFilter;
// Programmer: childs -- generated by xml2avt
// Creation: Sun Jan 30 13:31:28 PST 2005
//
// Modifications:
//
// Tom Fogal, Tue Jun 23 20:46:11 MDT 2009
// Added const version of GetFacadedFilter.
//
// ****************************************************************************
class avtElevateFilter : virtual public avtPluginFilter,
......@@ -84,10 +89,9 @@ class avtElevateFilter : virtual public avtPluginFilter,
avtSurfaceFilter *surface_filter;
ElevateAttributes atts;
virtual avtFilter *GetFacadedFilter();
virtual avtFilter *GetFacadedFilter();
virtual const avtFilter *GetFacadedFilter() const;
};
#endif
......@@ -195,3 +195,24 @@ avtExternalSurfaceFilter::GetFacadedFilter(void)
// Stupid compilers dislike this one...
// return (atts.GetRemoveGhosts() ? gz_and_ff : ff);
}
// ****************************************************************************
// Method: avtExternalSurfaceFilter::GetFacadedFilter
//
// Purpose:
// Gets the filter that we are a facade of.
//
// Returns: The output dataset.
//
// Programmer: Tom Fogal
// Creation: June 23, 2009
//
// ****************************************************************************
const avtFilter *
avtExternalSurfaceFilter::GetFacadedFilter(void) const
{
if (atts.GetRemoveGhosts())
return gz_and_ff;
return ff;
}
......@@ -68,6 +68,9 @@ class avtGhostZoneAndFacelistFilter;
// Hank Childs, Tue Aug 23 09:49:57 PDT 2005
// Add support for ghost zone removal.
//
// Tom Fogal, Tue Jun 23 20:48:20 MDT 2009
// Added const version of GetFacadedFilter.
//
// ****************************************************************************
class avtExternalSurfaceFilter : virtual public avtPluginFilter,
......@@ -92,7 +95,7 @@ class avtExternalSurfaceFilter : virtual public avtPluginFilter,
ExternalSurfaceAttributes atts;
virtual avtFilter *GetFacadedFilter();
virtual const avtFilter *GetFacadedFilter() const;
};
#endif
......@@ -174,3 +174,19 @@ avtIsosurfaceFilter::GetFacadedFilter(void)
return cf;
}
// ****************************************************************************
// Method: avtIsosurfaceFilter::GetFacadedFilter
//
// Purpose:
// Gets the filter that the filter that we are a facade of.
//
// Programmer: Tom Fogal
// Creation: June 23, 2009
//
// ****************************************************************************
const avtFilter *
avtIsosurfaceFilter::GetFacadedFilter(void) const
{
return cf;
}
......@@ -62,6 +62,11 @@ class avtContourFilter;
// Programmer: childs -- generated by xml2info
// Creation: Tue Apr 16 10:37:31 PDT 2002
//
// Modifications:
//
// Tom Fogal, Tue Jun 23 20:49:34 MDT 2009
// Added const version of GetFacadedFilter.
//
// ****************************************************************************
class avtIsosurfaceFilter : virtual public avtPluginFilter,
......@@ -85,6 +90,7 @@ class avtIsosurfaceFilter : virtual public avtPluginFilter,
IsosurfaceAttributes atts;
virtual avtFilter *GetFacadedFilter();
virtual const avtFilter *GetFacadedFilter() const;
};
......
......@@ -171,3 +171,19 @@ avtLineoutPluginFilter::GetFacadedFilter(void)
}
// ****************************************************************************
// Method: avtLineoutPluginFilter::GetFacadedFilter
//
// Purpose:
// Gets the filter that the filter that we are a facade of.
//
// Programmer: Tom Fogal
// Creation: June 23, 2009
//
// ****************************************************************************
const avtFilter *
avtLineoutPluginFilter::GetFacadedFilter(void) const
{
return lineouter;
}
......@@ -60,6 +60,11 @@ class avtLineoutFilter;
// Programmer: childs -- generated by xml2avt
// Creation: January 24, 2008
//
// Modifications:
//
// Tom Fogal, Tue Jun 23 20:50:44 MDT 2009
// Added const version of GetFacadedFilter.
//
// ****************************************************************************
class avtLineoutPluginFilter : virtual public avtPluginFilter,
......@@ -83,9 +88,7 @@ class avtLineoutPluginFilter : virtual public avtPluginFilter,
LineoutAttributes atts;
virtual avtFilter *GetFacadedFilter();
virtual const avtFilter *GetFacadedFilter() const;
};
#endif
......@@ -162,3 +162,19 @@ avtMergeFilter::GetFacadedFilter(void)
}
// ****************************************************************************
// Method: avtMergeFilter::GetFacadedFilter
//
// Purpose:
// Gets the filter that we are a facade of.
//
// Programmer: Tom Fogal
// Creation: June 23, 2009
//
// ****************************************************************************
const avtFilter *
avtMergeFilter::GetFacadedFilter(void) const
{
return ctf;
}
......@@ -62,6 +62,11 @@ class avtCompactTreeFilter;
// Programmer: childs -- generated by xml2avt
// Creation: Sun Aug 14 17:16:45 PST 2005
//
// Modifications:
//
// Tom Fogal, Tue Jun 23 20:51:36 MDT 2009
// Added const version of GetFacadedFilter.
//
// ****************************************************************************
class avtMergeFilter : virtual public avtPluginFilter,
......@@ -86,6 +91,7 @@ class avtMergeFilter : virtual public avtPluginFilter,
avtCompactTreeFilter *ctf;
virtual avtFilter *GetFacadedFilter();
virtual const avtFilter *GetFacadedFilter() const;
};
......
......@@ -207,3 +207,19 @@ avtResamplePluginFilter::GetFacadedFilter(void)
}
// ****************************************************************************
// Method: avtResamplePluginFilter::GetFacadedFilter
//
// Purpose:
// Gets the filter that the filter that we are a facade of.
//
// Programmer: Tom Fogal
// Creation: June 23, 2009
//
// ****************************************************************************
const avtFilter *
avtResamplePluginFilter::GetFacadedFilter(void) const
{
return resampler;
}
......@@ -65,6 +65,9 @@ class avtResampleFilter;
// Hank Childs, Wed Dec 31 14:27:47 PST 2008
// Renamed ResamplePluginAttributes to ResampleAttributes.
//
// Tom Fogal, Tue Jun 23 20:52:29 MDT 2009
// Added const version of GetFacadedFilter.
//
// ****************************************************************************
class avtResamplePluginFilter : virtual public avtPluginFilter,
......@@ -88,7 +91,7 @@ class avtResamplePluginFilter : virtual public avtPluginFilter,
ResampleAttributes atts;
virtual avtFilter *GetFacadedFilter();
virtual const avtFilter *GetFacadedFilter() const;
};
#endif
......@@ -287,3 +287,24 @@ avtTransformFilter::GetFacadedFilter(void)
}
// ****************************************************************************
// Method: avtTransformFilter::GetFacadedFilter
//
// Purpose:
// Gets the filter we are facading (the similarity transform filter).
//
// Programmer: Tom Fogal
// Creation: June 23, 2009
//
// ****************************************************************************
const avtFilter *
avtTransformFilter::GetFacadedFilter(void) const
{
if (atts.GetTransformType() == TransformAttributes::Similarity)
return stf;
else if (atts.GetTransformType() == TransformAttributes::Coordinate)
return csc;
else
return ltf;
}
......@@ -86,6 +86,9 @@ class avtCoordSystemConvert;
// Jeremy Meredith, Tue Apr 15 13:17:24 EDT 2008
// Added linear transform.
//
// Tom Fogal, Tue Jun 23 20:53:28 MDT 2009
// Added const version of GetFacadedFilter.
//
// ****************************************************************************
class avtTransformFilter : public virtual avtPluginFilter,
......@@ -111,7 +114,7 @@ class avtTransformFilter : public virtual avtPluginFilter,
avtCoordSystemConvert *csc;
virtual avtFilter *GetFacadedFilter(void);
virtual const avtFilter *GetFacadedFilter(void) const;
};
#endif
......@@ -75,29 +75,45 @@ avtCurveFilter::~avtCurveFilter()
// ****************************************************************************
// Method: avtCurveFilter::GetFacadedFilter
//
// Purpose:
// Purpose:
// Gets the facaded filter
//
// Programmer: Hank Childs
// Creation: October 3, 2003
//
// ***********