Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: blimp/net/helium/syncable.cc

Issue 2382533002: Helium: Initial proto and Syncable interface definition (Closed)
Patch Set: Addressing initial feedback Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "blimp/net/helium/syncable.h"
6
7 namespace blimp {
8
9 SyncableObject::SyncableObject(const VectorClock& clock) : clock_(clock) {}
10
11 template <class ChangesetType>
12 SyncableMember<ChangesetType>::SyncableMember(SyncableObject* parent)
13 : parent_(parent) {}
14
15 template <class ChangesetType>
16 VectorClock SyncableMember<ChangesetType>::IncrementParentClock() {
17 parent_->get_clock().IncrementLocal();
18 return parent_->get_clock();
19 }
20
21 // Instantiate the template for int (Unit test uses it)
22 template class Syncable<int>;
23 template class Syncable<helium::Changeset>;
24 template class SyncableMember<helium::Changeset>;
25 template class SyncableMember<int>;
scf 2016/09/29 23:20:08 is there a way to write this template instantiatio
steimel 2016/09/30 16:43:58 AFAIK, you either have to do this, define all the
scf 2016/09/30 17:26:23 The problem is that chromium style complained abou
26
27 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698