///////////////////////////////////////////////////////////////////// // blockingQueue.cpp - queue that blocks on deQ of empty queue // // ver 1.0 // // Language: Visual C++, ver 7.1, SP 2 // // Platform: Dell Dimension 8300, Win XP Pro, SP2 // // Application: CSE687 - Object Oriented Design // // Author: Jim Fawcett, CST 2-187, Syracuse Univ // // (315) 443-3948, jfawcett@twcny.rr.com // // // ///////////////////////////////////////////////////////////////////// #ifdef TEST_BLOCKINGQUEUE #include "blockingQueue.h" using namespace std; ///////////////////////////////////////////////////////////////////// // Check thread module test stub for tests of blocking queue with // threads. void main() { cout << "\n Demonstrating basic Queue operations with the BQueue class " << "\n ===============================================================\n"; BQueue intQ; intQ.enQ(1); intQ.enQ(2); intQ.enQ(3); BQueue intQ2 = intQ; cout << "\n copy construction: intQ2.size() = " << intQ2.size(); intQ2.clear(); cout << "\n after intQ2.clear(), intQ2.size() = " << intQ2.size(); BQueue intQ3; intQ3 = intQ; cout << "\n after assignment: intQ3.size() = " << intQ3.size(); cout << "\n intQ3 contents: " << intQ3.deQ() << "," << intQ3.deQ() << "," << intQ3.deQ() << "\n\n"; } #endif