| 1 |
// SSCheckOutObject.cpp: implementation of the SSCheckOutObject class. |
|---|
| 2 |
// |
|---|
| 3 |
////////////////////////////////////////////////////////////////////// |
|---|
| 4 |
|
|---|
| 5 |
#include "StdAfx.h" |
|---|
| 6 |
#include "SSCheckOutObject.h" |
|---|
| 7 |
|
|---|
| 8 |
////////////////////////////////////////////////////////////////////// |
|---|
| 9 |
// Construction/Destruction |
|---|
| 10 |
////////////////////////////////////////////////////////////////////// |
|---|
| 11 |
SSCheckOutObject::SSCheckOutObject (SSRecordPtr pRecord) |
|---|
| 12 |
: SSObject (pRecord, eCheckOutRecord) |
|---|
| 13 |
{ |
|---|
| 14 |
if (pRecord->GetLen() < sizeof (CF)) |
|---|
| 15 |
throw SSRecordException ("not enough data for checkout (CF) object"); |
|---|
| 16 |
} |
|---|
| 17 |
|
|---|
| 18 |
SSCheckOutObject::~SSCheckOutObject () |
|---|
| 19 |
{ |
|---|
| 20 |
} |
|---|
| 21 |
|
|---|
| 22 |
void SSCheckOutObject::ToXml (XMLNode* pParent) const |
|---|
| 23 |
{ |
|---|
| 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()); |
|---|
| 29 |
} |
|---|
| 30 |
|
|---|
| 31 |
void SSCheckOutObject::Dump (std::ostream& os) const |
|---|
| 32 |
{ |
|---|
| 33 |
SSObject::Dump (os); |
|---|
| 34 |
|
|---|
| 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; |
|---|
| 40 |
} |
|---|