Chromium Code Reviews| Index: blimp/net/helium/syncable.cc |
| diff --git a/blimp/net/helium/syncable.cc b/blimp/net/helium/syncable.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a6b8a7d4211f207010035db497eb57813fd5a671 |
| --- /dev/null |
| +++ b/blimp/net/helium/syncable.cc |
| @@ -0,0 +1,27 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "blimp/net/helium/syncable.h" |
| + |
| +namespace blimp { |
| + |
| +SyncableObject::SyncableObject(const VectorClock& clock) : clock_(clock) {} |
| + |
| +template <class ChangesetType> |
| +SyncableMember<ChangesetType>::SyncableMember(SyncableObject* parent) |
| + : parent_(parent) {} |
| + |
| +template <class ChangesetType> |
| +VectorClock SyncableMember<ChangesetType>::IncrementParentClock() { |
| + parent_->get_clock().IncrementLocal(); |
| + return parent_->get_clock(); |
| +} |
| + |
| +// Instantiate the template for int (Unit test uses it) |
|
Kevin M
2016/09/30 18:34:36
This approach doesn't scale - unit tests need it f
scf
2016/09/30 22:13:23
Done.
|
| +template class Syncable<int>; |
| +template class Syncable<helium::Changeset>; |
| +template class SyncableMember<helium::Changeset>; |
| +template class SyncableMember<int>; |
| + |
| +} // namespace blimp |