From af7665a5e62b646255e09d68ac38fea9b8367be7 Mon Sep 17 00:00:00 2001 From: Abdullah Sowayan Date: Mon, 13 Aug 2007 12:14:16 +0000 Subject: Mon Aug 13 12:11:29 UTC 2007 Abdullah Sowayan --- TAO/ChangeLog | 41 ++++++++ TAO/examples/Event_Comm/notifier.h | 6 +- TAO/examples/Event_Comm/supplier.h | 4 +- .../Kokyu_dsrt_schedulers/EDF_Scheduler.cpp | 9 +- .../Kokyu_dsrt_schedulers/FP_Scheduler.cpp | 2 +- .../Kokyu_dsrt_schedulers/MIF_Scheduler.cpp | 4 +- .../Kokyu_dsrt_schedulers/MUF_Scheduler.cpp | 4 +- TAO/examples/Kokyu_dsrt_schedulers/Task_Stats.cpp | 6 +- .../Kokyu_dsrt_schedulers/fp_example/client.cpp | 8 +- .../Kokyu_dsrt_schedulers/fp_example/test_i.cpp | 28 +++--- .../Kokyu_dsrt_schedulers/mif_example/test_i.cpp | 28 +++--- .../Kokyu_dsrt_schedulers/muf_example/test_i.cpp | 28 +++--- TAO/examples/Logging/Logger.idl | 4 +- TAO/examples/Quoter/Quoter.idl | 10 +- .../Fixed_Priority_Scheduler/FP_Scheduler.h | 41 ++++---- .../Fixed_Priority_Scheduler/FP_Task.cpp | 108 ++++++++++----------- .../Fixed_Priority_Scheduler/FP_Task.h | 18 ++-- .../RTScheduling/Fixed_Priority_Scheduler/test.cpp | 78 +++++++-------- TAO/examples/RTScheduling/Job.idl | 2 +- .../RTScheduling/MIF_Scheduler/MIF_DT_Creator.cpp | 28 +++--- .../RTScheduling/MIF_Scheduler/MIF_DT_Creator.h | 14 ++- TAO/examples/RTScheduling/MIF_Scheduler/MIF_Task.h | 18 ++-- TAO/examples/RTScheduling/Synch_i.cpp | 2 +- TAO/examples/RTScheduling/Task_Stats.cpp | 6 +- TAO/examples/Simple/bank/Bank.idl | 14 +-- TAO/examples/Simple/chat/client.cpp | 6 +- TAO/examples/Simple/echo/Echo.idl | 2 +- TAO/examples/Simulator/NavWeap.idl | 82 ++++++++-------- TAO/examples/mfc/MainFrm.cpp | 89 +++++++++-------- TAO/examples/mfc/MainFrm.h | 35 ++++--- TAO/examples/mfc/client.cpp | 11 +-- TAO/examples/mfc/server.cpp | 4 +- TAO/examples/mfc/server.h | 28 +++--- TAO/examples/mfc/serverDoc.cpp | 44 ++++----- TAO/examples/mfc/serverDoc.h | 32 +++--- TAO/examples/mfc/serverView.cpp | 48 +++++---- TAO/examples/mfc/serverView.h | 44 ++++----- 37 files changed, 476 insertions(+), 460 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 15ba8344ff1..e91bd33e30f 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,44 @@ +Mon Aug 13 12:11:29 UTC 2007 Abdullah Sowayan + + * examples/Event_Comm/notifier.h: + * examples/Event_Comm/supplier.h: + * examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp: + * examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp: + * examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp: + * examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp: + * examples/Kokyu_dsrt_schedulers/Task_Stats.cpp: + * examples/Kokyu_dsrt_schedulers/fp_example/client.cpp: + * examples/Kokyu_dsrt_schedulers/fp_example/test_i.cpp: + * examples/Kokyu_dsrt_schedulers/mif_example/test_i.cpp: + * examples/Kokyu_dsrt_schedulers/muf_example/test_i.cpp: + * examples/Logging/Logger.idl: + * examples/Quoter/Quoter.idl: + * examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.h: + * examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.h: + * examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.cpp: + * examples/RTScheduling/Fixed_Priority_Scheduler/test.cpp: + * examples/RTScheduling/Job.idl: + * examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.h: + * examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.cpp: + * examples/RTScheduling/MIF_Scheduler/MIF_Task.h: + * examples/RTScheduling/Synch_i.cpp: + * examples/RTScheduling/Task_Stats.cpp: + * examples/Simple/bank/Bank.idl: + * examples/Simple/chat/client.cpp: + * examples/Simple/echo/Echo.idl: + * examples/Simulator/NavWeap.idl: + * examples/mfc/MainFrm.h: + * examples/mfc/MainFrm.cpp: + * examples/mfc/client.cpp: + * examples/mfc/server.h: + * examples/mfc/server.cpp: + * examples/mfc/serverDoc.h: + * examples/mfc/serverDoc.cpp: + * examples/mfc/serverView.h: + * examples/mfc/serverView.cpp: + + Untabify. + Mon Aug 13 11:38:23 UTC 2007 Chad Elliott * configure.ac: diff --git a/TAO/examples/Event_Comm/notifier.h b/TAO/examples/Event_Comm/notifier.h index be45a848ebf..2dbedfeb5ff 100644 --- a/TAO/examples/Event_Comm/notifier.h +++ b/TAO/examples/Event_Comm/notifier.h @@ -1,5 +1,5 @@ // $Id$ - + // ============================================================================ // // = LIBRARY @@ -37,8 +37,8 @@ class Notifier : public ACE_Event_Handler private: virtual int handle_signal (int signum, - siginfo_t *, - ucontext_t *); + siginfo_t *, + ucontext_t *); // Handle signals that shut us down. Notifier_Server ns_; diff --git a/TAO/examples/Event_Comm/supplier.h b/TAO/examples/Event_Comm/supplier.h index ee09719b593..690abfd2f6c 100644 --- a/TAO/examples/Event_Comm/supplier.h +++ b/TAO/examples/Event_Comm/supplier.h @@ -44,8 +44,8 @@ public: private: virtual int handle_signal (int signum, - siginfo_t *, - ucontext_t *); + siginfo_t *, + ucontext_t *); // Handle shutdown signals. Supplier_Input_Handler ih_; diff --git a/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp index cb79f4f2f24..3560baff0af 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/EDF_Scheduler.cpp @@ -296,8 +296,7 @@ EDF_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_ptr ri) sc.context_data = ACE_reinterpret_cast ( - *codec_->encode (sc_qos_as_any) - ); + *codec_->encode (sc_qos_as_any)); #ifdef KOKYU_DSRT_LOGGING ACE_DEBUG ((LM_DEBUG, @@ -404,13 +403,13 @@ EDF_Scheduler::receive_request (PortableInterceptor::ServerRequestInfo_ptr ri, guid_copy (guid, sc_qos_ptr->guid); ACE_NEW (guid_out.ptr (), - RTScheduling::Current::IdType); + RTScheduling::Current::IdType); guid_out.ptr ()->length (guid.length ()); *(guid_out.ptr ()) = guid; ACE_OS::memcpy (&int_guid, - guid.get_buffer (), - guid.length ()); + guid.get_buffer (), + guid.length ()); #ifdef KOKYU_DSRT_LOGGING diff --git a/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp index 13a67c98bc0..0783dd864f3 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/FP_Scheduler.cpp @@ -379,7 +379,7 @@ Fixed_Priority_Scheduler::receive_request (PortableInterceptor::ServerRequestInf guid_copy (guid, sc_qos_ptr->guid); ACE_NEW (guid_out.ptr (), - RTScheduling::Current::IdType); + RTScheduling::Current::IdType); guid_out.ptr ()->length (guid.length ()); *(guid_out.ptr ()) = guid; diff --git a/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp index cf42475ac28..c3ee1477ae5 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/MIF_Scheduler.cpp @@ -40,7 +40,7 @@ MIF_Sched_Param_Policy::copy (void) { MIF_Sched_Param_Policy* tmp = 0; ACE_NEW_THROW_EX (tmp, - MIF_Sched_Param_Policy (*this), + MIF_Sched_Param_Policy (*this), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); @@ -371,7 +371,7 @@ MIF_Scheduler::receive_request (PortableInterceptor::ServerRequestInfo_ptr ri, guid_copy (guid, sc_qos_ptr->guid); ACE_NEW (guid_out.ptr (), - RTScheduling::Current::IdType); + RTScheduling::Current::IdType); guid_out.ptr ()->length (guid.length ()); *(guid_out.ptr ()) = guid; diff --git a/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp b/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp index a1a28cdcb81..1fb9e9a896d 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/MUF_Scheduler.cpp @@ -40,7 +40,7 @@ MUF_Sched_Param_Policy::copy (void) { MUF_Sched_Param_Policy* tmp; ACE_NEW_THROW_EX (tmp, - MUF_Sched_Param_Policy (*this), + MUF_Sched_Param_Policy (*this), CORBA::NO_MEMORY (TAO::VMCID, CORBA::COMPLETED_NO)); @@ -393,7 +393,7 @@ MUF_Scheduler::receive_request (PortableInterceptor::ServerRequestInfo_ptr ri, guid_copy (guid, sc_qos_ptr->guid); ACE_NEW (guid_out.ptr (), - RTScheduling::Current::IdType); + RTScheduling::Current::IdType); guid_out.ptr ()->length (guid.length ()); *(guid_out.ptr ()) = guid; diff --git a/TAO/examples/Kokyu_dsrt_schedulers/Task_Stats.cpp b/TAO/examples/Kokyu_dsrt_schedulers/Task_Stats.cpp index d7d06da76fd..b563e8a8acb 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/Task_Stats.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/Task_Stats.cpp @@ -65,8 +65,8 @@ Task_Stats::dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg, if (output_file == 0) { ACE_ERROR ((LM_ERROR, - "%s cannot be opened \n", - file_name)); + "%s cannot be opened \n", + file_name)); } // first dump what the caller has to say. @@ -89,6 +89,6 @@ Task_Stats::dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg, ACE_OS::fclose (output_file); ACE_DEBUG ((LM_DEBUG, - "Samples are ready to be viewed\n")); + "Samples are ready to be viewed\n")); } diff --git a/TAO/examples/Kokyu_dsrt_schedulers/fp_example/client.cpp b/TAO/examples/Kokyu_dsrt_schedulers/fp_example/client.cpp index e20b98cfa08..9707742e2c8 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/fp_example/client.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/fp_example/client.cpp @@ -231,10 +231,10 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { if (enable_dynamic_scheduling) { - FP_Scheduling::SegmentSchedulingParameter sched_param; - sched_param.base_priority = 0; + FP_Scheduling::SegmentSchedulingParameter sched_param; + sched_param.base_priority = 0; CORBA::Policy_var sched_param_policy - = scheduler->create_segment_scheduling_parameter (sched_param); + = scheduler->create_segment_scheduling_parameter (sched_param); CORBA::Policy_ptr implicit_sched_param = 0; current->begin_scheduling_segment (0, sched_param_policy.in (), @@ -320,7 +320,7 @@ Worker::svc (void) FP_Scheduling::SegmentSchedulingParameter sched_param; sched_param.base_priority = prio_; CORBA::Policy_var sched_param_policy - = scheduler_->create_segment_scheduling_parameter (sched_param); + = scheduler_->create_segment_scheduling_parameter (sched_param); CORBA::Policy_ptr implicit_sched_param = 0; ACE_DEBUG ((LM_DEBUG, "(%t|%T):before begin_sched_segment\n")); diff --git a/TAO/examples/Kokyu_dsrt_schedulers/fp_example/test_i.cpp b/TAO/examples/Kokyu_dsrt_schedulers/fp_example/test_i.cpp index 75bba2d0bdf..b50709d97ce 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/fp_example/test_i.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/fp_example/test_i.cpp @@ -33,16 +33,16 @@ Simple_Server_i::test_method (CORBA::Long exec_duration) if (ACE_Thread::getprio (thr_handle, prio) == -1) { if (errno == ENOTSUP) - { - ACE_DEBUG((LM_DEBUG, - ACE_TEXT ("getprio not supported on this platform\n") - )); - return 0; - } + { + ACE_DEBUG((LM_DEBUG, + ACE_TEXT ("getprio not supported on this platform\n"))); + return 0; + } + ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("getprio failed")), - -1); + ACE_TEXT ("%p\n"), + ACE_TEXT ("getprio failed")), + -1); } ACE_DEBUG ((LM_DEBUG, @@ -66,8 +66,8 @@ Simple_Server_i::test_method (CORBA::Long exec_duration) while (compute_count_down_time > ACE_Time_Value::zero) { ACE::is_prime (prime_number, - 2, - prime_number / 2); + 2, + prime_number / 2); ++j; @@ -111,9 +111,9 @@ Simple_Server_i::test_method (CORBA::Long exec_duration) timer.elapsed_time (elapsed_time); ACE_DEBUG ((LM_DEBUG, - "Request processing in thread %t done, " - "prio = %d, load = %d, elapsed time = %umsec\n", - prio, exec_duration, elapsed_time.msec () )); + "Request processing in thread %t done, " + "prio = %d, load = %d, elapsed time = %umsec\n", + prio, exec_duration, elapsed_time.msec () )); return exec_duration; } diff --git a/TAO/examples/Kokyu_dsrt_schedulers/mif_example/test_i.cpp b/TAO/examples/Kokyu_dsrt_schedulers/mif_example/test_i.cpp index 3e3487fd516..74fd3856ade 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/mif_example/test_i.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/mif_example/test_i.cpp @@ -33,16 +33,16 @@ Simple_Server_i::test_method (CORBA::Long exec_duration) if (ACE_Thread::getprio (thr_handle, prio) == -1) { if (errno == ENOTSUP) - { - ACE_DEBUG((LM_DEBUG, - ACE_TEXT ("getprio not supported on this platform\n") - )); - return 0; - } + { + ACE_DEBUG((LM_DEBUG, + ACE_TEXT ("getprio not supported on this platform\n"))); + return 0; + } + ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("getprio failed")), - -1); + ACE_TEXT ("%p\n"), + ACE_TEXT ("getprio failed")), + -1); } ACE_DEBUG ((LM_DEBUG, @@ -66,8 +66,8 @@ Simple_Server_i::test_method (CORBA::Long exec_duration) while (compute_count_down_time > ACE_Time_Value::zero) { ACE::is_prime (prime_number, - 2, - prime_number / 2); + 2, + prime_number / 2); ++j; @@ -111,9 +111,9 @@ Simple_Server_i::test_method (CORBA::Long exec_duration) timer.elapsed_time (elapsed_time); ACE_DEBUG ((LM_DEBUG, - "Request processing in thread %t done, " - "prio = %d, load = %d, elapsed time = %umsec\n", - prio, exec_duration, elapsed_time.msec () )); + "Request processing in thread %t done, " + "prio = %d, load = %d, elapsed time = %umsec\n", + prio, exec_duration, elapsed_time.msec () )); return exec_duration; } diff --git a/TAO/examples/Kokyu_dsrt_schedulers/muf_example/test_i.cpp b/TAO/examples/Kokyu_dsrt_schedulers/muf_example/test_i.cpp index 3e3487fd516..74fd3856ade 100644 --- a/TAO/examples/Kokyu_dsrt_schedulers/muf_example/test_i.cpp +++ b/TAO/examples/Kokyu_dsrt_schedulers/muf_example/test_i.cpp @@ -33,16 +33,16 @@ Simple_Server_i::test_method (CORBA::Long exec_duration) if (ACE_Thread::getprio (thr_handle, prio) == -1) { if (errno == ENOTSUP) - { - ACE_DEBUG((LM_DEBUG, - ACE_TEXT ("getprio not supported on this platform\n") - )); - return 0; - } + { + ACE_DEBUG((LM_DEBUG, + ACE_TEXT ("getprio not supported on this platform\n"))); + return 0; + } + ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("getprio failed")), - -1); + ACE_TEXT ("%p\n"), + ACE_TEXT ("getprio failed")), + -1); } ACE_DEBUG ((LM_DEBUG, @@ -66,8 +66,8 @@ Simple_Server_i::test_method (CORBA::Long exec_duration) while (compute_count_down_time > ACE_Time_Value::zero) { ACE::is_prime (prime_number, - 2, - prime_number / 2); + 2, + prime_number / 2); ++j; @@ -111,9 +111,9 @@ Simple_Server_i::test_method (CORBA::Long exec_duration) timer.elapsed_time (elapsed_time); ACE_DEBUG ((LM_DEBUG, - "Request processing in thread %t done, " - "prio = %d, load = %d, elapsed time = %umsec\n", - prio, exec_duration, elapsed_time.msec () )); + "Request processing in thread %t done, " + "prio = %d, load = %d, elapsed time = %umsec\n", + prio, exec_duration, elapsed_time.msec () )); return exec_duration; } diff --git a/TAO/examples/Logging/Logger.idl b/TAO/examples/Logging/Logger.idl index 7a38596fc40..d20afc379f4 100644 --- a/TAO/examples/Logging/Logger.idl +++ b/TAO/examples/Logging/Logger.idl @@ -89,7 +89,7 @@ interface Logger // Transmit a Log_Record to the logging server. oneway void logv (in Log_Record log_rec, - in Verbosity_Level level); + in Verbosity_Level level); // Log a message with a specific Verbosity level which may be // differeny from the @@ -98,7 +98,7 @@ interface Logger // log messages are recieved by the logger void logv_twoway (in Log_Record log_rec, - in Verbosity_Level level); + in Verbosity_Level level); // Like logv (), but twoway for the same reason as logv_twoway () oneway void verbosity (in Verbosity_Level level); diff --git a/TAO/examples/Quoter/Quoter.idl b/TAO/examples/Quoter/Quoter.idl index a434287cbca..3069fe39da5 100644 --- a/TAO/examples/Quoter/Quoter.idl +++ b/TAO/examples/Quoter/Quoter.idl @@ -32,8 +32,8 @@ module Stock raises (Invalid_Stock, Invalid_Quoter); // LifeCycleObject copy(in FactoryFinder there, - // in Criteria the_criteria) - // raises(NoFactory, NotCopyable, InvalidCriteria, CannotMeetCriteria); + // in Criteria the_criteria) + // raises(NoFactory, NotCopyable, InvalidCriteria, CannotMeetCriteria); // copies this object to a location "there" using the "the_criteria" // void move(in FactoryFinder there, @@ -89,9 +89,9 @@ module Stock // raises (NoFactory, InvalidCriteria, CannotMeetCriteria); void register_factory (in string name, - in string location, - in string description, - in Object _object); + in string location, + in string description, + in Object _object); // provide an method for registering factories with their properties }; diff --git a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.h b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.h index fde76bc7875..97d6fa90153 100644 --- a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.h +++ b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.h @@ -38,34 +38,34 @@ public TAO_Local_RefCounted_Object create_segment_scheduling_parameter (RTCORBA::Priority segment_priority); virtual void begin_new_scheduling_segment (const RTScheduling::Current::IdType & guid, - const char * name, - CORBA::Policy_ptr sched_param, - CORBA::Policy_ptr implicit_sched_param); + const char * name, + CORBA::Policy_ptr sched_param, + CORBA::Policy_ptr implicit_sched_param); virtual void begin_nested_scheduling_segment (const RTScheduling::Current::IdType & guid, - const char * name, - CORBA::Policy_ptr sched_param, - CORBA::Policy_ptr implicit_sched_param); + const char * name, + CORBA::Policy_ptr sched_param, + CORBA::Policy_ptr implicit_sched_param); virtual void update_scheduling_segment (const RTScheduling::Current::IdType & guid, - const char * name, - CORBA::Policy_ptr sched_param, - CORBA::Policy_ptr implicit_sched_param); + const char * name, + CORBA::Policy_ptr sched_param, + CORBA::Policy_ptr implicit_sched_param); virtual void end_scheduling_segment (const RTScheduling::Current::IdType & guid, - const char * name); + const char * name); virtual void end_nested_scheduling_segment (const RTScheduling::Current::IdType & guid, - const char * name, - CORBA::Policy_ptr outer_sched_param); + const char * name, + CORBA::Policy_ptr outer_sched_param); virtual void send_request (PortableInterceptor::ClientRequestInfo_ptr ri); virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri, - RTScheduling::Current::IdType_out guid, - CORBA::String_out name, - CORBA::Policy_out sched_param, - CORBA::Policy_out implicit_sched_param); + RTScheduling::Current::IdType_out guid, + CORBA::String_out name, + CORBA::Policy_out sched_param, + CORBA::Policy_out implicit_sched_param); virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri); @@ -91,12 +91,13 @@ public TAO_Local_RefCounted_Object virtual char * scheduling_discipline_name (void); - virtual RTScheduling::ResourceManager_ptr create_resource_manager (const char * name, - CORBA::Policy_ptr scheduling_parameter); + virtual RTScheduling::ResourceManager_ptr + create_resource_manager (const char * name, + CORBA::Policy_ptr scheduling_parameter); virtual void set_scheduling_parameter (PortableServer::Servant & resource, - const char * name, - CORBA::Policy_ptr scheduling_parameter); + const char * name, + CORBA::Policy_ptr scheduling_parameter); private: RTScheduling::Current_var current_; diff --git a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.cpp b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.cpp index ebd1b42d228..9050e58d3e2 100644 --- a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.cpp +++ b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.cpp @@ -8,12 +8,12 @@ #include "ace/Countdown_Time.h" FP_Task::FP_Task (int importance, - int start_time, - int load, - int iter, - int dist, - char *job_name, - DT_Creator *dt_creator) + int start_time, + int load, + int iter, + int dist, + char *job_name, + DT_Creator *dt_creator) { this->load_ = load; this->iter_ = iter; @@ -22,19 +22,18 @@ FP_Task::FP_Task (int importance, this->dt_creator_ = dt_creator; this->dist_ = dist; this->job_name_ = CORBA::string_dup (job_name); - } int FP_Task::activate_task (RTScheduling::Current_ptr current, - CORBA::Policy_ptr sched_param, - long flags, - ACE_Time_Value* base_time) + CORBA::Policy_ptr sched_param, + long flags, + ACE_Time_Value* base_time) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "Thread_Task::activate %d\n", - importance_)); + "Thread_Task::activate %d\n", + importance_)); char msg [BUFSIZ]; ACE_OS::sprintf (msg, "Thread_Task::activate task\n"); @@ -49,14 +48,14 @@ FP_Task::activate_task (RTScheduling::Current_ptr current, pre_activate (); if (this->activate (flags, - 1, - 0, - this->importance_) == -1) + 1, + 0, + this->importance_) == -1) { if (ACE_OS::last_error () == EPERM) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("Insufficient privilege to run this test.\n")), - -1); + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("Insufficient privilege to run this test.\n")), + -1); } return 0; @@ -70,23 +69,22 @@ FP_Task::pre_activate (void) CORBA::Object_var object = DT_TEST::instance ()->orb ()->resolve_initial_references ("PriorityMappingManager"); RTCORBA::PriorityMappingManager_var mapping_manager = - RTCORBA::PriorityMappingManager::_narrow (object.in ()); + RTCORBA::PriorityMappingManager::_narrow (object.in ()); - RTCORBA::PriorityMapping *pm = - mapping_manager->mapping (); + RTCORBA::PriorityMapping *pm = mapping_manager->mapping (); CORBA::Short native_priority; if (pm->to_native (this->importance_, native_priority) == 0) - ACE_ERROR ((LM_ERROR, - "Cannot convert native priority %d to corba priority\n", - native_priority)); + ACE_ERROR ((LM_ERROR, + "Cannot convert native priority %d to corba priority\n", + native_priority)); if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "Native Priority = %d\n", - native_priority)); + ACE_DEBUG ((LM_DEBUG, + "Native Priority = %d\n", + native_priority)); char msg [BUFSIZ]; ACE_OS::sprintf (msg, "Native Priority %d\n", - native_priority); + native_priority); dt_creator_->log_msg (msg); this->importance_ = native_priority; @@ -111,19 +109,19 @@ FP_Task::perform_task (void) ACE_Countdown_Time count_down (&count_down_time); while (count_down_time > ACE_Time_Value::zero) - { - ACE::is_prime (prime_number, - 2, - prime_number / 2); + { + ACE::is_prime (prime_number, + 2, + prime_number / 2); - count_down.update (); - } + count_down.update (); + } } if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, - "%d\n", - count_)); + "%d\n", + count_)); if (this->dist_) { @@ -131,31 +129,31 @@ FP_Task::perform_task (void) for (int j = 0; j < this->iter_; j++) - { - ACE_Time_Value run_time = ACE_OS::gettimeofday () - *base_time_; - TASK_STATS::instance ()->sample (run_time.sec (), count_); + { + ACE_Time_Value run_time = ACE_OS::gettimeofday () - *base_time_; + TASK_STATS::instance ()->sample (run_time.sec (), count_); - ACE_Time_Value count_down_time (1); - ACE_Countdown_Time count_down (&count_down_time); + ACE_Time_Value count_down_time (1); + ACE_Countdown_Time count_down (&count_down_time); - while (count_down_time > ACE_Time_Value::zero) - { - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "Waiting on count down\n")); + while (count_down_time > ACE_Time_Value::zero) + { + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "Waiting on count down\n")); - ACE::is_prime (prime_number, - 2, - prime_number / 2); - count_down.update (); - } - } + ACE::is_prime (prime_number, + 2, + prime_number / 2); + count_down.update (); + } + } if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "%d\n", - count_)); + ACE_DEBUG ((LM_DEBUG, + "%d\n", + count_)); } if (dist_) diff --git a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.h b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.h index f170c911c01..e2c0acb960a 100644 --- a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.h +++ b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.h @@ -8,17 +8,17 @@ class FP_Task : public Thread_Task { public: FP_Task (int importance, - int start_time, - int load, - int iter, - int dist, - char *job_name, - DT_Creator *dt_creator); + int start_time, + int load, + int iter, + int dist, + char *job_name, + DT_Creator *dt_creator); virtual int activate_task (RTScheduling::Current_ptr current, - CORBA::Policy_ptr sched_param, - long flags, - ACE_Time_Value* base_time); + CORBA::Policy_ptr sched_param, + long flags, + ACE_Time_Value* base_time); virtual int perform_task (void); diff --git a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/test.cpp b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/test.cpp index c16cab75ee1..ae213924f3f 100644 --- a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/test.cpp +++ b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/test.cpp @@ -52,14 +52,14 @@ DT_Test::check_supported_priorities (void) min_priority_ = ACE_Sched_Params::priority_min (sched_policy_); if (max_priority_ == min_priority_) - { - ACE_DEBUG ((LM_DEBUG, - "Not enough priority levels on this platform" - " to run the test, aborting \n")); - ACE_OS::exit (2); - } + { + ACE_DEBUG ((LM_DEBUG, + "Not enough priority levels on this platform" + " to run the test, aborting \n")); + ACE_OS::exit (2); + } else ACE_DEBUG ((LM_DEBUG, "max_priority = %d, min_priority = %d\n", - max_priority_, min_priority_)); + max_priority_, min_priority_)); } } @@ -67,8 +67,8 @@ int DT_Test::init (int argc, char *argv []) { orb_ = CORBA::ORB_init (argc, - argv, - ""); + argv, + ""); this->check_supported_priorities (); @@ -82,7 +82,7 @@ DT_Test::init (int argc, char *argv []) ACE_NEW_RETURN (scheduler_, - Fixed_Priority_Scheduler (orb_.in ()), + Fixed_Priority_Scheduler (orb_.in ()), -1); manager->rtscheduler (scheduler_); @@ -96,22 +96,21 @@ DT_Test::init (int argc, char *argv []) if (sched_policy_ != ACE_SCHED_OTHER) { - - //Set the main thread to max priority... - if (ACE_OS::sched_params (ACE_Sched_Params (sched_policy_, - 55, - ACE_SCOPE_PROCESS)) != 0) - { - if (ACE_OS::last_error () == EPERM) - { - ACE_DEBUG ((LM_DEBUG, - "(%P|%t): user is not superuser, " - "test runs in time-shared class\n")); - } - else - ACE_ERROR ((LM_ERROR, - "(%P|%t): sched_params failed\n")); - } + //Set the main thread to max priority... + if (ACE_OS::sched_params (ACE_Sched_Params (sched_policy_, + 55, + ACE_SCOPE_PROCESS)) != 0) + { + if (ACE_OS::last_error () == EPERM) + { + ACE_DEBUG ((LM_DEBUG, + "(%P|%t): user is not superuser, " + "test runs in time-shared class\n")); + } + else + ACE_ERROR ((LM_ERROR, + "(%P|%t): sched_params failed\n")); + } } return 0; @@ -139,7 +138,7 @@ DT_Test::run (int argc, char* argv []) dt_creator->register_synch_obj (); ACE_DEBUG ((LM_DEBUG, - "Registered Synch Object\n")); + "Registered Synch Object\n")); /* dt_creator_->create_distributable_threads (current_.in ()); @@ -153,11 +152,8 @@ DT_Test::run (int argc, char* argv []) //ACE_Thread_Manager::instance ()->wait (); orb_->run (); - - } - void DT_Test::dt_creator (FP_DT_Creator* dt_creator) { @@ -170,7 +166,6 @@ DT_Test::dt_creator (void) return this->dt_creator_; } - Fixed_Priority_Scheduler* DT_Test::scheduler (void) { @@ -182,7 +177,7 @@ DT_Test::activate_task (void) { ACE_DEBUG ((LM_DEBUG, - "Test Activate Task\n")); + "Test Activate Task\n")); long flags; flags = THR_NEW_LWP | THR_JOINABLE; @@ -191,16 +186,16 @@ DT_Test::activate_task (void) orb_->orb_core ()->orb_params ()->sched_policy (); if (this->activate (flags, - 1, - 0, - 50) == -1) + 1, + 0, + 50) == -1) { if (ACE_OS::last_error () == EPERM) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("Insufficient privilege to run this test.\n")), - -1); - + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("Insufficient privilege to run this test.\n")), + -1); } + return 0; } @@ -210,11 +205,9 @@ DT_Test::svc (void) try { ACE_DEBUG ((LM_DEBUG, - "In test::svc\n")); + "In test::svc\n")); dt_creator_->create_distributable_threads (current_.in ()); - - } catch (const CORBA::Exception& ex) { @@ -225,7 +218,6 @@ DT_Test::svc (void) return 0; } - CORBA::ORB_ptr DT_Test::orb (void) { diff --git a/TAO/examples/RTScheduling/Job.idl b/TAO/examples/RTScheduling/Job.idl index f1ba4b5cff2..d6387247eaf 100644 --- a/TAO/examples/RTScheduling/Job.idl +++ b/TAO/examples/RTScheduling/Job.idl @@ -5,7 +5,7 @@ interface Job { void work (in unsigned long work, - in short importance); + in short importance); void shutdown (); }; diff --git a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.cpp b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.cpp index 9025497a5bb..d2deb26573e 100644 --- a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.cpp +++ b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.cpp @@ -11,22 +11,22 @@ MIF_DT_Creator::MIF_DT_Creator (void) Thread_Task* MIF_DT_Creator::create_thr_task (int importance, - int start_time, - int load, - int iter, - int dist, - char *job_name) + int start_time, + int load, + int iter, + int dist, + char *job_name) { MIF_Task* task; ACE_NEW_RETURN (task, - MIF_Task (importance, - start_time, - load, - iter, - dist, - job_name, - this), - 0); + MIF_Task (importance, + start_time, + load, + iter, + dist, + job_name, + this), + 0); return task; } @@ -38,7 +38,7 @@ MIF_DT_Creator::sched_param (int importance) void MIF_DT_Creator::yield (int suspend_time, - Thread_Task*) + Thread_Task*) { try { diff --git a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.h b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.h index f76202b63f4..e23525a6a4d 100644 --- a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.h +++ b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.h @@ -15,22 +15,20 @@ public: //virtual Task* task (void); virtual Thread_Task* create_thr_task (int importance, - int start_time, - int load, - int iter, - int dist, - char *job_name); + int start_time, + int load, + int iter, + int dist, + char *job_name); virtual void yield (int suspend_time, - Thread_Task* task); + Thread_Task* task); virtual void wait (void); virtual int total_load (void); }; - ACE_STATIC_SVC_DECLARE (MIF_DT_Creator) ACE_FACTORY_DECLARE (ACE_Local_Service, MIF_DT_Creator) #endif /*MIF_DT_CREATOR_H*/ - diff --git a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Task.h b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Task.h index d999a0b2637..be24061fb11 100644 --- a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Task.h +++ b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Task.h @@ -8,19 +8,19 @@ class MIF_Task : public Thread_Task { public: MIF_Task (int importance, - int start_time, - int load, - int iter, - int dist, - char *job_name, - DT_Creator *dt_creator); + int start_time, + int load, + int iter, + int dist, + char *job_name, + DT_Creator *dt_creator); ~MIF_Task (void); virtual int activate_task (RTScheduling::Current_ptr current, - CORBA::Policy_ptr sched_param, - long flags, - ACE_Time_Value* base_time); + CORBA::Policy_ptr sched_param, + long flags, + ACE_Time_Value* base_time); virtual int perform_task (void); diff --git a/TAO/examples/RTScheduling/Synch_i.cpp b/TAO/examples/RTScheduling/Synch_i.cpp index 4357fd8cdcb..9d328bef4cf 100644 --- a/TAO/examples/RTScheduling/Synch_i.cpp +++ b/TAO/examples/RTScheduling/Synch_i.cpp @@ -11,7 +11,7 @@ void Synch_i::go (CORBA::Long base_time) { ACE_DEBUG ((LM_DEBUG, - "GO\n")); + "GO\n")); this->synched_ = 1; this->base_time_.set (static_cast(base_time), 0); } diff --git a/TAO/examples/RTScheduling/Task_Stats.cpp b/TAO/examples/RTScheduling/Task_Stats.cpp index 77d364d710d..15ad134b4a7 100644 --- a/TAO/examples/RTScheduling/Task_Stats.cpp +++ b/TAO/examples/RTScheduling/Task_Stats.cpp @@ -66,8 +66,8 @@ Task_Stats::dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg, if (output_file == 0) { ACE_ERROR ((LM_ERROR, - "%s cannot be opened \n", - file_name)); + "%s cannot be opened \n", + file_name)); } // first dump what the caller has to say. @@ -95,7 +95,7 @@ Task_Stats::dump_samples (const ACE_TCHAR *file_name, const ACE_TCHAR *msg, ACE_OS::fclose (output_file); ACE_DEBUG ((LM_DEBUG, - "Samples are ready to view\n")); + "Samples are ready to view\n")); } #if defined (ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION) diff --git a/TAO/examples/Simple/bank/Bank.idl b/TAO/examples/Simple/bank/Bank.idl index bcfacbf46e4..7061fcaf462 100644 --- a/TAO/examples/Simple/bank/Bank.idl +++ b/TAO/examples/Simple/bank/Bank.idl @@ -14,13 +14,13 @@ module Bank // balance, deposit and withdraw. exception Overdraft - { - // = TITLE - // This exception is raised if the client tries to - // withdraw more money than the current balance. + { + // = TITLE + // This exception is raised if the client tries to + // withdraw more money than the current balance. - string reason; - }; + string reason; + }; readonly attribute float balance; // Attribute to obtain the current . @@ -42,7 +42,7 @@ module Bank // operations to create s and to delete them. Account open (in string name, - in float initial_balance); + in float initial_balance); // Returns the associated with . If this is the // first time has been seen, the server will create the // account. Otherwise, the server will return back an object diff --git a/TAO/examples/Simple/chat/client.cpp b/TAO/examples/Simple/chat/client.cpp index ac5f05ed147..eb9d881440d 100644 --- a/TAO/examples/Simple/chat/client.cpp +++ b/TAO/examples/Simple/chat/client.cpp @@ -25,10 +25,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { Client_i client_i; - if (client_i.init (argc, argv) == -1 - || client_i.run () == -1) - return -1; - + if (client_i.init (argc, argv) == -1 || client_i.run () == -1) + return -1; } catch (const CORBA::Exception& ex) { diff --git a/TAO/examples/Simple/echo/Echo.idl b/TAO/examples/Simple/echo/Echo.idl index a396838f0bb..993d08612bd 100644 --- a/TAO/examples/Simple/echo/Echo.idl +++ b/TAO/examples/Simple/echo/Echo.idl @@ -11,7 +11,7 @@ interface Echo // mesg string to be displayed and shuts down the server. typedef sequence List; - + List echo_list (in string message); // This operation returns the message as a sequence of Objects and // displays it on the screen as a string. diff --git a/TAO/examples/Simulator/NavWeap.idl b/TAO/examples/Simulator/NavWeap.idl index a67d9c02fd1..e2478529262 100644 --- a/TAO/examples/Simulator/NavWeap.idl +++ b/TAO/examples/Simulator/NavWeap.idl @@ -16,48 +16,47 @@ #include "tao/TimeBase.pidl" -struct Navigation { - long position_latitude; - long position_longitude; - unsigned long altitude; - long heading; - long roll; - long pitch; - // common part - double utilization; - double overhead; - TimeBase::TimeT arrival_time; - TimeBase::TimeT deadline_time; - TimeBase::TimeT completion_time; - TimeBase::TimeT computation_time; - unsigned long criticality; - unsigned long update_data; +struct Navigation +{ + long position_latitude; + long position_longitude; + unsigned long altitude; + long heading; + long roll; + long pitch; + // common part + double utilization; + double overhead; + TimeBase::TimeT arrival_time; + TimeBase::TimeT deadline_time; + TimeBase::TimeT completion_time; + TimeBase::TimeT computation_time; + unsigned long criticality; + unsigned long update_data; }; - - -struct Weapons { - - unsigned long number_of_weapons; - string weapon1_identifier; - unsigned long weapon1_status; - string weapon2_identifier; - unsigned long weapon2_status; - string weapon3_identifier; - unsigned long weapon3_status; - string weapon4_identifier; - unsigned long weapon4_status; - string weapon5_identifier; - unsigned long weapon5_status; - // common part - double utilization; - double overhead; - TimeBase::TimeT arrival_time; - TimeBase::TimeT deadline_time; - TimeBase::TimeT completion_time; - TimeBase::TimeT computation_time; - unsigned long criticality; - unsigned long update_data; +struct Weapons +{ + unsigned long number_of_weapons; + string weapon1_identifier; + unsigned long weapon1_status; + string weapon2_identifier; + unsigned long weapon2_status; + string weapon3_identifier; + unsigned long weapon3_status; + string weapon4_identifier; + unsigned long weapon4_status; + string weapon5_identifier; + unsigned long weapon5_status; + // common part + double utilization; + double overhead; + TimeBase::TimeT arrival_time; + TimeBase::TimeT deadline_time; + TimeBase::TimeT completion_time; + TimeBase::TimeT computation_time; + unsigned long criticality; + unsigned long update_data; }; interface NavWeapTerminator @@ -68,6 +67,5 @@ interface NavWeapTerminator // servant dispatched servant, but with the request // originating from another thread. { - void shutdown (); + void shutdown (); }; - diff --git a/TAO/examples/mfc/MainFrm.cpp b/TAO/examples/mfc/MainFrm.cpp index 6421ce41225..180a783ad6e 100644 --- a/TAO/examples/mfc/MainFrm.cpp +++ b/TAO/examples/mfc/MainFrm.cpp @@ -20,19 +20,19 @@ static char THIS_FILE[] = __FILE__; IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) - //{{AFX_MSG_MAP(CMainFrame) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code ! - ON_WM_CREATE() - //}}AFX_MSG_MAP + //{{AFX_MSG_MAP(CMainFrame) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code ! + ON_WM_CREATE() + //}}AFX_MSG_MAP END_MESSAGE_MAP() static UINT indicators[] = { - ID_SEPARATOR, // status line indicator - ID_INDICATOR_CAPS, - ID_INDICATOR_NUM, - ID_INDICATOR_SCRL, + ID_SEPARATOR, // status line indicator + ID_INDICATOR_CAPS, + ID_INDICATOR_NUM, + ID_INDICATOR_SCRL, }; ///////////////////////////////////////////////////////////////////////////// @@ -40,8 +40,7 @@ static UINT indicators[] = CMainFrame::CMainFrame() { - // TODO: add member initialization code here - + // TODO: add member initialization code here } CMainFrame::~CMainFrame() @@ -50,42 +49,43 @@ CMainFrame::~CMainFrame() int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { - if (CFrameWnd::OnCreate(lpCreateStruct) == -1) - return -1; - - if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP - | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || - !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) - { - TRACE0("Failed to create toolbar\n"); - return -1; // fail to create - } - - if (!m_wndStatusBar.Create(this) || - !m_wndStatusBar.SetIndicators(indicators, - sizeof(indicators)/sizeof(UINT))) - { - TRACE0("Failed to create status bar\n"); - return -1; // fail to create - } - - // TODO: Delete these three lines if you don't want the toolbar to - // be dockable - m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); - EnableDocking(CBRS_ALIGN_ANY); - DockControlBar(&m_wndToolBar); - - return 0; + if (CFrameWnd::OnCreate(lpCreateStruct) == -1) + return -1; + + if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | + CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | + CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || + !m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) + { + TRACE0("Failed to create toolbar\n"); + return -1; // fail to create + } + + if (!m_wndStatusBar.Create(this) || + !m_wndStatusBar.SetIndicators(indicators, + sizeof(indicators)/sizeof(UINT))) + { + TRACE0("Failed to create status bar\n"); + return -1; // fail to create + } + + // TODO: Delete these three lines if you don't want the toolbar to + // be dockable + m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); + EnableDocking(CBRS_ALIGN_ANY); + DockControlBar(&m_wndToolBar); + + return 0; } BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { - if( !CFrameWnd::PreCreateWindow(cs) ) - return FALSE; - // TODO: Modify the Window class or styles here by modifying - // the CREATESTRUCT cs + if( !CFrameWnd::PreCreateWindow(cs) ) + return FALSE; + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs - return TRUE; + return TRUE; } ///////////////////////////////////////////////////////////////////////////// @@ -94,16 +94,15 @@ BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) #ifdef _DEBUG void CMainFrame::AssertValid() const { - CFrameWnd::AssertValid(); + CFrameWnd::AssertValid(); } void CMainFrame::Dump(CDumpContext& dc) const { - CFrameWnd::Dump(dc); + CFrameWnd::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CMainFrame message handlers - diff --git a/TAO/examples/mfc/MainFrm.h b/TAO/examples/mfc/MainFrm.h index 033dfb0f5d1..3ec56663f6e 100644 --- a/TAO/examples/mfc/MainFrm.h +++ b/TAO/examples/mfc/MainFrm.h @@ -13,10 +13,9 @@ class CMainFrame : public CFrameWnd { - protected: // create from serialization only - CMainFrame(); - DECLARE_DYNCREATE(CMainFrame) + CMainFrame(); + DECLARE_DYNCREATE(CMainFrame) // Attributes public: @@ -25,31 +24,31 @@ public: public: // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CMainFrame) - virtual BOOL PreCreateWindow(CREATESTRUCT& cs); - //}}AFX_VIRTUAL + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMainFrame) + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + //}}AFX_VIRTUAL // Implementation public: - virtual ~CMainFrame(); + virtual ~CMainFrame(); #ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; #endif protected: // control bar embedded members - CStatusBar m_wndStatusBar; - CToolBar m_wndToolBar; + CStatusBar m_wndStatusBar; + CToolBar m_wndToolBar; // Generated message map functions protected: - //{{AFX_MSG(CMainFrame) - afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG - DECLARE_MESSAGE_MAP() + //{{AFX_MSG(CMainFrame) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// diff --git a/TAO/examples/mfc/client.cpp b/TAO/examples/mfc/client.cpp index cf9b8effdbc..7d12f7ec869 100644 --- a/TAO/examples/mfc/client.cpp +++ b/TAO/examples/mfc/client.cpp @@ -3,7 +3,6 @@ #include "w32_testS.h" #include "ace/streams.h" - int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { @@ -11,7 +10,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { const char *orb_name = ""; - ACE_DEBUG ((LM_DEBUG, + ACE_DEBUG ((LM_DEBUG, "Initializing the ORB!\n")); CORBA::ORB_var the_orb = CORBA::ORB_init (argc, argv, @@ -27,7 +26,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) the_root_poa->the_POAManager (); // Retrieving the servants IOR from a file - ACE_DEBUG ((LM_DEBUG, + ACE_DEBUG ((LM_DEBUG, "Reading the IOR!\n")); const char *filename = @@ -36,16 +35,16 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) orb_obj = the_orb->string_to_object (filename); - ACE_DEBUG ((LM_DEBUG, + ACE_DEBUG ((LM_DEBUG, "Narrowing the IOR!\n")); W32_Test_Interface_var mycall = W32_Test_Interface::_narrow (orb_obj.in ()); - ACE_DEBUG ((LM_DEBUG, + ACE_DEBUG ((LM_DEBUG, "Sending the Request!\n")); char *response = mycall->getresponse (1); - ACE_DEBUG ((LM_DEBUG, + ACE_DEBUG ((LM_DEBUG, "The answer ...%s\n", response)); // Free up the string. diff --git a/TAO/examples/mfc/server.cpp b/TAO/examples/mfc/server.cpp index e5ae0008f05..0186209c689 100644 --- a/TAO/examples/mfc/server.cpp +++ b/TAO/examples/mfc/server.cpp @@ -155,9 +155,9 @@ BOOL CServerApp::InitInstance() #if !defined (_WIN32_WCE) #ifdef _AFXDLL - Enable3dControls(); // Call this when using MFC in a shared DLL + Enable3dControls(); // Call this when using MFC in a shared DLL #else - Enable3dControlsStatic(); // Call this when linking to MFC statically + Enable3dControlsStatic(); // Call this when linking to MFC statically #endif #endif */ diff --git a/TAO/examples/mfc/server.h b/TAO/examples/mfc/server.h index 2d762fbfb95..93685fdd03f 100644 --- a/TAO/examples/mfc/server.h +++ b/TAO/examples/mfc/server.h @@ -11,7 +11,7 @@ #endif // _MSC_VER > 1000 #ifndef __AFXWIN_H__ - #error include 'stdafx.h' before including this file for PCH + #error include 'stdafx.h' before including this file for PCH #endif #include "resource.h" // main symbols @@ -24,24 +24,24 @@ class CServerApp : public CWinApp { public: - CServerApp(); + CServerApp(); - ~CServerApp(); + ~CServerApp(); // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CServerApp) - public: - virtual BOOL InitInstance(); - //}}AFX_VIRTUAL +// ClassWizard generated virtual function overrides +//{{AFX_VIRTUAL(CServerApp) +public: + virtual BOOL InitInstance(); +//}}AFX_VIRTUAL // Implementation - //{{AFX_MSG(CServerApp) - afx_msg void OnAppAbout(); - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code ! - //}}AFX_MSG - DECLARE_MESSAGE_MAP() + //{{AFX_MSG(CServerApp) + afx_msg void OnAppAbout(); + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() }; diff --git a/TAO/examples/mfc/serverDoc.cpp b/TAO/examples/mfc/serverDoc.cpp index 76cde0d8956..99fe9e6b357 100644 --- a/TAO/examples/mfc/serverDoc.cpp +++ b/TAO/examples/mfc/serverDoc.cpp @@ -1,7 +1,6 @@ // $Id$ // serverDoc.cpp : implementation of the CServerDoc class -// #include "stdafx.h" #include "server.h" @@ -20,10 +19,10 @@ static char THIS_FILE[] = __FILE__; IMPLEMENT_DYNCREATE(CServerDoc, CDocument) BEGIN_MESSAGE_MAP(CServerDoc, CDocument) - //{{AFX_MSG_MAP(CServerDoc) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG_MAP + //{{AFX_MSG_MAP(CServerDoc) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// @@ -31,8 +30,7 @@ END_MESSAGE_MAP() CServerDoc::CServerDoc() { - // TODO: add one-time construction code here - + // TODO: add one-time construction code here } CServerDoc::~CServerDoc() @@ -41,30 +39,28 @@ CServerDoc::~CServerDoc() BOOL CServerDoc::OnNewDocument() { - if (!CDocument::OnNewDocument()) - return FALSE; + if (!CDocument::OnNewDocument()) + return FALSE; - // TODO: add reinitialization code here - // (SDI documents will reuse this document) + // TODO: add reinitialization code here + // (SDI documents will reuse this document) - return TRUE; + return TRUE; } - - ///////////////////////////////////////////////////////////////////////////// // CServerDoc serialization void CServerDoc::Serialize(CArchive& ar) { - if (ar.IsStoring()) - { - // TODO: add storing code here - } - else - { - // TODO: add loading code here - } + if (ar.IsStoring()) + { + // TODO: add storing code here + } + else + { + // TODO: add loading code here + } } ///////////////////////////////////////////////////////////////////////////// @@ -73,12 +69,12 @@ void CServerDoc::Serialize(CArchive& ar) #ifdef _DEBUG void CServerDoc::AssertValid() const { - CDocument::AssertValid(); + CDocument::AssertValid(); } void CServerDoc::Dump(CDumpContext& dc) const { - CDocument::Dump(dc); + CDocument::Dump(dc); } #endif //_DEBUG diff --git a/TAO/examples/mfc/serverDoc.h b/TAO/examples/mfc/serverDoc.h index 29be578e610..1c5e90fd4b4 100644 --- a/TAO/examples/mfc/serverDoc.h +++ b/TAO/examples/mfc/serverDoc.h @@ -15,8 +15,8 @@ class CServerDoc : public CDocument { protected: // create from serialization only - CServerDoc(); - DECLARE_DYNCREATE(CServerDoc) + CServerDoc(); + DECLARE_DYNCREATE(CServerDoc) // Attributes public: @@ -25,30 +25,30 @@ public: public: // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CServerDoc) - public: - virtual BOOL OnNewDocument(); - virtual void Serialize(CArchive& ar); - //}}AFX_VIRTUAL +// ClassWizard generated virtual function overrides +//{{AFX_VIRTUAL(CServerDoc) +public: + virtual BOOL OnNewDocument(); + virtual void Serialize(CArchive& ar); +//}}AFX_VIRTUAL // Implementation public: - virtual ~CServerDoc(); + virtual ~CServerDoc(); #ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; #endif protected: // Generated message map functions protected: - //{{AFX_MSG(CServerDoc) - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code ! - //}}AFX_MSG - DECLARE_MESSAGE_MAP() + //{{AFX_MSG(CServerDoc) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// diff --git a/TAO/examples/mfc/serverView.cpp b/TAO/examples/mfc/serverView.cpp index f04edb9e4b0..de68f815540 100644 --- a/TAO/examples/mfc/serverView.cpp +++ b/TAO/examples/mfc/serverView.cpp @@ -1,7 +1,6 @@ // $Id$ // serverView.cpp : implementation of the CServerView class -// #include "stdafx.h" #include "server.h" @@ -21,14 +20,14 @@ static char THIS_FILE[] = __FILE__; IMPLEMENT_DYNCREATE(CServerView, CView) BEGIN_MESSAGE_MAP(CServerView, CView) - //{{AFX_MSG_MAP(CServerView) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG_MAP - // Standard printing commands - ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint) - ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint) - ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview) + //{{AFX_MSG_MAP(CServerView) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG_MAP + // Standard printing commands + ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint) + ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// @@ -36,8 +35,7 @@ END_MESSAGE_MAP() CServerView::CServerView() { - // TODO: add construction code here - + // TODO: add construction code here } CServerView::~CServerView() @@ -46,10 +44,10 @@ CServerView::~CServerView() BOOL CServerView::PreCreateWindow(CREATESTRUCT& cs) { - // TODO: Modify the Window class or styles here by modifying - // the CREATESTRUCT cs + // TODO: Modify the Window class or styles here by modifying + // the CREATESTRUCT cs - return CView::PreCreateWindow(cs); + return CView::PreCreateWindow(cs); } ///////////////////////////////////////////////////////////////////////////// @@ -57,9 +55,9 @@ BOOL CServerView::PreCreateWindow(CREATESTRUCT& cs) void CServerView::OnDraw(CDC* pDC) { - CServerDoc* pDoc = GetDocument(); - ASSERT_VALID(pDoc); - // TODO: add draw code for native data here + CServerDoc* pDoc = GetDocument(); + ASSERT_VALID(pDoc); + // TODO: add draw code for native data here } ///////////////////////////////////////////////////////////////////////////// @@ -67,18 +65,18 @@ void CServerView::OnDraw(CDC* pDC) BOOL CServerView::OnPreparePrinting(CPrintInfo* pInfo) { - // default preparation - return DoPreparePrinting(pInfo); + // default preparation + return DoPreparePrinting(pInfo); } void CServerView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { - // TODO: add extra initialization before printing + // TODO: add extra initialization before printing } void CServerView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { - // TODO: add cleanup after printing + // TODO: add cleanup after printing } ///////////////////////////////////////////////////////////////////////////// @@ -87,18 +85,18 @@ void CServerView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) #ifdef _DEBUG void CServerView::AssertValid() const { - CView::AssertValid(); + CView::AssertValid(); } void CServerView::Dump(CDumpContext& dc) const { - CView::Dump(dc); + CView::Dump(dc); } CServerDoc* CServerView::GetDocument() // non-debug version is inline { - ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CServerDoc))); - return (CServerDoc*)m_pDocument; + ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CServerDoc))); + return (CServerDoc*)m_pDocument; } #endif //_DEBUG diff --git a/TAO/examples/mfc/serverView.h b/TAO/examples/mfc/serverView.h index 2476187f6d1..87a80348ea8 100644 --- a/TAO/examples/mfc/serverView.h +++ b/TAO/examples/mfc/serverView.h @@ -15,50 +15,50 @@ class CServerView : public CView { protected: // create from serialization only - CServerView(); - DECLARE_DYNCREATE(CServerView) + CServerView(); + DECLARE_DYNCREATE(CServerView) // Attributes public: - CServerDoc* GetDocument(); + CServerDoc* GetDocument(); // Operations public: // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CServerView) - public: - virtual void OnDraw(CDC* pDC); // overridden to draw this view - virtual BOOL PreCreateWindow(CREATESTRUCT& cs); - protected: - virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); - virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); - virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); - //}}AFX_VIRTUAL +// ClassWizard generated virtual function overrides +//{{AFX_VIRTUAL(CServerView) +public: + virtual void OnDraw(CDC* pDC); // overridden to draw this view + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); +protected: + virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); + virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); + virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); +//}}AFX_VIRTUAL // Implementation public: - virtual ~CServerView(); + virtual ~CServerView(); #ifdef _DEBUG - virtual void AssertValid() const; - virtual void Dump(CDumpContext& dc) const; + virtual void AssertValid() const; + virtual void Dump(CDumpContext& dc) const; #endif protected: // Generated message map functions protected: - //{{AFX_MSG(CServerView) - // NOTE - the ClassWizard will add and remove member functions here. - // DO NOT EDIT what you see in these blocks of generated code ! - //}}AFX_MSG - DECLARE_MESSAGE_MAP() + //{{AFX_MSG(CServerView) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() }; #ifndef _DEBUG // debug version in serverView.cpp inline CServerDoc* CServerView::GetDocument() - { return (CServerDoc*)m_pDocument; } + { return (CServerDoc*)m_pDocument; } #endif ///////////////////////////////////////////////////////////////////////////// -- cgit v1.2.1