Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# Tools/Debugging/QueueFillRequest.h

Go to the documentation of this file.

    00001 /**
    00002  * @file QueueFillRequest.h
    00003  * Declaration of class QueueFillRequest.
    00004  *
    00005  * @author <a href=mailto:dueffert@informatik.hu-berlin.de>Uwe Düffert</a>
    00006  */
    00007
    00008 #ifndef __QUEUEFILLREQUEST_H__
    00009 #define __QUEUEFILLREQUEST_H__
    00010
    00011 #include "Tools/Streams/InOut.h"
    00012
    00013 /**
    00014  * @class QueueFillRequest
    00015  * Request to fill DebugQueues with a certain QueueFillMode
    00016  */
    00017 class QueueFillRequest
    00018 {
    00019 public:
    00020   /** different modes for filling debug queues */
    00021   typedef enum QueueFillMode{
    00022     immediateReadWrite,
    00023     collectNSeconds,
    00024     toStickNSeconds,
    00025     overwriteOlder,
    00026     rejectAll,
    00027     toStickImmediately,
    00028     collect,
    00029     saveCollected,
    00030     sendCollected,
    00031     blockNewMessages
    00032   } QueueFillMode;
    00033
    00034   /** Constructor */
    00035   QueueFillRequest():mode(immediateReadWrite),seconds(0) {}
    00036
    00037   /** Constructor
    00038     * @param qfm The requested QueueFillMode.
    00039     * @param sec Number of seconds to wait for in NSeconds modes.
    00040     */
    00041   QueueFillRequest(QueueFillMode qfm, long sec=1):mode(qfm),seconds(sec) {}
    00042
    00043   /** requested mode for filling a DebugQueue */
    00044   QueueFillMode mode;
    00045
    00046   /** how many seconds shall we wait in collectNSeconds mode */
    00047   long seconds;
    00048 };
    00049
    00050 /**
    00051  * Streaming operator that reads a QueueFillRequest from a stream.
    00052  * @param stream The stream from which is read.
    00053  * @param queueFillRequest The QueueFillRequest object.
    00054  * @return The stream.
    00055  */
    00056 In& operator>>(In& stream,QueueFillRequest& queueFillRequest);
    00057
    00058 /**
    00059  * Streaming operator that writes a QueueFillRequest to a stream.
    00060  * @param stream The stream to write on.
    00061  * @param queueFillRequest The QueueFillRequest object.
    00062  * @return The stream.
    00063  */
    00064 Out& operator<<(Out& stream, const QueueFillRequest& queueFillRequest);
    00065
    00066 #endif // __QUEUEFILLREQUEST_H__