diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-09-19 19:39:02 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-09-19 19:39:02 +0000 |
commit | 10bc296e0ed8b8b4b217e9380d9e778e4a37c0a3 (patch) | |
tree | d0d2a30b67f702dab95366ffc259196ebfbb0753 /examples | |
parent | 1963b3a713ff77474302a2b66312e6c027868a3a (diff) | |
download | ATCD-10bc296e0ed8b8b4b217e9380d9e778e4a37c0a3.tar.gz |
*** empty log message ***
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Bounded_Packet_Relay/BPR_Drivers.h | 26 | ||||
-rw-r--r-- | examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp | 12 |
2 files changed, 25 insertions, 13 deletions
diff --git a/examples/Bounded_Packet_Relay/BPR_Drivers.h b/examples/Bounded_Packet_Relay/BPR_Drivers.h index 32f40ba64a4..0f639611865 100644 --- a/examples/Bounded_Packet_Relay/BPR_Drivers.h +++ b/examples/Bounded_Packet_Relay/BPR_Drivers.h @@ -147,19 +147,15 @@ public: // provides an abstract interface to allow modifying device settings }; -template <class SYNCH> -class Bounded_Packet_Relay +class Bounded_Packet_Relay_Base { // = TITLE // @@ Chris, please fill in here. // // = DESCRIPTION - // @@ Chris, please fill in here. + // This enum must go here to avoid confusing certain broken C++ + // compilers... public: - typedef int (Input_Task::*ACTION) (void *); - // Command entry point type definition - - // = Enumerates possible status values at the end of a transmission. enum Transmission_Status { UN_INITIALIZED, @@ -169,6 +165,22 @@ public: CANCELLED, ERROR }; +}; + +template <class SYNCH> +class Bounded_Packet_Relay : public Bounded_Packet_Relay_Base +{ + // = TITLE + // @@ Chris, please fill in here. + // + // = DESCRIPTION + // @@ Chris, please fill in here. +public: + // @@ Chris, where is Input_Task:: defined? + typedef int (Input_Task::*ACTION) (void *); + // Command entry point type definition + + // = Enumerates possible status values at the end of a transmission. Bounded_Packet_Relay (ACE_Thread_Manager *input_task_mgr, Input_Device_Wrapper_Base *input_wrapper, diff --git a/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp b/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp index 55475bc13d9..eeda834c5d9 100644 --- a/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp +++ b/examples/Bounded_Packet_Relay/Thread_Bounded_Packet_Relay.cpp @@ -76,8 +76,8 @@ Text_Input_Device_Wrapper::create_input_message (void) // punctuation for these and all comments... // construct a new message block to send - ACE_Message_Block *message; - ACE_NEW_RETURN (message, + ACE_Message_Block *mb; + ACE_NEW_RETURN (mb, ACE_Message_Block (read_length_), 0); @@ -96,13 +96,13 @@ Text_Input_Device_Wrapper::create_input_message (void) // Copy buf into the Message_Block and update the wr_ptr (). if (mb->copy (read_buf, read_length_) < 0) { - delete message; + delete mb; ACE_ERROR_RETURN ((LM_ERROR, "read buffer copy failed"), 0); } - return message; + return mb; } // creates a new message block, carrying data @@ -117,7 +117,7 @@ Text_Output_Driver_Wrapper::Text_Output_Driver_Wrapper (int logging) int Text_Output_Driver_Wrapper::write_output_message (void *message) { - ACE_Message_Block *message; + return 0; } // consume and possibly print out the passed message @@ -172,7 +172,7 @@ User_Input_Task::svc (void) break; // we are done. - this->relay_->end_transmission (Bounded_Packet_Relay_Driver::CANCELLED); + this->relay_->end_transmission (Bounded_Packet_Relay_Base::CANCELLED); this->queue_->deactivate (); ACE_DEBUG ((LM_DEBUG, "terminating input thread\n")); |