From: Braden M. <br...@en...> - 2005-11-17 20:53:56
|
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 |