27 #ifndef PLOTMSPLOTPARAMETERS_H_
28 #define PLOTMSPLOTPARAMETERS_H_
104 void updated(
bool requiresRedraw);
175 for(
unsigned int i = 0; i <
itsGroups_.size(); i++)
176 if((g = dynamic_cast<const T*>(
itsGroups_[i])) != NULL)
return g;
182 for(
unsigned int i = 0; i <
itsGroups_.size(); i++){
183 if((g = dynamic_cast<T*>(
itsGroups_[i])) != NULL)
return g;
228 #define PMS_PP_CALL(PARAMS, GROUP, METHOD, ...) \
229 if( PARAMS .typedGroup< GROUP >() != NULL) \
230 PARAMS .typedGroup< GROUP >()-> METHOD ( __VA_ARGS__ );
232 #define PMS_PP_RETCALL(PARAMS, GROUP, METHOD, DEFAULT, ...) \
233 (PARAMS .typedGroup< GROUP >() == NULL ? DEFAULT : \
234 PARAMS .typedGroup< GROUP >()-> METHOD ( __VA_ARGS__ ))
const Group * group(const casacore::String &name) const
Returns the subparameters group with the given name, or NULL for none.
std::vector< Group * > itsGroups_
Subparameter groups.
static void notifyWatchers(void *obj, bool wasCanceled)
Post-thread method for notifying watchers that this group has changed.
void groupUpdated(Group *group, bool requiresRedraw)
To be called when one of the groups is updated.
StatsData< AccumType > copy(const StatsData< AccumType > &stats)
PlotFactoryPtr factory()
Returns the factory.
PlotFactoryPtr itsFactory_
Factory.
virtual ~Group()
Destructor.
virtual Group & operator=(const Group &other)
Implemented Methods //.
Parameters for a PlotMSPlot.
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
void notifyWatchers_(bool wasCanceled)
Abstract class for parameters that may be watched by one or more interested classes.
virtual bool operator!=(const Group &other) const
void updateFlags(int updateFlags)
Provides access to children to indicate which update flags are on.
void notifyWatchers(const casacore::String &updateName, PlotMSParametersWatcher *updater=NULL)
bool equals(const PlotMSWatchedParameters &other, int updateFlags) const
Implements PlotMSWatchedParameters::equals().
const PlotMSPlotParameters * parent() const
virtual casacore::Record toRecord() const =0
Returns a casacore::Record representing this group of subparameters.
PlotFactoryPtr itsFactory_
Factory.
virtual bool operator==(const Group &other) const
Equality operators.
A hierarchical collection of named fields of various types.
~PlotMSPlotParameters()
Destructor.
virtual Group * clone() const =0
Abstract Methods //.
void setGroup()
Sets (or adds) the default constructor of the templated type of subparameters group.
static int UPDATE_FLAG(const casacore::String &name)
Converts between an update flag's name and value, if valid.
virtual void fromRecord(const casacore::Record &record)=0
Sets the values for this group of subparameters using the given Record.
const PlotFactoryPtr factory() const
Interface for classes that wish to be notified when PlotMSWatchedParameters have changed.
PlotMSPlotParameters * itsParent_
Parent of this group of subparameters.
Group(PlotFactoryPtr factory)
Constructor which takes a plot factory.
PlotMSPlotParameters & operator=(const PlotMSPlotParameters ©)
Copy operator.
String: the storage and methods of handling collections of characters.
PlotMSPlotParameters(PlotFactoryPtr factory)
Non-Static //.
PlotMSPlotParameters * parent()
Returns the parent parameters, or NULL for none.
void notifyWatchers(int updateFlags, PlotMSParametersWatcher *updater=NULL)
Notifies any watchers that the parameters have been updated with the given flags. ...
void updated()
Should be called by the child class whenever any of the subparameter values have been updated...
virtual const casacore::String & name() const =0
Returns the name of this group of subparameters.
const T * typedGroup() const
Returns the templated type of subparameters group, or NULL for none.
virtual bool requiresRedrawOnChange() const =0
Returns true if the plot needs to be redrawn when subpamarameters in this group have changed...