Junxiao Shi | 9b0d3e9 | 2014-02-15 12:27:12 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2014 Named Data Networking Project |
| 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 7 | #include "ndnlp-sequence-generator.hpp" |
| 8 | |
| 9 | namespace nfd { |
| 10 | namespace ndnlp { |
| 11 | |
| 12 | SequenceBlock::SequenceBlock(uint64_t start, size_t count) |
| 13 | : m_start(start) |
| 14 | , m_count(count) |
| 15 | { |
| 16 | } |
| 17 | |
| 18 | SequenceGenerator::SequenceGenerator() |
| 19 | : m_next(0) |
| 20 | { |
| 21 | } |
| 22 | |
| 23 | SequenceBlock |
| 24 | SequenceGenerator::nextBlock(size_t count) |
| 25 | { |
| 26 | SequenceBlock sb(m_next, count); |
| 27 | m_next += count; |
| 28 | return sb; |
| 29 | } |
| 30 | |
| 31 | } // namespace ndnlp |
| 32 | } // namespace nfd |