All Manuals > Developing Component Software with CORBA > 2 Quick Start Tutorial > 2.2 Complete source code for the Hello World example

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* 
  #+mswindows "c:/temp/hello.ior"
  #-mswindows "/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 - 29 Jul 2010

NextPrevUpTopContentsIndex