CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

stor::QueueID Class Reference

#include <QueueID.h>

List of all members.

Public Types

typedef enquing_policy::PolicyTag PolicyType

Public Member Functions

size_t index () const
bool isValid () const
bool operator!= (QueueID const &other) const
bool operator< (QueueID const &other) const
bool operator== (QueueID const &other) const
PolicyType policy () const
 QueueID ()
 QueueID (PolicyType policy, size_t index)

Private Attributes

size_t index_
PolicyType policy_

Detailed Description

Uniquely identifies the consumer queues

Author:
mommsen
Revision:
1.4
Date:
2011/03/07 15:31:32

Definition at line 23 of file QueueID.h.


Member Typedef Documentation

Definition at line 27 of file QueueID.h.


Constructor & Destructor Documentation

stor::QueueID::QueueID ( ) [inline]

A default-constructed QueueID is invalid; it can not be used to identify an actual queue.

Definition at line 83 of file QueueID.h.

stor::QueueID::QueueID ( PolicyType  policy,
size_t  index 
) [inline]

Create a QueueID used to identify a queue with enquing policy denoted by policy and with identifier index.

Definition at line 89 of file QueueID.h.


Member Function Documentation

size_t stor::QueueID::index ( ) const [inline]

Return the index for this queue.

Definition at line 103 of file QueueID.h.

References index_.

Referenced by stor::operator<<().

  {
    return index_;
  }
bool stor::QueueID::isValid ( void  ) const [inline]

Test for validity of a QueueID. Invalid QueueIDs do not represent the identity of any actual queue.

Definition at line 110 of file QueueID.h.

References siStripFEDMonitor_P5_cff::Max, and policy_.

  {
    return policy_ != enquing_policy::Max;
  }
bool stor::QueueID::operator!= ( QueueID const &  other) const [inline]

operator!= is the negation of operator==.

Definition at line 133 of file QueueID.h.

References operator==().

  {
    return !( operator==(other));
  }
bool stor::QueueID::operator< ( QueueID const &  other) const [inline]

operator< induces a strict weak ordering, so that QueueID can be used as a key in std::map.

Definition at line 117 of file QueueID.h.

References index_, and policy_.

  {
    return policy_ == other.policy_
      ? index_ < other.index_
      : policy_ < other.policy_;
  }
bool stor::QueueID::operator== ( QueueID const &  other) const [inline]

operator== returns true if both the policies and indices are equal.

Definition at line 126 of file QueueID.h.

References index_, and policy_.

Referenced by operator!=().

  {
    return policy_ == other.policy_ && index_ == other.index_;
  }
QueueID::PolicyType stor::QueueID::policy ( ) const [inline]

Return the tag for the queing policy of *this.

Definition at line 96 of file QueueID.h.

References policy_.

Referenced by stor::operator<<().

  {
    return policy_;
  }

Member Data Documentation

size_t stor::QueueID::index_ [private]

Definition at line 75 of file QueueID.h.

Referenced by index(), operator<(), and operator==().

Definition at line 76 of file QueueID.h.

Referenced by isValid(), operator<(), operator==(), and policy().