Add Dirk Luetjen's ssphys libraries and command-line tool
[vss2svn.git] / ssphys / SSPhysLib / SSCheckOutObject.cpp
blob45e6eb53d377b4b4fe4ade179541dd6c9b31a541
1 // SSCheckOutObject.cpp: implementation of the SSCheckOutObject class.
2 //
3 //////////////////////////////////////////////////////////////////////
5 #include "stdafx.h"
6 #include "SSCheckOutObject.h"
8 //////////////////////////////////////////////////////////////////////
9 // Construction/Destruction
10 //////////////////////////////////////////////////////////////////////
11 SSCheckOutObject::SSCheckOutObject (SSRecordPtr pRecord)
12 : SSObject (pRecord, eCheckOutRecord)
14 if (pRecord->GetLen() < sizeof (CF))
15 throw SSRecordException ("not enough data for checkout (CF) object");
18 SSCheckOutObject::~SSCheckOutObject ()
22 void SSCheckOutObject::ToXml (XMLNode* pParent) const
24 XMLElement User (pParent, "User", GetUser());
25 XMLElement CheckOutFolder (pParent, "Folder", GetCheckOutFolder());
26 XMLElement Computer (pParent, "Computer", GetComputer());
27 XMLElement ParentSpec (pParent, "ParentSpec", GetParentSpec());
28 XMLElement Comment (pParent, "Comment", GetComment());
31 void SSCheckOutObject::Dump (std::ostream& os) const
33 SSObject::Dump (os);
35 os << "User: " << GetUser () << std::endl;
36 os << "CheckOutFolder: " << GetCheckOutFolder() << std::endl;
37 os << "Computer: " << GetComputer() << std::endl;
38 os << "ParentSpec: " << GetParentSpec() << std::endl;
39 os << "Comment: " << GetComment() << std::endl;