| /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| * Copyright (C) 2014 Named Data Networking Project |
| * See COPYING for copyright and distribution information. |
| #ifndef NFD_FACE_NDNLP_SEQUENCE_GENERATOR_HPP |
| #define NFD_FACE_NDNLP_SEQUENCE_GENERATOR_HPP |
| /** \brief represents a block of sequence numbers |
| SequenceBlock(uint64_t start, size_t count); |
| /** \return{ the pos-th sequence number } |
| operator[](size_t pos) const; |
| SequenceBlock::operator[](size_t pos) const |
| throw std::out_of_range("pos"); |
| return m_start + static_cast<uint64_t>(pos); |
| SequenceBlock::count() const |
| /** \class SequenceGenerator |
| * \brief generates sequence numbers |
| class SequenceGenerator : noncopyable |
| /** \brief generates a block of consecutive sequence numbers |
| * This block must not overlap with a recent block. |
| #endif // NFD_FACE_NDNLP_SEQUENCE_GENERATOR_HPP |