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 PartitionReference(partition_id id,int32 changeCounter)10PartitionReference::PartitionReference(partition_id id, int32 changeCounter) 11 : 12 BReferenceable(), 13 fID(id), 14 fChangeCounter(changeCounter) 15 { 16 } 17 18 19 // destructor ~PartitionReference()20PartitionReference::~PartitionReference() 21 { 22 } 23 24 25 // SetTo 26 void SetTo(partition_id id,int32 changeCounter)27PartitionReference::SetTo(partition_id id, int32 changeCounter) 28 { 29 fID = id; 30 fChangeCounter = changeCounter; 31 } 32 33 34 // PartitionID 35 partition_id PartitionID() const36PartitionReference::PartitionID() const 37 { 38 return fID; 39 } 40 41 42 // SetPartitionID 43 void SetPartitionID(partition_id id)44PartitionReference::SetPartitionID(partition_id id) 45 { 46 fID = id; 47 } 48 49 50 // ChangeCounter 51 int32 ChangeCounter() const52PartitionReference::ChangeCounter() const 53 { 54 return fChangeCounter; 55 } 56 57 58 // SetChangeCounter 59 void SetChangeCounter(int32 counter)60PartitionReference::SetChangeCounter(int32 counter) 61 { 62 fChangeCounter = counter; 63 } 64