Changeset 6006 for branches/newapi
- Timestamp:
- 01/11/08 02:04:32 (11 months ago)
- Location:
- branches/newapi/licq/src/event
- Files:
-
- 3 modified
-
eventpipe.cpp (modified) (1 diff)
-
eventpipe.h (modified) (1 diff)
-
test/eventpipetest.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/newapi/licq/src/event/eventpipe.cpp
r5977 r6006 45 45 assert(myPipeline.empty()); 46 46 assert(myEventPosition.empty()); 47 } 48 49 bool LicqDaemon::EventPipe::empty() 50 { 51 Licq::MutexLocker locker(&myMutex); 52 53 // Don't count dummy element 54 return (myPipeline.size() <= 1); 47 55 } 48 56 -
branches/newapi/licq/src/event/eventpipe.h
r5977 r6006 35 35 EventPipe(const std::string& name); 36 36 ~EventPipe(); 37 38 /** 39 * @returns True if the pipe is empty; otherwise false. 40 */ 41 bool empty(); 37 42 38 43 /** -
branches/newapi/licq/src/event/test/eventpipetest.cpp
r5977 r6006 63 63 LicqDaemon::EventPipe pipe("test"); 64 64 MockEventQueue queue; 65 66 BOOST_CHECK(pipe.empty()); 65 67 pipe.addQueue(&queue, 0); 68 BOOST_CHECK(!pipe.empty()); 66 69 67 70 boost::shared_ptr<Licq::Event> event = Licq::Event::create("test"); … … 77 80 BOOST_CHECK(queue.empty()); 78 81 pipe.removeQueue(&queue); 82 BOOST_CHECK(pipe.empty()); 79 83 } 80 84
