mrDarker
2025-03-25 8de338246a5c70210077ce1162e926cef5f39c70
SourceCode/Bond/Servo/CGlass.cpp
对比新文件
@@ -0,0 +1,57 @@
#include "stdafx.h"
#include "CGlass.h"
namespace SERVO {
   CGlass::CGlass()
   {
   }
   CGlass::~CGlass()
   {
   }
   std::string& CGlass::getClassName()
   {
      static std::string strName = "CGlass";
      return strName;
   }
   std::string CGlass::toString()
   {
      std::string strText;
      strText += "CGlass[";
      strText += ("ID:" + m_strID + ";");
      strText += "]";
      return strText;
   }
   void CGlass::setID(const char* pszID)
   {
      m_strID = pszID;
   }
   std::string& CGlass::getID()
   {
      return m_strID;
   }
   void CGlass::serialize(CArchive& ar)
   {
      if (ar.IsStoring())
      {
         Lock();
         WriteString(ar, m_strID);
         Unlock();
      }
      else
      {
         Lock();
         ReadString(ar, m_strID);
         Unlock();
      }
   }
}