On Jun 20, 2011, at 5:01 PM, David García Garzón wrote:

> Xavi is working rigth now in supporting optional attributes in dynamic types 
> (configurations) from ipyclam. For that he needs interface to add and remove 
> an attribute by index which does not exist (there is a private AddAtttr_ 
> which 
> requires the size of the type as second parameter which is too much an 
> implementation detail.
> 
> I changed AddAttr_ to use the size already stored in the attribute 
> information 
> struct and not requiring the size parameter (patch attached). But, still the 
> method names are not ready for a public interface. What about:
>       void AddAttribute(unsigned i)
>       void AddDynamicTypeAttribute(unsigned i)
>       void AddAttributeByIndex(unsigned i)
> Any thoughs or preferences?
> 

Either AddAttribute or AddAttributeByIndex makes sense for me. Maybe I balance
more in favor of AddAttributeByIndex because it's what the method really does. 
Perhaps
some day someone will come along needing an AddAttributeByName method
and it will be strange having one called AddAttribute

> Note to Xavi: If we can take the size from that description table, there is 
> no 
> need to implement a chained method as i told you. (me overdesigning again)
> 
> David.
> 
> 
> <AddAttr.patch>_______________________________________________
> clam-devel mailing list
> clam-devel@lists.clam-project.org
> http://lists.clam-project.org/listinfo.cgi/clam-devel-clam-project.org

_______________________________________________
clam-devel mailing list
clam-devel@lists.clam-project.org
http://lists.clam-project.org/listinfo.cgi/clam-devel-clam-project.org

Reply via email to