1 // SSParentFolderObject.cpp: implementation of the SSParentFolderObject class.
3 //////////////////////////////////////////////////////////////////////
6 #include "SSParentFolderObject.h"
9 //---------------------------------------------------------------------------
10 #include "LeakWatcher.h"
15 static char THIS_FILE
[] = __FILE__
;
18 //////////////////////////////////////////////////////////////////////
19 // Construction/Destruction
20 //////////////////////////////////////////////////////////////////////
22 SSParentFolderObject::SSParentFolderObject(SSRecordPtr pRecord
)
23 : SSObject (pRecord
, eParentFolder
)
25 if (pRecord
->GetLen() < sizeof (PF
))
26 throw SSRecordException ("not enough data for parent folder (PF) object");
29 SSParentFolderObject::~SSParentFolderObject()
34 SSParentFolderObject
* SSParentFolderObject::GetPrevious ()
36 SSRecordPtr pRecord
= GetFile()->GetRecord(GetPreviousOffset ());
37 return new SSParentFolderObject (pRecord
);
40 void SSParentFolderObject::ToXml (XMLNode
* pParent
) const
42 XMLElement
previous (pParent
, "PreviousOffset", GetPreviousOffset());
43 XMLElement
parent (pParent
, "ParentPhys", GetParentPhys());
46 void SSParentFolderObject::Dump (std::ostream
& os
) const
50 os
<< "Previous: 0x" << std::hex
<< GetPreviousOffset() << std::dec
<< std::endl
;
51 os
<< "Parent : " << GetParentPhys() << std::endl
;