The Factory Approach to Creating TSTT Meshes
[摘要] The factory approach (a.k.a. virtual constructor) hides the details of the class implementing the TSTT from TSTT users. In version 0.5 of TSTT.sidl, the client hard codes the name of the implementing class into their code. The client is forced to choose from the small set of possible concrete classes defined in TSTT.sidl. This approach makes it impossible to support multiple implementations of the TSTT in a single process because each implementation has to implement the same class. The factory approach hides the details of mesh creation from the client. The client does not need to know the name of the implementing class, and the client can dynamically determine which interfaces are supported by the new mesh. A factory can support multiple TSTT implementation because each implementation defines its own concrete classes to implement. The factory approach does require the TSTT compliant mesh packages to implement a MeshFactory interface, and everyone needs to link against an implementation of the Registry. The Registry only has 7 methods that are fairly easy to implement, and everyone can share one implementation of the Registry.
[发布日期] 2003-10-21 [发布机构] Lawrence Livermore National Laboratory
[效力级别] [学科分类]
[关键词] Implementation;T Codes;Mesh Generation;99 General And Miscellaneous//Mathematics, Computing, And Information Science [时效性]