Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] About to commit major change to Attributes on HEAD

Randy
Based on our discussion last week, where at worst, I should see some 
additional warning messages, I think this is ok.
Dave



"Randy M. Roberts" <rsqrd@xxxxxxxx> 
Sent by: ptp-dev-bounces@xxxxxxxxxxx
05/29/2007 07:26 PM
Please respond to
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>


To
ptp-dev <ptp-dev@xxxxxxxxxxx>
cc

Subject
[ptp-dev] About to commit major change to Attributes on HEAD






Dave, Greg, Craig, others concerned,

I am about to commit a major change in the Attribute system.
It covers 93 files.

Attributes and AttributeDefinitions are now parameterized by
three types, e.g. the new definition for IAttribute is

public interface IAttribute<T, A extends IAttribute<T,A,D>, D extends
IAttributeDefinition<T,A,D>>
extends Comparable<A> {
 
                 /**
                  * @return the attribute definition object associated 
with this
attribute
                  */
                 public D getDefinition();
 
                 /**
                  * @return
                  */
                 public T getValue();
 
                 /**
                  * @return string
                  */
                 public String getValueAsString();
 
                 /**
                  * @return whether any UI elements for this attribute
                  * should be enabled.
                  */
                 public boolean isEnabled();
 
                 /**
                  * Is the string parsable to a valid
                  * attribute of this type?
                  * 
                  * @param string
                  * @return
                  */
                 public boolean isValid(String string);
 
                 /**
                  * @param value
                  * @throws IllegalValueException
                  */
                 public void setValue(T value) throws 
IllegalValueException;
 
                 /**
                  * @param string
                  * @throws IAttribute.IllegalValue
                  */
                 public void setValueAsString(String string) throws
IllegalValueException;
}

The same change has been made for AttributeDefinition's.

Also note that ArrayAttribute is parameterized on its
contained type.  Its getValue() now returns a List<T> instead of
T[].

Let me know if there is any reason not to commit these changes.

Regards,
Randy
-- 
Randy M. Roberts
rsqrd@xxxxxxxx
work: (505)665-4285

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."  -- Benjamin Franklin

_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev




Back to the top