summaryrefslogtreecommitdiff
path: root/TAO/examples/Advanced/ch_18/CHANGES
blob: 404883d09dedba7b62ee06b526eb616413268837 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
$Id$

Changelog for chapter 8 and 10  example in "Advanced CORBA 
Programming with C++" by Michi Henning and Steve Vinoski, 
Copyright 1999, Addison-Wesley, Reading, MA.  The following 
changes have been made to the book's source code to make the 
example work with TAO and with various platforms and compilers.

_______________________________________________________________________________
ESSENTIAL CHANGES:
  1. Changed filename extensions from .hh and .cc to .h 
     and .cpp, and made all necessary changes in file content.

  2. a) Commented-out "#include <corba/poaS.h>" in server.h
    
     b) Added #include "icp.h" to server.h.
    
     c) changed #include <CosNaming.h> to <orbsvcs/CosNamingC.h>
        in server.cpp and client.cpp

     d) Unnecessary standard includes of <iostreams.h>, <assert.h>,
        <fstream.h> and <stdlib.h> must be removed or moved to follow the 
        local includes in server.h, server.cpp, client.cpp, and icp.cpp.
     
     e) The following files may need their includes further rearranged 
        to avoid warnings and errors (g++). The following orderings 
        seem to work fine:   
          - server.cpp: "server.h", <algorithm>, "icp.h", 
                        <orbsvcs/CosNamingC.h>, <strstream.h>  
          - server.h:   "CCSS.h", "icp.h", <map>, <list>

  3. Added CORBA_Environment variable to 
     DeviceLocator::preinvoke() and ::postinvoke() 
     in server.h and server.cpp to match the signatures of parent
     methods in TAO's ServanLocator class.

  4. removed if 0 code surrounding
     operator<<(ostream & os, const CCS::Controller::EChange & ec)
     definition in server.cpp and client.cpp.

  5. commented-out "delete this;" from method 
     Thermometer_impl::remove() in server.cpp.
     (Change should soon be reflected in authors' code)

_______________________________________________________________________________
ADDITIONAL CHANGES:
  6. Added .in() to _var parameters wherever needed:
     -client.cpp: 
         4 times in operator<<(ostream, CCS::Thermometer_ptr)
         3 times in resolve_init()
         3 times in resolve_name()        
         5 times in main()
         Also added .inout() 2 times in main() for parameters to set_temp()
     
     -server.cpp:
         3 changes in resolve_init()
         2 changes in make_dref()
         2 changes in Controller_impl::Controller_impl()
         3 changes in Controller_impl::~Controller_impl()
         1 change in Controller_impl::create_thermometer()
         2 changes in Controller_impl::create_thermostat()
         1 change in Controller_impl::list()
         3 changes in Controller_impl::find()
         7 change in main()

  7. created needed file at /tmp/CCS_DB. (location is hard-coded)
     To run, move CCS_DB from this directory to /tmp on the 
     local machine.

  8. fixed warnings by commented out unused parameters in 
       -DeviceLocator_impl::postinvoke(..) in server.h
       -DeviceLocator_impl::preinvoke(..) in server.cpp

  9. MAX_EQ_SIZE changed from int to unsigned int
     in class DeviceLocator_impl in server.h.

  10. added cast to unsigned long in ~ICP_Persist() in icp.cpp:
      db << (unsigned long)(i->second.type) << endl;

_______________________________________________________________________________
To Do:
  - fix error on 4 cases of fstream.close() 
    in server.cpp and icp.cpp, now commented-out