src/node/queue.h
changeset 3525 4b8ef7da0ac3
parent 3222 f61c17b62fd1
equal deleted inserted replaced
3524:028b7de98fb1 3525:4b8ef7da0ac3
    66   Ptr<Packet> Dequeue (void);
    66   Ptr<Packet> Dequeue (void);
    67   /**
    67   /**
    68    * Get a copy of the item at the front of the queue without removing it
    68    * Get a copy of the item at the front of the queue without removing it
    69    * \return 0 if the operation was not successful; the packet otherwise.
    69    * \return 0 if the operation was not successful; the packet otherwise.
    70    */
    70    */
    71   Ptr<Packet> Peek (void) const;
    71   Ptr<const Packet> Peek (void) const;
    72 
    72 
    73   /**
    73   /**
    74    * Flush the queue.
    74    * Flush the queue.
    75    */
    75    */
    76   void DequeueAll (void);
    76   void DequeueAll (void);
   140 
   140 
   141 private:
   141 private:
   142 
   142 
   143   virtual bool DoEnqueue (Ptr<Packet> p) = 0;
   143   virtual bool DoEnqueue (Ptr<Packet> p) = 0;
   144   virtual Ptr<Packet> DoDequeue (void) = 0;
   144   virtual Ptr<Packet> DoDequeue (void) = 0;
   145   virtual Ptr<Packet> DoPeek (void) const = 0;
   145   virtual Ptr<const Packet> DoPeek (void) const = 0;
   146 
   146 
   147 protected:
   147 protected:
   148   // called by subclasses to notify parent of packet drops.
   148   // called by subclasses to notify parent of packet drops.
   149   void Drop (Ptr<Packet> packet);
   149   void Drop (Ptr<Packet> packet);
   150 
   150