XSnoed and SNOMAN are two very complex programs. The combination of the two (which will be named here 'XSnoman') sometimes seems like a shotgun marriage.
In the most general form, XSnoed runs inside SNOMAN. When the XED processor is called, it passes execution to the main event loop in XSnoed, which then behaves like an X-Windows program until the user requests a new event. At that time, the X-Windows program freezes and control passes back to SNOMAN.
This setup has the obvious drawback that the user is forced to sit and wait while SNOMAN cranks through it's data, but is otherwise very powerful, since the user gains both the intuitive user inteface, and can also make use of the powerful programmable event loop structure.
The code can be divided into three groups: SNOMAN code, XSnoed code, and the XED code (which is in both Fortran and C++). In general, SNOMAN knows nothing about XSnoed and vice versa, but XED knows about both. XSnoed stores all of it's data in a single C struct called 'ImageData'.