Next Prev Up Top Contents Index

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*
  #+Harlequin-PC-Lisp "c:/temp/hello.ior"
  #-Harlequin-PC-Lisp "/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 - 14 Dec 2001

Next Prev Up Top Contents Index