Changes between Version 5 and Version 6 of Session2


Ignore:
Timestamp:
Oct 1, 2015, 9:06:47 AM (10 years ago)
Author:
Greg Couch
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Session2

    v5 v6  
    9797=== The Solution ===
    9898
    99 Circular dependencies are natural.  So use two-phase initialization when deserializing a session.
     99To allow the data to be serialized in session order instead of dependent order, allow for circular dependencies. That mandates using two-phase initialization when deserializing a session.
    100100
    101 Really don't want to use two-phase initialization for C++ objects.  So don't.  As long as the C++ objects are restored all together (//i.e.//, atomic structures and pseudobonds), we can avoid two-phase initialization for them.  If the C++ objects refer to Python objects, that part would need to follow a two-phase protocol.
     101We really, really don't want to use two-phase initialization for C++ objects.
     102So don't.
     103As long as the C++ objects are restored all together (//i.e.//, atomic structures and pseudobonds), we can avoid two-phase initialization for them.  If the C++ objects refer to Python objects, that part would need to follow a two-phase protocol.
    102104
    103105On the Python side, it is possible to provide an API that takes simple data and implements all of the individual save and restore steps.
     
    109111* When registering a tool's commands, it needs the !ToolInfo instance, just like starting a tool's GUI to be able set the the 'tool_info' attribute if there is no GUI
    110112* The tool's module needs a 'get_class' function to return the class associated with a name.
    111 * Tool classes might have an alternate initializer if attributes are not simple
     113* Tool classes might have an alternate initializer if attributes are not simple (like pickle)