* Path for renames during restore and renames during share (thanks to Bryan Aldrich...
[vss2svn.git] / ssphys / SSPhysLib / SSBranchFileObject.cpp
blob0f9f76000d486d4803220873af5549aa042bdc26
1 // SSBranchFileObject.cpp: implementation of the SSBranchFileObject class.
2 //
3 //////////////////////////////////////////////////////////////////////
5 #include "StdAfx.h"
6 #include "SSBranchFileObject.h"
8 //////////////////////////////////////////////////////////////////////
9 // Construction/Destruction
10 //////////////////////////////////////////////////////////////////////
12 SSBranchFileObject::SSBranchFileObject(SSRecordPtr pRecord)
13 : SSObject (pRecord, eBranchFile)
15 if (pRecord->GetLen() < sizeof (BF))
16 throw SSRecordException ("not enough data for branch file (BF) object");
19 SSBranchFileObject::~SSBranchFileObject()
24 SSBranchFileObject* SSBranchFileObject::GetPrevious ()
26 SSRecordPtr pRecord = GetFile()->GetRecord(GetPreviousOffset ());
27 return new SSBranchFileObject (pRecord);
30 void SSBranchFileObject::ToXml (XMLNode* pParent) const
32 XMLElement previous (pParent, "PreviousOffset", GetPreviousOffset());
33 XMLElement branch (pParent, "BranchToPhys", GetBranchToPhys());
36 void SSBranchFileObject::Dump (std::ostream& os) const
38 SSObject::Dump (os);
40 os << "Previous : 0x" << std::hex << GetPreviousOffset() << std::dec << std::endl;
41 os << "BranchToPhys: " << GetBranchToPhys() << std::endl;