blob: e117ca3bf451488a9d5013eee07ecd4b0d0f38a9 [file] [log] [blame]
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -08001/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
2/*
Alexander Afanasyev8722d872014-07-02 13:00:29 -07003 * Copyright (c) 2012-2014 University of California, Los Angeles
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -08004 *
Alexander Afanasyev8722d872014-07-02 13:00:29 -07005 * This file is part of ChronoSync, synchronization library for distributed realtime
6 * applications for NDN.
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -08007 *
Alexander Afanasyev8722d872014-07-02 13:00:29 -07008 * ChronoSync is free software: you can redistribute it and/or modify it under the terms
9 * of the GNU General Public License as published by the Free Software Foundation, either
10 * version 3 of the License, or (at your option) any later version.
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080011 *
Alexander Afanasyev8722d872014-07-02 13:00:29 -070012 * ChronoSync is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080015 *
Alexander Afanasyev8722d872014-07-02 13:00:29 -070016 * You should have received a copy of the GNU General Public License along with
17 * ChronoSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * @author Zhenkai Zhu <http://irl.cs.ucla.edu/~zhenkai/>
20 * @author Chaoyi Bian <bcy@pku.edu.cn>
21 * @author Alexander Afanasyev <http://lasr.cs.ucla.edu/afanasyev/index.html>
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080022 */
Alexander Afanasyeve00ffbe2012-03-05 00:01:36 -080023
24#include "sync-leaf.h"
25
26namespace Sync {
27
28Leaf::Leaf (NameInfoConstPtr info, const SeqNo &seq)
29 : m_info (info)
30 , m_seq (seq)
31{
32}
33
Alexander Afanasyev58c77b02012-03-05 21:52:25 -080034Leaf::~Leaf ()
35{
36}
37
Alexander Afanasyeve00ffbe2012-03-05 00:01:36 -080038void
39Leaf::setSeq (const SeqNo &seq)
40{
41 m_seq = std::max (m_seq, seq);
42}
43
44} // Sync