1 // SSBranchFileObject.cpp: implementation of the SSBranchFileObject class.
3 //////////////////////////////////////////////////////////////////////
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
40 os
<< "Previous : 0x" << std::hex
<< GetPreviousOffset() << std::dec
<< std::endl
;
41 os
<< "BranchToPhys: " << GetBranchToPhys() << std::endl
;