DefaultParameterPort Class Reference

#include <DefaultParameterPort.h>

Inheritance diagram for DefaultParameterPort:

Inheritance graph
[legend]
Collaboration diagram for DefaultParameterPort:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual int setConfigurationString (char *fieldName, char *value)
virtual char * getConfigurationString (char *infix)
virtual char * getConfigurationString (char *infix, char *fieldName)
bool isFullyConfigured ()
void clearRequests ()
void setUpdater (ParameterGetListener *po)
void setUpdatedListener (ParameterSetListener *po)
void setBatchTitle (char *title_)
void setGroupName (char *name)
void addRequest (BaseParameter *p)
BaseParametergetParameter (char *name)

Private Attributes

::std::vector< ::std::vector
< ::dpp::tvElement > > 
tabVector
::std::vector< BaseParameter * > pVector
char * title
bool configured
int requestCount
::std::vector
< ParameterGetListener * > 
getListeners
::std::vector
< ParameterSetListener * > 
setListeners


Detailed Description

So the idea is for the component to create and hand to us a bunch of parameter objects that it has its own references to.

At such time as isConfigured returns true, the component can use these objects as user-blessed input. Each parameter.value has been initialized.

This is our default implementation of the ConfigurableParameterPort interface.


Member Function Documentation

virtual int DefaultParameterPort::setConfigurationString ( char *  fieldName,
char *  value 
) [virtual]

Returns 0 if success, -1 if error.

Implements ConfigurableParameterPort.

virtual char* DefaultParameterPort::getConfigurationString ( char *  infix  )  [virtual]

Return stringified form of all known requests, with embedded title/tab information.

Implements ConfigurableParameterPort.

virtual char* DefaultParameterPort::getConfigurationString ( char *  infix,
char *  fieldName 
) [virtual]

Return the stringified form of a specific field in the parameter page. Does not call ParameterGetListeners.

Implements ConfigurableParameterPort.

bool DefaultParameterPort::isFullyConfigured (  )  [virtual]

Methods used by the component that is putting user in charge of the tunable parameters. Returns TRUE if current set of requests has been explicitly blessed by the user. FALSE otherwise. Since all parameters come with a default, use of this is just a policy option.

Implements ConfigurableParameterPort.

void DefaultParameterPort::clearRequests (  )  [virtual]

Clear all previously added requests, titles, groups.

Implements ConfigurableParameterPort.

void DefaultParameterPort::setUpdater ( ParameterGetListener po  )  [virtual]

give the creator of a parameter port a chance to update its contents. Is called in getConfigurationString();

Implements ConfigurableParameterPort.

void DefaultParameterPort::setUpdatedListener ( ParameterSetListener powner  )  [virtual]

Register listeners who care that an parameter is set. Listeners are called after values are set.

Implements ConfigurableParameterPort.

void DefaultParameterPort::setBatchTitle ( char *  title_  )  [virtual]

A batch of requests may have a title/banner String. A typical use of the title is at the top of a gui window. A framework is likely to prefix the title with a component name.

Implements ConfigurableParameterPort.

void DefaultParameterPort::setGroupName ( char *  name  )  [virtual]

The requests in a batch may be grouped with this call, the name attaching to all requests made after this call until another of these calls is made. The name is typically used as the key on a tabbed dialog or a text screen region.

Implements ConfigurableParameterPort.

void DefaultParameterPort::addRequest ( BaseParameter p  )  [virtual]

The following characters in strings associated with this interface may make for misbehavior of certain Views of this port : "\n\r\t"

The prompt string to display (if not NULL) will be presented to the human and an appropriate response will be returned.

If the help string is not NULL, and the user asks for help, then the help string will be presented to the human.

Appropriate responses are those which fall in the range (or CHOICE) given by the caller. (specific semantics per parameter type.)

The user input is the value in each function. The Default value must be supplied. Out of range Defaults will be mapped to the first/lowest value allowed. p may be any of the parameters from the parameters package. e.g. StringParameter sp = new StringParameter("foo","bar","loser"); sp->addChoice("winner"); sp->addChoice("village idiot"); pp->addRequest(sp); pp->addRequest(new IntParameter("foo","bar",0,-10,10));

Implements ConfigurableParameterPort.

BaseParameter* DefaultParameterPort::getParameter ( char *  name  )  [virtual]

return the named parameter object if it exists.

Implements ConfigurableParameterPort.


Member Data Documentation

::std::vector< ::std::vector< ::dpp::tvElement > > DefaultParameterPort::tabVector [private]

The tabVector is a list of other vectors. For each of these othervectors, the first entry is the groupName String. The pVector is a flat list of all the parameters, in the order added.


The documentation for this class was generated from the following file:

Generated on Thu Mar 17 13:10:39 2011 for CCAFFEINE by  doxygen 1.5.9