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