Changeset 19540
- Timestamp:
- 11/15/06 10:20:34 (2 years ago)
- Files:
-
- juggler/trunk/modules/tweek/ChangeLog (modified) (1 diff)
- juggler/trunk/modules/tweek/VERSION (modified) (1 diff)
- juggler/trunk/modules/tweek/doc/programmer.guide/programmer.guide.xml (modified) (12 diffs)
- juggler/trunk/modules/tweek/test/BeanDeliveryTest/deliveryServer.cpp (modified) (3 diffs)
- juggler/trunk/modules/tweek/test/CxxClient/client.cpp (modified) (1 diff)
- juggler/trunk/modules/tweek/test/CxxClient/server.cpp (modified) (3 diffs)
- juggler/trunk/modules/tweek/test/NetworkTestBean/main.cpp (modified) (3 diffs)
- juggler/trunk/modules/tweek/test/corba/main.cpp (modified) (2 diffs)
- juggler/trunk/modules/tweek/tweek/CORBA/CorbaManager.cpp (modified) (15 diffs)
- juggler/trunk/modules/tweek/tweek/CORBA/CorbaManager.h (modified) (5 diffs)
- juggler/trunk/modules/tweek/tweek/CORBA/SubjectManagerImpl.cpp (modified) (2 diffs)
- juggler/trunk/modules/tweek/tweek/CORBA/SubjectManagerImpl.h (modified) (1 diff)
- juggler/trunk/modules/tweek/tweek/Client/CorbaService.cpp (modified) (6 diffs)
- juggler/trunk/modules/tweek/tweek/Client/CorbaService.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
juggler/trunk/modules/tweek/ChangeLog
r19384 r19540 1 1 DATE AUTHOR CHANGE 2 2 ---------- ----------- -------------------------------------------------------- 3 2006-11-15 patrick Replaced the use of vpr::ReturnStatus with bool in 4 tweek::CorbaManager, tweek::SubjectManagerImpl, and 5 tweek::CorbaService. 6 NEW VERSION: 1.1.10 3 7 2006-10-01 patrick Updated for VPR 1.1.35. 4 8 NEW VERSION: 1.1.9 juggler/trunk/modules/tweek/VERSION
r19362 r19540 1 1.1.10-0 @11/15/2006 16:20:00 UTC@ 1 2 1.1.9-0 @10/01/2006 21:45:00 UTC@ 2 3 1.1.8-0 @10/01/2006 16:35:00 UTC@ juggler/trunk/modules/tweek/doc/programmer.guide/programmer.guide.xml
r19538 r19540 1170 1170 linkends="TweekApp.cpp.big-try-catch.co" /> 1171 1171 { 1172 if ( mgr.init("example", argc, argv) .success() )<co1172 if ( mgr.init("example", argc, argv) ) <co 1173 1173 id="TweekApp.cpp.corbamgr.init" 1174 1174 linkends="TweekApp.cpp.corbamgr.init.co" /> 1175 1175 { 1176 vpr::ReturnStatus status;1176 bool status(false); 1177 1177 1178 1178 // Once the CORBA Manager is initialized, we need … … 1185 1185 // If we were able to create the Subject Manager, 1186 1186 // now we register our objects with it. 1187 if ( status .success())1187 if ( status ) 1188 1188 { 1189 1189 // First, create real instances of the C++ … … 1218 1218 } 1219 1219 1220 if ( ! status .success())1220 if ( ! status ) 1221 1221 { 1222 1222 vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL) … … 1377 1377 try 1378 1378 { 1379 if ( mgr.init("corba_test", argc, argv) .success())1379 if ( mgr.init("corba_test", argc, argv) ) 1380 1380 { 1381 vpr::ReturnStatus status;1381 bool status(false); 1382 1382 1383 1383 // Once the CORBA Manager is initialized, we need to … … 1392 1392 // If we were able to create the Subject Manager, 1393 1393 // now we register our objects with it. 1394 if ( status .success())1394 if ( status ) 1395 1395 { 1396 1396 // First, create real instances of the C++ … … 1431 1431 } 1432 1432 1433 if ( ! status .success())1433 if ( ! status ) 1434 1434 { 1435 1435 vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL) … … 2401 2401 try 2402 2402 { 2403 if ( mgr.init("corba_test", argc, argv) .success() )<co2403 if ( mgr.init("corba_test", argc, argv) ) <co 2404 2404 id="SliderSubjectApp.cpp.corbamgr.init" 2405 2405 linkends="SliderSubjectApp.cpp.corbamgr.co" /> 2406 2406 { 2407 vpr::ReturnStatus status;2407 bool status(false); 2408 2408 2409 2409 // Once the CORBA Manager is initialized, we need to … … 2418 2418 // If we were able to create the Subject Manager, 2419 2419 // now we register our objects with it. 2420 if ( status .success())2420 if ( status ) 2421 2421 { 2422 2422 // First, create real instances of the C++ … … 2457 2457 } 2458 2458 2459 if ( ! status .success())2459 if ( ! status ) 2460 2460 { 2461 2461 vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL) … … 4401 4401 { 4402 4402 // Attempt to initialize the CORBA Service. 4403 if ( corba_service.init(argc, argv) .success() )<co4403 if ( corba_service.init(argc, argv) ) <co 4404 4404 id="client.cpp.main.corba-service.init" 4405 4405 linkends="client.cpp.main.corba-service.init.co" /> … … 4985 4985 ALL_CLASSES= networktest/*.class 4986 4986 4987 include $(TWEEK_BASE_DIR)/share/tweek/tweek.appdefs.mk 4987 DZR_BASE_DIR= $(shell flagpoll doozer --get-prefix) 4988 include $(DZR_BASE_DIR)/ext/tweek/dzr.tweek.mk 4988 4989 4989 4990 CXX_GEN_DIR= . … … 5062 5063 ALL_CLASSES= fileopentestbean/*.class 5063 5064 5064 include $(TWEEK_BASE_DIR)/share/tweek/tweek.appdefs.mk 5065 DZR_BASE_DIR= $(shell flagpoll doozer --get-prefix) 5066 include $(DZR_BASE_DIR)/ext/tweek/dzr.tweek.mk 5065 5067 5066 5068 # -------------------------------------------------------------- juggler/trunk/modules/tweek/test/BeanDeliveryTest/deliveryServer.cpp
r18824 r19540 47 47 try 48 48 { 49 if ( mgr.init("delivery_test", argc, argv) .success())49 if ( mgr.init("delivery_test", argc, argv) ) 50 50 { 51 vpr::ReturnStatus status;51 bool status(false); 52 52 53 53 // Once the CORBA Manager is initialized, we need to create the … … 59 59 // If we were able to create the Subject Manager, now we register 60 60 // our objects with it. 61 if ( status .success())61 if ( status ) 62 62 { 63 63 tweek::BeanDeliverySubjectImpl* delivery_subject = … … 97 97 } 98 98 99 if ( ! status .success())99 if ( ! status ) 100 100 { 101 101 vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL) juggler/trunk/modules/tweek/test/CxxClient/client.cpp
r18824 r19540 122 122 { 123 123 // Attempt to initialize the CORBA Service. 124 if ( corba_service.init(argc, argv) .success())124 if ( corba_service.init(argc, argv) ) 125 125 { 126 126 // This will hold the reference to the Subject Manager we use. juggler/trunk/modules/tweek/test/CxxClient/server.cpp
r18824 r19540 43 43 try 44 44 { 45 if ( mgr.init("cxx_client_test", argc, argv) .success())45 if ( mgr.init("cxx_client_test", argc, argv) ) 46 46 { 47 vpr::ReturnStatus status;47 bool status(false); 48 48 49 49 // Once the CORBA Manager is initialized, we need to create a … … 55 55 // If we were able to create the Subject Manager, now we register 56 56 // our objects with it. 57 if ( status .success())57 if ( status ) 58 58 { 59 59 // Add a test informational item to the Subject Manager. … … 90 90 } 91 91 92 if ( ! status .success())92 if ( ! status ) 93 93 { 94 94 vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL) juggler/trunk/modules/tweek/test/NetworkTestBean/main.cpp
r18824 r19540 50 50 try 51 51 { 52 if ( mgr.init("corba_test", argc, argv) .success())52 if ( mgr.init("corba_test", argc, argv) ) 53 53 { 54 vpr::ReturnStatus status;54 bool status(false); 55 55 56 56 // Once the CORBA Manager is initialized, we need to create a … … 63 63 // If we were able to create the Subject Manager, now we register 64 64 // our objects with it. 65 if ( status .success())65 if ( status ) 66 66 { 67 67 // Add a test informational item to the Subject Manager. … … 103 103 } 104 104 105 if ( ! status .success())105 if ( ! status ) 106 106 { 107 107 vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL) juggler/trunk/modules/tweek/test/corba/main.cpp
r18824 r19540 37 37 try 38 38 { 39 if ( mgr.init("corba_test", argc, argv) .success())39 if ( mgr.init("corba_test", argc, argv) ) 40 40 { 41 vpr::ReturnStatus status;41 bool status(false); 42 42 43 43 try … … 52 52 } 53 53 54 if ( ! status .success())54 if ( ! status ) 55 55 { 56 56 vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL) juggler/trunk/modules/tweek/tweek/CORBA/CorbaManager.cpp
r19335 r19540 70 70 } 71 71 72 vpr::ReturnStatus CorbaManager::init(const std::string& local_id, int& argc, 73 char** argv, const std::string& nsHost, 74 const vpr::Uint16& nsPort, 75 const std::string& iiopVersion) 76 { 77 vpr::ReturnStatus status; 72 bool CorbaManager::init(const std::string& local_id, int& argc, char** argv, 73 const std::string& nsHost, const vpr::Uint16& nsPort, 74 const std::string& iiopVersion) 75 { 76 bool status(true); 78 77 79 78 // Retrieve the application name from argv if argv is non-NULL. … … 144 143 catch (CORBA::SystemException& sysEx) 145 144 { 146 status .setCode(vpr::ReturnStatus::Fail);145 status = false; 147 146 vprDEBUG(tweekDBG_CORBA, vprDBG_CRITICAL_LVL) 148 147 << "Caught CORBA::SystemException during initialization\n" … … 152 151 catch (CORBA::Exception&) 153 152 { 154 status .setCode(vpr::ReturnStatus::Fail);153 status = false; 155 154 vprDEBUG(tweekDBG_CORBA, vprDBG_CRITICAL_LVL) 156 155 << "Caught CORBA::Exception during initialization.\n" … … 160 159 catch (omniORB::fatalException& fe) 161 160 { 162 status .setCode(vpr::ReturnStatus::Fail);161 status = false; 163 162 vprDEBUG(tweekDBG_CORBA, vprDBG_CRITICAL_LVL) 164 163 << "Caught omniORB::fatalException:\n" << vprDEBUG_FLUSH; … … 173 172 catch (vpr::Exception& ex) 174 173 { 175 status .setCode(vpr::ReturnStatus::Fail);174 status = false; 176 175 vprDEBUG(tweekDBG_CORBA, vprDBG_CRITICAL_LVL) 177 176 << "Caught vpr::Exception during initialization.\n" … … 261 260 } 262 261 263 vpr::ReturnStatusCorbaManager::createSubjectManager()262 bool CorbaManager::createSubjectManager() 264 263 { 265 264 vprASSERT(! CORBA::is_nil(mRootContext) && "No naming service available"); 266 265 vprASSERT(! CORBA::is_nil(mLocalContext) && "No naming service available"); 267 vpr::ReturnStatus status;266 bool status(true); 268 267 269 268 tweek::SubjectManager_var mgr_ptr; … … 291 290 { 292 291 boost::ignore_unused_variable_warning(policy_ex); 293 status .setCode(vpr::ReturnStatus::Fail);292 status = false; 294 293 vprDEBUG(tweekDBG_CORBA, vprDBG_CRITICAL_LVL) 295 294 << "Invalid policy used when activating Subject Manager object\n" … … 300 299 // we couldn't, there is no point in registering anything with the naming 301 300 // service. 302 if ( status .success())301 if ( status ) 303 302 { 304 303 // Try to add the mgr_ptr reference to the bound references known to the … … 368 367 { 369 368 boost::ignore_unused_variable_warning(ex); 370 status .setCode(vpr::ReturnStatus::Fail);369 status = false; 371 370 vprDEBUG(vprDBG_ALL, vprDBG_WARNING_LVL) 372 371 << "Unable to contact the naming service\n" << vprDEBUG_FLUSH; … … 374 373 catch (CORBA::SystemException&) 375 374 { 376 status .setCode(vpr::ReturnStatus::Fail);375 status = false; 377 376 vprDEBUG(vprDBG_ALL, vprDBG_WARNING_LVL) 378 377 << "Caught a CORBA::SystemException while using the naming service" … … 384 383 } 385 384 386 vpr::ReturnStatusCorbaManager::destroySubjectManager()387 { 388 vpr::ReturnStatus status;385 bool CorbaManager::destroySubjectManager() 386 { 387 bool status(false); 389 388 390 389 // Only try to do destruction if there is a servant to destroy. … … 396 395 else 397 396 { 398 status .setCode(vpr::ReturnStatus::Fail);397 status = false; 399 398 vprDEBUG(tweekDBG_CORBA, vprDBG_WARNING_LVL) 400 399 << "WARNING: No Subject Manager servant to destroy!\n" … … 409 408 // ============================================================================ 410 409 411 vpr::ReturnStatusCorbaManager::createChildPOA(const std::string& local_id)412 { 413 vpr::ReturnStatus status;410 bool CorbaManager::createChildPOA(const std::string& local_id) 411 { 412 bool status(true); 414 413 CORBA::Object_var obj; 415 414 CORBA::PolicyList policy_list; … … 455 454 { 456 455 boost::ignore_unused_variable_warning(ex); 457 status .setCode(vpr::ReturnStatus::Fail);456 status = false; 458 457 vprDEBUG(vprDBG_ALL, vprDBG_WARNING_LVL) 459 458 << "WARNING: Child POA named '" << poa_name << "' already exists!\n" … … 463 462 { 464 463 boost::ignore_unused_variable_warning(ex); 465 status .setCode(vpr::ReturnStatus::Fail);464 status = false; 466 465 vprDEBUG(vprDBG_ALL, vprDBG_WARNING_LVL) 467 466 << "WARNING: Failed to set IdUniquenessPolicy for child POA\n" juggler/trunk/modules/tweek/tweek/CORBA/CorbaManager.h
r18824 r19540 39 39 40 40 #include <vpr/Thread/Thread.h> 41 #include <vpr/Util/ReturnStatus.h>42 41 43 42 #include <tweek/CORBA/SubjectManagerImpl.h> … … 110 109 * "1.2". It defaults to "1.0". 111 110 */ 112 vpr::ReturnStatusinit(const std::string& localId, int& argc, char** argv,113 const std::string& nsHost = std::string(""),114 const vpr::Uint16& nsPort = vpr::Uint16(2809),115 const std::string& iiopVersion = std::string("1.0"));111 bool init(const std::string& localId, int& argc, char** argv, 112 const std::string& nsHost = std::string(""), 113 const vpr::Uint16& nsPort = vpr::Uint16(2809), 114 const std::string& iiopVersion = std::string("1.0")); 116 115 117 116 /** … … 142 141 * Binds the interface object. 143 142 */ 144 vpr::ReturnStatuscreateSubjectManager();143 bool createSubjectManager(); 145 144 146 145 /** … … 151 150 * successfully in createSubjectManager(). 152 151 * 153 * @return vpr::ReturnStatus::Fail will be returned if the servant could not154 * bedestroyed successfully.155 */ 156 vpr::ReturnStatusdestroySubjectManager();152 * @return \c false will be returned if the servant could not be 153 * destroyed successfully. 154 */ 155 bool destroySubjectManager(); 157 156 158 157 /** … … 195 194 196 195 private: 197 vpr::ReturnStatuscreateChildPOA(const std::string& local_id);196 bool createChildPOA(const std::string& local_id); 198 197 199 198 std::string mAppName; juggler/trunk/modules/tweek/tweek/CORBA/SubjectManagerImpl.cpp
r19362 r19540 97 97 } 98 98 99 vpr::ReturnStatusSubjectManagerImpl::unregisterSubject(const char* name)100 throw (CORBA::SystemException)101 { 102 vpr::ReturnStatus status;99 bool SubjectManagerImpl::unregisterSubject(const char* name) 100 throw (CORBA::SystemException) 101 { 102 bool status(true); 103 103 std::string name_str(name); 104 104 vpr::Guard<vpr::Mutex> guard(mSubjectsMutex); … … 122 122 << " No subject registered under the name '" << name_str 123 123 << "'\n" << vprDEBUG_FLUSH; 124 status .setCode(vpr::ReturnStatus::Fail);124 status = false; 125 125 } 126 126 juggler/trunk/modules/tweek/tweek/CORBA/SubjectManagerImpl.h
r18824 r19540 94 94 * registered subject. 95 95 */ 96 vpr::ReturnStatus unregisterSubject(const char* name) 97 throw(CORBA::SystemException); 96 bool unregisterSubject(const char* name) throw (CORBA::SystemException); 98 97 99 98 /** juggler/trunk/modules/tweek/tweek/Client/CorbaService.cpp
r19335 r19540 85 85 } 86 86 87 vpr::ReturnStatusCorbaService::init(int& argc, char* argv[])88 { 89 vpr::ReturnStatus status;87 bool CorbaService::init(int& argc, char* argv[]) 88 { 89 bool status(true); 90 90 91 91 try … … 130 130 catch (CORBA::SystemException& sysEx) 131 131 { 132 status .setCode(vpr::ReturnStatus::Fail);132 status = false; 133 133 vprDEBUG(tweekDBG_CORBA, vprDBG_CRITICAL_LVL) 134 134 << "Caught CORBA::SystemException during initialization\n" … … 138 138 catch (CORBA::Exception&) 139 139 { 140 status .setCode(vpr::ReturnStatus::Fail);140 status = false; 141 141 vprDEBUG(tweekDBG_CORBA, vprDBG_CRITICAL_LVL) 142 142 << "Caught CORBA::Exception during initialization.\n" … … 146 146 catch (omniORB::fatalException& fe) 147 147 { 148 status .setCode(vpr::ReturnStatus::Fail);148 status = false; 149 149 vprDEBUG(tweekDBG_CORBA, vprDBG_CRITICAL_LVL) 150 150 << "Caught omniORB::fatalException:\n" << vprDEBUG_FLUSH; … … 159 159 catch (vpr::Exception& ex) 160 160 { 161 status .setCode(vpr::ReturnStatus::Fail);161 status = false; 162 162 vprDEBUG(tweekDBG_CORBA, vprDBG_CRITICAL_LVL) 163 163 << "Caught vpr::Exception during initialization.\n" … … 274 274 } 275 275 276 vpr::ReturnStatusCorbaService::initRootPOA()277 { 278 vpr::ReturnStatus status;276 bool CorbaService::initRootPOA() 277 { 278 bool status(true); 279 279 280 280 CORBA::Object_var obj; juggler/trunk/modules/tweek/tweek/Client/CorbaService.h
r18824 r19540 88 88 } 89 89 90 vpr::ReturnStatusinit(int& argc, char* argv[]);90 bool init(int& argc, char* argv[]); 91 91 92 92 /** … … 190 190 191 191 private: 192 vpr::ReturnStatusinitRootPOA();192 bool initRootPOA(); 193 193 194 194 /**
