LAPTOP-SNT8I5JK\Boounion
2025-09-09 be5a6792464eb0722a387b0ab74722d19c9a4a17
SourceCode/Bond/Servo/CGlass.cpp
@@ -16,7 +16,7 @@
   CGlass::~CGlass()
   {
      reset();
   }
   void CGlass::reset()
@@ -105,6 +105,25 @@
   CPath* CGlass::getPath()
   {
      return m_pPath;
   }
   std::string CGlass::getPathDescription()
   {
      std::string strOut, strPath;
      char szBuffer[256];
      CPath* pTemp = m_pPath;
      while (pTemp != nullptr) {
         pTemp->getSimpleDescription(strPath);
         strOut.append(strPath);
         pTemp = pTemp->getNext();
         if (pTemp != nullptr) {
            strOut.append(" -> ");
         }
      }
      return strOut;
   }
   CPath* CGlass::getPathWithEq(unsigned int nEqId, unsigned int nUnit)
@@ -369,4 +388,33 @@
   {
      m_tEnd = std::chrono::system_clock::now();
   }
   void CGlass::addParams(std::vector<CParam>& params)
   {
      m_params.insert(m_params.end(), params.begin(), params.end());
   }
   std::vector<CParam>& CGlass::getParams()
   {
      return m_params;
   }
   std::string CGlass::getParamsDescription()
   {
      std::string strOut;
      char szBuffer[256];
      for (auto p : m_params) {
         if (!strOut.empty()) strOut.append(",");
         if (p.getValueType() == PVT_INT) {
            sprintf_s(szBuffer, 256, "%s:%d", p.getName().c_str(), p.getIntValue());
         }
         else if (p.getValueType() == PVT_DOUBLE) {
            sprintf_s(szBuffer, 256, "%s:%f", p.getName().c_str(), p.getDoubleValue());
         }
         strOut.append(szBuffer);
      }
      return strOut;
   }
}