root/trunk/ssphys/SSPhysLib/SSParentFolderObject.cpp

Revision 157 (checked in by ldavis, 4 years ago)

added svn:eol-style to all files
added svn:mime-type to all files

  • Property svn:mime-type set to text/plain
  • Property svn:eol-style set to native
Line 
1 // SSParentFolderObject.cpp: implementation of the SSParentFolderObject class.
2 //
3 //////////////////////////////////////////////////////////////////////
4
5 #include "StdAfx.h"
6 #include "SSParentFolderObject.h"
7 #include "SSFiles.h"
8
9 //---------------------------------------------------------------------------
10 #include "LeakWatcher.h"
11
12 #ifdef _DEBUG
13 #define new DEBUG_NEW
14 #undef THIS_FILE
15 static char THIS_FILE[] = __FILE__;
16 #endif
17
18 //////////////////////////////////////////////////////////////////////
19 // Construction/Destruction
20 //////////////////////////////////////////////////////////////////////
21
22 SSParentFolderObject::SSParentFolderObject(SSRecordPtr pRecord)
23 : SSObject (pRecord, eParentFolder)
24 {
25   if (pRecord->GetLen() < sizeof (PF))
26     throw SSRecordException ("not enough data for parent folder (PF) object");
27 }
28
29 SSParentFolderObject::~SSParentFolderObject()
30 {
31
32 }
33
34 SSParentFolderObject* SSParentFolderObject::GetPrevious ()
35 {
36   SSRecordPtr pRecord = GetFile()->GetRecord(GetPreviousOffset ());
37   return new SSParentFolderObject (pRecord);
38 }
39
40 void SSParentFolderObject::ToXml (XMLNode* pParent) const
41 {
42   XMLElement previous  (pParent, "PreviousOffset",  GetPreviousOffset());
43   XMLElement parent    (pParent, "ParentPhys", GetParentPhys());
44 }
45
46 void SSParentFolderObject::Dump (std::ostream& os) const
47 {
48   SSObject::Dump (os);
49
50   os << "Previous: 0x" << std::hex << GetPreviousOffset() << std::dec << std::endl;
51   os << "Parent  :   " << GetParentPhys() << std::endl;
52 }
Note: See TracBrowser for help on using the browser.

PumaCode.org recommends CVSDude for fast, professional Subversion and Trac hosting:

CVSDude.com

These ads are automatically generated by Google. Revenue from these ads helps to pay for hosting this site; however, these ads do not constitute an endorsement by PumaCode.org.