root/trunk/ssphys/SSPhysLib/SSBranchFileObject.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 // SSBranchFileObject.cpp: implementation of the SSBranchFileObject class.
2 //
3 //////////////////////////////////////////////////////////////////////
4
5 #include "StdAfx.h"
6 #include "SSBranchFileObject.h"
7
8 //////////////////////////////////////////////////////////////////////
9 // Construction/Destruction
10 //////////////////////////////////////////////////////////////////////
11
12 SSBranchFileObject::SSBranchFileObject(SSRecordPtr pRecord)
13 : SSObject (pRecord, eBranchFile)
14 {
15   if (pRecord->GetLen() < sizeof (BF))
16     throw SSRecordException ("not enough data for branch file (BF) object");
17 }
18
19 SSBranchFileObject::~SSBranchFileObject()
20 {
21
22 }
23
24 SSBranchFileObject* SSBranchFileObject::GetPrevious ()
25 {
26   SSRecordPtr pRecord = GetFile()->GetRecord(GetPreviousOffset ());
27   return new SSBranchFileObject (pRecord);
28 }
29
30 void SSBranchFileObject::ToXml (XMLNode* pParent) const
31 {
32   XMLElement previous  (pParent, "PreviousOffset",  GetPreviousOffset());
33   XMLElement branch    (pParent, "BranchToPhys",    GetBranchToPhys());
34 }
35
36 void SSBranchFileObject::Dump (std::ostream& os) const
37 {
38   SSObject::Dump (os);
39
40   os << "Previous    : 0x" << std::hex << GetPreviousOffset() << std::dec << std::endl;
41   os << "BranchToPhys:   " << GetBranchToPhys() << std::endl;
42 }
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.