176 lines
5.5 KiB
C++
176 lines
5.5 KiB
C++
// ************************************************************************* //
|
|
// File: H5PartRandomSampleViewerPluginInfo.C
|
|
// ************************************************************************* //
|
|
|
|
#include <H5PartRandomSamplePluginInfo.h>
|
|
#include <H5PartRandomSampleAttributes.h>
|
|
|
|
#if defined(__APPLE__)
|
|
#define GetViewerInfo H5PartRandomSample_GetViewerInfo
|
|
#endif
|
|
|
|
// ****************************************************************************
|
|
// Function: GetViewerInfo
|
|
//
|
|
// Purpose:
|
|
// Return a new ViewerPluginInfo for the H5PartRandomSample operator.
|
|
//
|
|
// Programmer: cristina -- generated by xml2info
|
|
// Creation: Thu Mar 16 10:26:55 PDT 2006
|
|
//
|
|
// ****************************************************************************
|
|
extern "C" ViewerOperatorPluginInfo* GetViewerInfo()
|
|
{
|
|
H5PartRandomSampleViewerPluginInfo::InitializeGlobalObjects();
|
|
return new H5PartRandomSampleViewerPluginInfo;
|
|
}
|
|
|
|
//
|
|
// Storage for static data elements.
|
|
//
|
|
H5PartRandomSampleAttributes *H5PartRandomSampleViewerPluginInfo::clientAtts = NULL;
|
|
H5PartRandomSampleAttributes *H5PartRandomSampleViewerPluginInfo::defaultAtts = NULL;
|
|
|
|
// ****************************************************************************
|
|
// Method: H5PartRandomSampleViewerPluginInfo::InitializeGlobalObjects
|
|
//
|
|
// Purpose:
|
|
// Initialize the operator atts.
|
|
//
|
|
// Programmer: cristina -- generated by xml2info
|
|
// Creation: Thu Mar 16 10:26:55 PDT 2006
|
|
//
|
|
// ****************************************************************************
|
|
void
|
|
H5PartRandomSampleViewerPluginInfo::InitializeGlobalObjects()
|
|
{
|
|
H5PartRandomSampleViewerPluginInfo::clientAtts = new H5PartRandomSampleAttributes;
|
|
H5PartRandomSampleViewerPluginInfo::defaultAtts = new H5PartRandomSampleAttributes;
|
|
}
|
|
|
|
// ****************************************************************************
|
|
// Method: H5PartRandomSampleViewerPluginInfo::GetClientAtts
|
|
//
|
|
// Purpose:
|
|
// Return a pointer to the viewer client attributes.
|
|
//
|
|
// Returns: A pointer to the viewer client attributes.
|
|
//
|
|
// Programmer: cristina -- generated by xml2info
|
|
// Creation: Thu Mar 16 10:26:55 PDT 2006
|
|
//
|
|
// ****************************************************************************
|
|
|
|
AttributeSubject *
|
|
H5PartRandomSampleViewerPluginInfo::GetClientAtts()
|
|
{
|
|
return clientAtts;
|
|
}
|
|
|
|
// ****************************************************************************
|
|
// Method: H5PartRandomSampleViewerPluginInfo::GetDefaultAtts
|
|
//
|
|
// Purpose:
|
|
// Return a pointer to the viewer default attributes.
|
|
//
|
|
// Returns: A pointer to the viewer default attributes.
|
|
//
|
|
// Programmer: cristina -- generated by xml2info
|
|
// Creation: Thu Mar 16 10:26:55 PDT 2006
|
|
//
|
|
// ****************************************************************************
|
|
|
|
AttributeSubject *
|
|
H5PartRandomSampleViewerPluginInfo::GetDefaultAtts()
|
|
{
|
|
return defaultAtts;
|
|
}
|
|
|
|
// ****************************************************************************
|
|
// Method: H5PartRandomSampleViewerPluginInfo::SetClientAtts
|
|
//
|
|
// Purpose:
|
|
// Set the viewer client attributes.
|
|
//
|
|
// Arguments:
|
|
// atts A pointer to the new client attributes.
|
|
//
|
|
// Programmer: cristina -- generated by xml2info
|
|
// Creation: Thu Mar 16 10:26:55 PDT 2006
|
|
//
|
|
// ****************************************************************************
|
|
|
|
void
|
|
H5PartRandomSampleViewerPluginInfo::SetClientAtts(AttributeSubject *atts)
|
|
{
|
|
*clientAtts = *(H5PartRandomSampleAttributes *)atts;
|
|
clientAtts->Notify();
|
|
}
|
|
|
|
// ****************************************************************************
|
|
// Method: H5PartRandomSampleViewerPluginInfo::GetClientAtts
|
|
//
|
|
// Purpose:
|
|
// Get the viewer client attributes.
|
|
//
|
|
// Arguments:
|
|
// atts A pointer to return the client default attributes in.
|
|
//
|
|
// Programmer: cristina -- generated by xml2info
|
|
// Creation: Thu Mar 16 10:26:55 PDT 2006
|
|
//
|
|
// ****************************************************************************
|
|
|
|
void
|
|
H5PartRandomSampleViewerPluginInfo::GetClientAtts(AttributeSubject *atts)
|
|
{
|
|
*(H5PartRandomSampleAttributes *)atts = *clientAtts;
|
|
}
|
|
|
|
// ****************************************************************************
|
|
// Method: H5PartRandomSampleViewerPluginInfo::InitializeOperatorAtts
|
|
//
|
|
// Purpose:
|
|
// Initialize the operator attributes to the default attributes.
|
|
//
|
|
// Arguments:
|
|
// atts The attribute subject to initialize.
|
|
// md The metadata used to initialize.
|
|
// atts The variable name used to initialize.
|
|
//
|
|
// Programmer: cristina -- generated by xml2info
|
|
// Creation: Thu Mar 16 10:26:55 PDT 2006
|
|
//
|
|
// ****************************************************************************
|
|
|
|
void
|
|
H5PartRandomSampleViewerPluginInfo::InitializeOperatorAtts(AttributeSubject *atts,
|
|
const ViewerPlot *plot,
|
|
const bool fromDefault)
|
|
{
|
|
if (fromDefault)
|
|
*(H5PartRandomSampleAttributes*)atts = *defaultAtts;
|
|
else
|
|
*(H5PartRandomSampleAttributes*)atts = *clientAtts;
|
|
}
|
|
|
|
// ****************************************************************************
|
|
// Method: H5PartRandomSampleViewerPluginInfo::XPMIconData
|
|
//
|
|
// Purpose:
|
|
// Return a pointer to the icon data.
|
|
//
|
|
// Returns: A pointer to the icon data.
|
|
//
|
|
// Programmer: cristina -- generated by xml2info
|
|
// Creation: Thu Mar 16 10:26:55 PDT 2006
|
|
//
|
|
// ****************************************************************************
|
|
|
|
#include <icon.xpm>
|
|
const char **
|
|
H5PartRandomSampleViewerPluginInfo::XPMIconData() const
|
|
{
|
|
return icon_xpm;
|
|
}
|