[Fclib-general] Where is the source?
Status: Pre-Alpha
Brought to you by:
rjcjr9
From: <rob...@at...> - 2001-11-29 19:15:40
|
Sorry for not having posted any source code yet. I'm applying the finishing touches, including reorganizing the directory hierarchy. Of course, when I do upload it, it will only be the beginning. I intend for FastClass to provide a uniform interface for all the services normally provided by different CAD programs' APIs. It can't be done all at once, so the order of development reflects my own personal needs at the time. The first classes will provide support for: (1) Abstract entity and graphical entity types. Concrete "wire-frame" entities (e.g., point, line, arc). Primarily read operations, since I am working on a data exporter. (2) An entity factory, which provides a uniform interface for creating entities, regardless of the target platform (e.g., CADKey or AutoCAD). Currently, usage is like: fcLineEnt = entFactorySingleton->makeLine(); But I intend to replace explicit function names with a registry, for extensibility. For example: fcLineEnt = entFactorySingleton->make("LINE"); See the book _Design Patterns: Elements of Reusable Object-Oriented Software_ (Gamma, et al) for details on the object factory (and singleton) design pattern. (3) An abstract visitor class, which provides a single point of entry for any function that operates on entities (and other FastClass objects, eventually). The visitor design pattern allows double-dispatch functions in C++ (i.e., the code that is executed depends on both the visitor class and the entity class). See also Gamma, et al for details on the visitor design pattern. (4) A parallel CADKey hierarchy, which implements FastClass for use with CADKey. Currently, to use FastClass with a given CAD platform, only a counterpart for the fcEnt heirarchy needs to be written. The rest of library references only itself. No doubt, this will change as more functionality and complexity is added. But the goal is to implement as much advanced functionality as possible using only the FastClass API. (5) A demo application, ckExplorer. Pick and select entities to see their attributes. Will later extend to include non-graphical entities (e.g., layouts and views) and editing of attributes. Will also support platforms other than CADKey, but currently it uses a unique CADKey user interface element (the conversation bar). I will release the source code as soon as possible. Until then, please don't hesitate to ask any questions. Thanks, Rob Campbell rob...@at... |