1 /* 2 * Copyright 2007, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #include "PartitionReference.h" 7 8 9 // constructor 10 PartitionReference::PartitionReference(partition_id id, int32 changeCounter) 11 : 12 BReferenceable(), 13 fID(id), 14 fChangeCounter(changeCounter) 15 { 16 } 17 18 19 // destructor 20 PartitionReference::~PartitionReference() 21 { 22 } 23 24 25 // SetTo 26 void 27 PartitionReference::SetTo(partition_id id, int32 changeCounter) 28 { 29 fID = id; 30 fChangeCounter = changeCounter; 31 } 32 33 34 // PartitionID 35 partition_id 36 PartitionReference::PartitionID() const 37 { 38 return fID; 39 } 40 41 42 // SetPartitionID 43 void 44 PartitionReference::SetPartitionID(partition_id id) 45 { 46 fID = id; 47 } 48 49 50 // ChangeCounter 51 int32 52 PartitionReference::ChangeCounter() const 53 { 54 return fChangeCounter; 55 } 56 57 58 // SetChangeCounter 59 void 60 PartitionReference::SetChangeCounter(int32 counter) 61 { 62 fChangeCounter = counter; 63 } 64