Fixed typo. Was not getting any text after pRecord->GetRecordType() (which was proba...
[vss2svn.git] / ssphys / SSPhysLib / SSCommentObject.cpp
blob13b5a59c3b62275d0c01119b502e64494fa4c22a
1 // SSCommentObject.cpp: implementation of the SSCommentObject class.
2 //
3 //////////////////////////////////////////////////////////////////////
5 #include "StdAfx.h"
6 #include "SSCommentObject.h"
8 //////////////////////////////////////////////////////////////////////
9 // Construction/Destruction
10 //////////////////////////////////////////////////////////////////////
12 SSCommentObject::SSCommentObject(SSRecordPtr pRecord)
13 : SSObject (pRecord, eCommentRecord)
15 int len = std::min (strlen (reinterpret_cast <const char*> (pRecord->GetBuffer())), (size_t) pRecord->GetLen ());
16 m_Comment = std::string (reinterpret_cast <const char*> (pRecord->GetBuffer()), len);
19 SSCommentObject::~SSCommentObject()
24 std::string SSCommentObject::GetComment () const
26 return m_Comment;
29 void SSCommentObject::ToXml (XMLNode* pParent) const
31 XMLText commentValue (pParent, GetComment ());
34 void SSCommentObject::Dump (std::ostream& os) const
36 SSObject::Dump (os);
37 os << GetComment () << std::endl;