[interfacekit] Re: GraphicsDefs.h addition

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: interfacekit@xxxxxxxxxxxxx
  • Date: Mon, 10 Jan 2005 17:23:34 +0100 CET

"Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx> wrote:
> As you might have realized, this extends rgb_color. Similar (and 
> more) 
> is done in Dano, but I think this is the minimum must have. A SetTo() 
> method would be great, too, but for unknown reasons it has been 
> called 
> set_to() in Dano, so I wanted to hear your comments first. Since it's 
> defined inline anyway, I think we can safely rename it too SetTo()/
> Set() without too much annoyance - I never liked Set() because it's 
> mostly SetTo() elsewhere, but with regard to graphics, Set() seems to 
> be used consistently as well.

I just realized that all Set()/SetTo() examples were classes. The only 
"struct"s with a similar usage I found are entry_ref and media_format - 
and there, the former uses set_name() (it doesn't even have a SetTo() 
like function), while the latter uses SetMetaData() like it would have 
been for classes.
IOW there is no real standard and we're free to chose anything we'd 
like to. Consistency would be a great thing, though - maybe we should 
introduce inline versions of SetTo() to all of these cases, and keep 
the other version around only for compatibility (I'm thinking of 
BPoint, BRect, BRegion, ...).
What do you think?

Bye,
   Axel.


Other related posts: