NextPrevUpTopContentsIndex

2.2.3 The complete source code for the file transfer of the IOR

The complete code for the Interoperable Object Reference (IOR) file transfer (the shared.lisp file) is:

(in-package "CL-USER")
(defparameter *hello-world-ior-file* 
  #+Win32 "c:/temp/hello.ior"
  #-Win32 "/tmp/hello.ior")
(defun object-to-file (orb object)
  (with-open-file (st *hello-world-ior-file* :direction :output
                                          :if-exists :supersede)
    (prin1 (op:object_to_string orb object) st)))
(defun file-to-object (orb)
  (with-open-file (st *hello-world-ior-file*)
    (op:string_to_object orb (read st))))

Developing Component Software with CORBA - 23 Mar 2005

NextPrevUpTopContentsIndex