From: Reed H. <re...@in...> - 2005-11-19 21:23:09
|
I looked at node_class a bit but don't remember exactly how it works, but "factory" does imply a specific way of operating. Could a node_metatype in fact be a kind of node_type? Then you could just have "nothing but node_types all the way down" :) Either way, but yes, I did find the whole idea of node_class a bit mysterious at first, partly because I didn't know what _class meant. Most of us openvrml users won't need to deal with node_class anyway if we're not creating new types of nodes, right? So the documentation could just say so and we could skip over it. Reed Braden McDaniel wrote: > I've been reminded recently that the distinction between "node_class" > and "node_type" can be confusing; and I'm inclined to believe this is > mostly because of how they're named. OOP tends to treat the terms > "class" and "type" as synonyms. But in OpenVRML, a node_class is very > different from a node_type. > > I believe node_type is pretty accurately named. It corresponds to what > the VRML97 spec calls a "node type". node_class, on the other hand, > doesn't exactly correspond to anything in the spec. A concrete > node_class provides a sort of foundation for the implementation of a > suite of node_types that share that implementation. As such, it is > closest to the VRML spec's concept of a PROTO. However, while a PROTO > could be considered a "kind of" node_class (and in fact OpenVRML > implements PROTOs that way), not all node_classes are PROTOs. > > So I am considering renaming "node_class". The frontrunner in my mind at > the moment is "node_metatype". This class is responsible for creating > node_types; and it can create n! distinct node_types, where n is the > number of node interfaces supported by the node implementation. > > "node_type_factory" has also been suggested. It is accurate; this class > is a factory for node_types. However, it strikes me as less expressive > than "node_metatype". > > Opinions? Other suggestions? > > Braden > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. Get Certified Today > Register for a JBoss Training Course. Free Certification Exam > for All Training Attendees Through End of 2005. For more info visit: > http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click > _______________________________________________ > openvrml-develop mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/openvrml-develop |