From: Kevin M. <ke...@vr...> - 2002-05-30 21:25:48
|
> > Not a book, but experience. When an object has a property, do you write a > set/make method pair to manipulate it or a set/get pair? What does the > industry standard tell you? What does any UML tool use while reverse > engineering a diagram from the code to determine an object's properties? > might need a get for retrieval. but we know all gets are actually sets... :) and we also know the gets and sets don't return out the back (just because of how we chose to implement - object oriented C). since you wanted it out the back as temporary, then it is make. I can't remember what the original issue is anymore. Does this clear it up? just write a set( vec, mat ) and a set (mat, vec), and you'll be golden. if you need a constructor, use "make"... The only way to have constructors in C, or the only way to decouple constructors from C++ objects is to have "make" functions. Is it the naming you don't like? I don't see the problem I guess... kevin |