LAPTOP-T815PCOQ\25526
2024-11-26 893975d8197b1ed7241ca630490f8f6b3f7d32ea
1. 轴设定界面基本完成 2.轴设定不保存数据库,而是保存.xml文件
已添加5个文件
已修改10个文件
15434 ■■■■■ 文件已修改
SourceCode/Bond/BondEq/BondEq.rc 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/BondEq/BondEq.vcxproj 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/BondEq/BondEqDlg.cpp 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/BondEq/DBManager/AxisManager.cpp 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/BondEq/FileManager/RecipeManager.cpp 213 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/BondEq/FileManager/RecipeManager.h 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/BondEq/FileManager/pugiconfig.hpp 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/BondEq/FileManager/pugixml.cpp 13226 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/BondEq/FileManager/pugixml.hpp 1516 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/BondEq/Resource.h 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/BondEq/ToolUnits.cpp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/BondEq/View/AxisSettingsDlg.cpp 275 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/BondEq/View/AxisSettingsDlg.h 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/BondEq/stdafx.h 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/x64/Debug/Config/BondEq.db 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/BondEq/BondEq.rc
Binary files differ
SourceCode/Bond/BondEq/BondEq.vcxproj
@@ -115,7 +115,7 @@
      <Optimization>Disabled</Optimization>
      <PreprocessorDefinitions>_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <SDLCheck>true</SDLCheck>
      <AdditionalIncludeDirectories>.;.\View;.\DBManager;..\DatabaseSDK\include;..\BLControlsSDK\include;..\BLControlsSDK\GridControl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <AdditionalIncludeDirectories>.;.\View;.\DBManager;.\FileManager;..\DatabaseSDK\include;..\BLControlsSDK\include;..\BLControlsSDK\GridControl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ClCompile>
    <Link>
      <SubSystem>Windows</SubSystem>
@@ -222,6 +222,9 @@
    <ClInclude Include="DBManager\UserManager.h" />
    <ClInclude Include="EQState.h" />
    <ClInclude Include="EQStateMonitor.h" />
    <ClInclude Include="FileManager\pugiconfig.hpp" />
    <ClInclude Include="FileManager\pugixml.hpp" />
    <ClInclude Include="FileManager\RecipeManager.h" />
    <ClInclude Include="GB2860SQLite.h" />
    <ClInclude Include="HmTab.h" />
    <ClInclude Include="HmVerticalTab.h" />
@@ -286,6 +289,10 @@
    <ClCompile Include="DBManager\UserManager.cpp" />
    <ClCompile Include="EQState.cpp" />
    <ClCompile Include="EQStateMonitor.cpp" />
    <ClCompile Include="FileManager\pugixml.cpp">
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
    </ClCompile>
    <ClCompile Include="FileManager\RecipeManager.cpp" />
    <ClCompile Include="GB2860SQLite.cpp" />
    <ClCompile Include="HmTab.cpp" />
    <ClCompile Include="HmVerticalTab.cpp" />
SourceCode/Bond/BondEq/BondEqDlg.cpp
@@ -8,6 +8,7 @@
#include "afxdialogex.h"
#include "Common.h"
#include "CBonder.h"
#include "ToolUnits.h"
#include "SettingsDlg.h"
#include "InputDialog.h"
#include "LoginDlg.h"
@@ -202,28 +203,11 @@
        return FALSE;
    }
    // è®¾ç½®è½´è®¾å®šæ¨¡å—的数据库连接
    AxisManager& axisManager = AxisManager::getInstance();
    axisManager.setDatabase(db.get());
    // åˆå§‹åŒ–轴设定表
    try {
        if (!axisManager.initializeTables()) {
            AfxMessageBox("创建轴设定表失败!");
            return FALSE;
        }
        if (!axisManager.initializeDefaultData()) {
            AfxMessageBox("初始化轴设定默认数据失败!");
            return FALSE;
        }
    }
    catch (const std::exception& ex) {
        CString errorMsg;
        errorMsg.Format(_T("初始化轴设定模块失败:%s"), CString(ex.what()));
        AfxMessageBox(errorMsg, MB_ICONERROR);
        return FALSE;
    }
    // è®¾ç½®é…æ–¹æ–‡ä»¶å¤¹è·¯å¾„
    RecipeManager& recipeManager = RecipeManager::getInstance();
    std::string strRecipePath =  CToolUnits::getCurrentExePath() + _T("\\Recipe");
    CToolUnits::createDir(strRecipePath.c_str());
    recipeManager.setRecipeFolder(strRecipePath);
    // èœå•
@@ -498,6 +482,7 @@
{
    CAxisSettingsDlg axisDlg;
    axisDlg.SetPLC(theApp.m_model.getBonder().getPLC("PLC(1)"));
    axisDlg.SetRecipeName(_T("Default"));
    axisDlg.DoModal();
    /*
SourceCode/Bond/BondEq/DBManager/AxisManager.cpp
@@ -1,4 +1,5 @@
#include "stdafx.h"
#include "AxisManager.h"
#include <sstream>
#include <stdexcept>
#include <mutex>
SourceCode/Bond/BondEq/FileManager/RecipeManager.cpp
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,213 @@
#include "stdafx.h"
#include <sstream>
#include <fstream>
#include <iostream>
// å•例获取
RecipeManager& RecipeManager::getInstance() {
    static RecipeManager instance;
    return instance;
}
// æž„造函数
RecipeManager::RecipeManager() : m_recipeFolder("Recipe") {}
// è®¾ç½®é…æ–¹æ–‡ä»¶å¤¹
void RecipeManager::setRecipeFolder(const std::string& folderPath) {
    m_recipeFolder = folderPath;
}
// åŠ è½½é…æ–¹ï¼ˆå¦‚æžœæ–‡ä»¶ä¸å­˜åœ¨ï¼ŒåŠ è½½é»˜è®¤æ•°æ®ï¼‰
bool RecipeManager::loadRecipe(const std::string& recipeName) {
    std::string filePath = m_recipeFolder + "/" + recipeName + ".xml";
    pugi::xml_document doc;
    if (!doc.load_file(filePath.c_str())) {
        std::cerr << "Recipe file not found: " << filePath << ". Loading default recipe." << std::endl;
        generateDefaultRecipe();
        return false; // æ–‡ä»¶ä¸å­˜åœ¨ï¼Œä½†åŠ è½½äº†é»˜è®¤æ•°æ®
    }
    m_axes.clear();
    auto recipe = doc.child("Recipe");
    for (auto axisNode : recipe.child("Axes").children("Axis")) {
        AxisInfo axisInfo;
        axisInfo.id = axisNode.attribute("id").as_int();
        axisInfo.number = axisNode.attribute("number").value();
        axisInfo.description = axisNode.attribute("description").value();
        axisInfo.startAddress = axisNode.attribute("start_address").value();
        axisInfo.jogDistance = axisNode.attribute("jog_distance").as_double();
        axisInfo.manualSpeed = axisNode.attribute("manual_speed").as_double();
        axisInfo.autoSpeed = axisNode.attribute("auto_speed").as_double();
        axisInfo.accelerationTime = axisNode.attribute("acceleration_time").as_double();
        axisInfo.decelerationTime = axisNode.attribute("deceleration_time").as_double();
        for (auto positionNode : axisNode.child("Positions").children("Position")) {
            std::string description = positionNode.attribute("description").value();
            double positionValue = positionNode.attribute("value").as_double();
            axisInfo.positions.emplace_back(description, positionValue);
        }
        m_axes[axisInfo.id] = axisInfo;
    }
    return true;
}
// ä¿å­˜é…æ–¹
bool RecipeManager::saveRecipe(const std::string& recipeName) {
    // ç”Ÿæˆæ–‡ä»¶è·¯å¾„
    std::string filePath = m_recipeFolder + "/" + recipeName + ".xml";
    // åˆ›å»º XML æ–‡æ¡£å¯¹è±¡
    pugi::xml_document doc;
    // å¦‚果轴数据为空,生成默认配方
    if (m_axes.empty()) {
        generateDefaultRecipe();
    }
    // æ·»åŠ é…æ–¹æ ¹èŠ‚ç‚¹
    auto recipe = doc.append_child("Recipe");
    // æ·»åŠ è½´åˆ—è¡¨èŠ‚ç‚¹
    auto axesNode = recipe.append_child("Axes");
    // éåŽ†æ‰€æœ‰è½´æ•°æ®å¹¶å†™å…¥ XML
    for (const auto& axisEntry : m_axes) {
        const AxisInfo& axisInfo = axisEntry.second;
        auto axisNode = axesNode.append_child("Axis");
        axisNode.append_attribute("id") = axisInfo.id;
        axisNode.append_attribute("number") = axisInfo.number.c_str();
        axisNode.append_attribute("description") = axisInfo.description.c_str();
        axisNode.append_attribute("start_address") = axisInfo.startAddress.c_str();
        axisNode.append_attribute("jog_distance") = axisInfo.jogDistance;
        axisNode.append_attribute("manual_speed") = axisInfo.manualSpeed;
        axisNode.append_attribute("auto_speed") = axisInfo.autoSpeed;
        axisNode.append_attribute("acceleration_time") = axisInfo.accelerationTime;
        axisNode.append_attribute("deceleration_time") = axisInfo.decelerationTime;
        // æ·»åŠ å®šä½ç‚¹åˆ—è¡¨
        auto positionsNode = axisNode.append_child("Positions");
        for (const auto& position : axisInfo.positions) {
            auto positionNode = positionsNode.append_child("Position");
            positionNode.append_attribute("description") = position.first.c_str();
            positionNode.append_attribute("value") = position.second;
        }
    }
    // ä¿å­˜ XML æ–‡ä»¶
    return doc.save_file(filePath.c_str());
}
// ç”Ÿæˆé»˜è®¤é…æ–¹
void RecipeManager::generateDefaultRecipe() {
    m_axes.clear();
    for (int axisId = 1; axisId <= 12; ++axisId) {
        AxisInfo axisInfo;
        axisInfo.id = axisId;
        axisInfo.number = "M100-M" + std::to_string(axisId);
        axisInfo.description = "Default_Axis" + std::to_string(axisId);
        axisInfo.startAddress = "D" + std::to_string(100 + axisId * 10);
        axisInfo.jogDistance = 0.5;
        axisInfo.manualSpeed = 10.0;
        axisInfo.autoSpeed = 15.0;
        axisInfo.accelerationTime = 0.2;
        axisInfo.decelerationTime = 0.3;
        for (int posId = 1; posId <= 25; ++posId) {
            axisInfo.positions.emplace_back("Position " + std::to_string(posId), posId * 10.0);
        }
        m_axes[axisId] = axisInfo;
    }
}
// èŽ·å–æ‰€æœ‰è½´ä¿¡æ¯
const std::map<int, AxisInfo>& RecipeManager::getAxes() const {
    return m_axes;
}
// èŽ·å–å•ä¸ªè½´ä¿¡æ¯
AxisInfo RecipeManager::getAxis(int axisId) const {
    auto it = m_axes.find(axisId);
    if (it != m_axes.end()) {
        return it->second;
    }
    // è¿”回一个无效的 AxisInfo
    return AxisInfo{ -1, "", "", "", 0.0, 0.0, 0.0, 0.0, 0.0, {}};
}
// æ›´æ–°è½´ä¿¡æ¯
bool RecipeManager::updateAxis(const AxisInfo& axisInfo) {
    if (m_axes.find(axisInfo.id) == m_axes.end()) {
        return false; // è½´ä¸å­˜åœ¨
    }
    m_axes[axisInfo.id] = axisInfo;
    return true;
}
// æ·»åŠ æ–°çš„è½´ä¿¡æ¯
bool RecipeManager::addAxis(const AxisInfo& axisInfo) {
    if (m_axes.find(axisInfo.id) != m_axes.end()) {
        return false; // è½´å·²å­˜åœ¨
    }
    m_axes[axisInfo.id] = axisInfo;
    return true;
}
// åˆ é™¤è½´ä¿¡æ¯
bool RecipeManager::deleteAxis(int axisId) {
    return m_axes.erase(axisId) > 0;
}
// èŽ·å–æ‰€æœ‰è½´ç¼–å·
std::vector<int> RecipeManager::getAllAxisID() const {
    std::vector<int> axisNumbers;
    for (const auto& axis : m_axes) {
        int axisId = axis.first;
        axisNumbers.push_back(axisId);
    }
    return axisNumbers;
}
// èŽ·å–æŒ‡å®šé¡µçš„å®šä½ç‚¹
std::vector<std::pair<std::string, double>> RecipeManager::getPositions(int axisId, int pageNumber, int pageSize) const {
    std::vector<std::pair<std::string, double>> result;
    // æ£€æŸ¥è½´æ˜¯å¦å­˜åœ¨
    auto it = m_axes.find(axisId);
    if (it == m_axes.end()) {
        return result; // å¦‚果轴 ID ä¸å­˜åœ¨ï¼Œè¿”回空结果
    }
    // èŽ·å–æŒ‡å®šè½´çš„æ‰€æœ‰å®šä½ç‚¹
    const auto& positions = it->second.positions;
    // ç¡®å®šåˆ†é¡µèŒƒå›´
    int startIndex = (pageNumber - 1) * pageSize;
    int endIndex = startIndex + pageSize;
    // éåŽ†å®šä½ç‚¹ï¼ŒæŒ‰åˆ†é¡µæå–æ•°æ®
    int index = 0;
    for (const auto& pos : positions) {
        const std::string& description = pos.first; // é”®ï¼šæè¿°
        double value = pos.second;                  // å€¼ï¼šä½ç½®å€¼
        if (index >= startIndex && index < endIndex) {
            result.emplace_back(description, value);
        }
        ++index;
        if (index >= endIndex) {
            break; // è¾¾åˆ°åˆ†é¡µç»“束点
        }
    }
    return result;
}
SourceCode/Bond/BondEq/FileManager/RecipeManager.h
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,70 @@
#ifndef RECIPE_MANAGER_H
#define RECIPE_MANAGER_H
#include <string>
#include <vector>
#include <map>
#include "pugixml.hpp"
// è½´ä¿¡æ¯ç»“构体
struct AxisInfo {
    int id;                                    // è½´ID
    std::string number;                        // è½´ç¼–号
    std::string description;                   // è½´æè¿°
    std::string startAddress;                  // èµ·å§‹åœ°å€
    double jogDistance;                        // å¾®åŠ¨é‡
    double manualSpeed;                        // æ‰‹åŠ¨é€Ÿåº¦
    double autoSpeed;                          // è‡ªåŠ¨é€Ÿåº¦
    double accelerationTime;                   // åŠ é€Ÿæ—¶é—´
    double decelerationTime;                   // å‡é€Ÿæ—¶é—´
    std::vector<std::pair<std::string, double>> positions; // å®šä½ç‚¹ï¼šæè¿°å’Œä½ç½®
};
// é…æ–¹ç®¡ç†ç±»
class RecipeManager {
public:
    // å•例模式获取实例
    static RecipeManager& getInstance();
    // è®¾ç½®é…æ–¹æ–‡ä»¶å¤¹è·¯å¾„
    void setRecipeFolder(const std::string& folderPath);
    // åŠ è½½é…æ–¹ï¼ˆæ–‡ä»¶ä¸å­˜åœ¨æ—¶åŠ è½½é»˜è®¤æ•°æ®ï¼‰
    bool loadRecipe(const std::string& recipeName);
    // ä¿å­˜é…æ–¹
    bool saveRecipe(const std::string& recipeName);
    // ç”Ÿæˆé»˜è®¤é…æ–¹
    void generateDefaultRecipe();
    // èŽ·å–æ‰€æœ‰è½´ä¿¡æ¯
    const std::map<int, AxisInfo>& getAxes() const;
    // èŽ·å–å•ä¸ªè½´ä¿¡æ¯
    AxisInfo getAxis(int axisId) const;
    // æ›´æ–°è½´ä¿¡æ¯
    bool updateAxis(const AxisInfo& axisInfo);
    // æ·»åŠ æ–°çš„è½´ä¿¡æ¯
    bool addAxis(const AxisInfo& axisInfo);
    // åˆ é™¤è½´ä¿¡æ¯
    bool deleteAxis(int axisId);
    // èŽ·å–æ‰€æœ‰è½´ID
    std::vector<int> getAllAxisID() const;
    // èŽ·å–æŒ‡å®šé¡µçš„å®šä½ç‚¹
    std::vector<std::pair<std::string, double>> getPositions(int axisId, int pageNumber, int pageSize) const;
private:
    RecipeManager();
private:
    std::string m_recipeFolder;      // é…æ–¹æ–‡ä»¶å¤¹è·¯å¾„
    std::map<int, AxisInfo> m_axes;  // è½´ä¿¡æ¯ç¼“å­˜
};
#endif // RECIPE_MANAGER_H
SourceCode/Bond/BondEq/FileManager/pugiconfig.hpp
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,77 @@
/**
 * pugixml parser - version 1.14
 * --------------------------------------------------------
 * Copyright (C) 2006-2023, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
 * Report bugs and download new versions at https://pugixml.org/
 *
 * This library is distributed under the MIT License. See notice at the end
 * of this file.
 *
 * This work is based on the pugxml parser, which is:
 * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)
 */
#ifndef HEADER_PUGICONFIG_HPP
#define HEADER_PUGICONFIG_HPP
// Uncomment this to enable wchar_t mode
// #define PUGIXML_WCHAR_MODE
// Uncomment this to enable compact mode
// #define PUGIXML_COMPACT
// Uncomment this to disable XPath
// #define PUGIXML_NO_XPATH
// Uncomment this to disable STL
// #define PUGIXML_NO_STL
// Uncomment this to disable exceptions
// #define PUGIXML_NO_EXCEPTIONS
// Set this to control attributes for public classes/functions, i.e.:
// #define PUGIXML_API __declspec(dllexport) // to export all public symbols from DLL
// #define PUGIXML_CLASS __declspec(dllimport) // to import all classes from DLL
// #define PUGIXML_FUNCTION __fastcall // to set calling conventions to all public functions to fastcall
// In absence of PUGIXML_CLASS/PUGIXML_FUNCTION definitions PUGIXML_API is used instead
// Tune these constants to adjust memory-related behavior
// #define PUGIXML_MEMORY_PAGE_SIZE 32768
// #define PUGIXML_MEMORY_OUTPUT_STACK 10240
// #define PUGIXML_MEMORY_XPATH_PAGE_SIZE 4096
// Tune this constant to adjust max nesting for XPath queries
// #define PUGIXML_XPATH_DEPTH_LIMIT 1024
// Uncomment this to switch to header-only version
// #define PUGIXML_HEADER_ONLY
// Uncomment this to enable long long support
// #define PUGIXML_HAS_LONG_LONG
#endif
/**
 * Copyright (c) 2006-2023 Arseny Kapoulkine
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */
SourceCode/Bond/BondEq/FileManager/pugixml.cpp
¶Ô±ÈÐÂÎļþ
ÎļþÌ«´ó
SourceCode/Bond/BondEq/FileManager/pugixml.hpp
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1516 @@
/**
 * pugixml parser - version 1.14
 * --------------------------------------------------------
 * Copyright (C) 2006-2023, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
 * Report bugs and download new versions at https://pugixml.org/
 *
 * This library is distributed under the MIT License. See notice at the end
 * of this file.
 *
 * This work is based on the pugxml parser, which is:
 * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)
 */
// Define version macro; evaluates to major * 1000 + minor * 10 + patch so that it's safe to use in less-than comparisons
// Note: pugixml used major * 100 + minor * 10 + patch format up until 1.9 (which had version identifier 190); starting from pugixml 1.10, the minor version number is two digits
#ifndef PUGIXML_VERSION
#    define PUGIXML_VERSION 1140 // 1.14
#endif
// Include user configuration file (this can define various configuration macros)
#include "pugiconfig.hpp"
#ifndef HEADER_PUGIXML_HPP
#define HEADER_PUGIXML_HPP
// Include stddef.h for size_t and ptrdiff_t
#include <stddef.h>
// Include exception header for XPath
#if !defined(PUGIXML_NO_XPATH) && !defined(PUGIXML_NO_EXCEPTIONS)
#    include <exception>
#endif
// Include STL headers
#ifndef PUGIXML_NO_STL
#    include <iterator>
#    include <iosfwd>
#    include <string>
#endif
// Macro for deprecated features
#ifndef PUGIXML_DEPRECATED
#    if defined(__GNUC__)
#        define PUGIXML_DEPRECATED __attribute__((deprecated))
#    elif defined(_MSC_VER) && _MSC_VER >= 1300
#        define PUGIXML_DEPRECATED __declspec(deprecated)
#    else
#        define PUGIXML_DEPRECATED
#    endif
#endif
// If no API is defined, assume default
#ifndef PUGIXML_API
#    define PUGIXML_API
#endif
// If no API for classes is defined, assume default
#ifndef PUGIXML_CLASS
#    define PUGIXML_CLASS PUGIXML_API
#endif
// If no API for functions is defined, assume default
#ifndef PUGIXML_FUNCTION
#    define PUGIXML_FUNCTION PUGIXML_API
#endif
// If the platform is known to have long long support, enable long long functions
#ifndef PUGIXML_HAS_LONG_LONG
#    if __cplusplus >= 201103
#        define PUGIXML_HAS_LONG_LONG
#    elif defined(_MSC_VER) && _MSC_VER >= 1400
#        define PUGIXML_HAS_LONG_LONG
#    endif
#endif
// If the platform is known to have move semantics support, compile move ctor/operator implementation
#ifndef PUGIXML_HAS_MOVE
#    if __cplusplus >= 201103
#        define PUGIXML_HAS_MOVE
#    elif defined(_MSC_VER) && _MSC_VER >= 1600
#        define PUGIXML_HAS_MOVE
#    endif
#endif
// If C++ is 2011 or higher, add 'noexcept' specifiers
#ifndef PUGIXML_NOEXCEPT
#    if __cplusplus >= 201103
#        define PUGIXML_NOEXCEPT noexcept
#    elif defined(_MSC_VER) && _MSC_VER >= 1900
#        define PUGIXML_NOEXCEPT noexcept
#    else
#        define PUGIXML_NOEXCEPT
#    endif
#endif
// Some functions can not be noexcept in compact mode
#ifdef PUGIXML_COMPACT
#    define PUGIXML_NOEXCEPT_IF_NOT_COMPACT
#else
#    define PUGIXML_NOEXCEPT_IF_NOT_COMPACT PUGIXML_NOEXCEPT
#endif
// If C++ is 2011 or higher, add 'override' qualifiers
#ifndef PUGIXML_OVERRIDE
#    if __cplusplus >= 201103
#        define PUGIXML_OVERRIDE override
#    elif defined(_MSC_VER) && _MSC_VER >= 1700
#        define PUGIXML_OVERRIDE override
#    else
#        define PUGIXML_OVERRIDE
#    endif
#endif
// If C++ is 2011 or higher, use 'nullptr'
#ifndef PUGIXML_NULL
#    if __cplusplus >= 201103
#        define PUGIXML_NULL nullptr
#    elif defined(_MSC_VER) && _MSC_VER >= 1600
#        define PUGIXML_NULL nullptr
#    else
#        define PUGIXML_NULL 0
#    endif
#endif
// Character interface macros
#ifdef PUGIXML_WCHAR_MODE
#    define PUGIXML_TEXT(t) L ## t
#    define PUGIXML_CHAR wchar_t
#else
#    define PUGIXML_TEXT(t) t
#    define PUGIXML_CHAR char
#endif
namespace pugi
{
    // Character type used for all internal storage and operations; depends on PUGIXML_WCHAR_MODE
    typedef PUGIXML_CHAR char_t;
#ifndef PUGIXML_NO_STL
    // String type used for operations that work with STL string; depends on PUGIXML_WCHAR_MODE
    typedef std::basic_string<PUGIXML_CHAR, std::char_traits<PUGIXML_CHAR>, std::allocator<PUGIXML_CHAR> > string_t;
#endif
}
// The PugiXML namespace
namespace pugi
{
    // Tree node types
    enum xml_node_type
    {
        node_null,            // Empty (null) node handle
        node_document,        // A document tree's absolute root
        node_element,        // Element tag, i.e. '<node/>'
        node_pcdata,        // Plain character data, i.e. 'text'
        node_cdata,            // Character data, i.e. '<![CDATA[text]]>'
        node_comment,        // Comment tag, i.e. '<!-- text -->'
        node_pi,            // Processing instruction, i.e. '<?name?>'
        node_declaration,    // Document declaration, i.e. '<?xml version="1.0"?>'
        node_doctype        // Document type declaration, i.e. '<!DOCTYPE doc>'
    };
    // Parsing options
    // Minimal parsing mode (equivalent to turning all other flags off).
    // Only elements and PCDATA sections are added to the DOM tree, no text conversions are performed.
    const unsigned int parse_minimal = 0x0000;
    // This flag determines if processing instructions (node_pi) are added to the DOM tree. This flag is off by default.
    const unsigned int parse_pi = 0x0001;
    // This flag determines if comments (node_comment) are added to the DOM tree. This flag is off by default.
    const unsigned int parse_comments = 0x0002;
    // This flag determines if CDATA sections (node_cdata) are added to the DOM tree. This flag is on by default.
    const unsigned int parse_cdata = 0x0004;
    // This flag determines if plain character data (node_pcdata) that consist only of whitespace are added to the DOM tree.
    // This flag is off by default; turning it on usually results in slower parsing and more memory consumption.
    const unsigned int parse_ws_pcdata = 0x0008;
    // This flag determines if character and entity references are expanded during parsing. This flag is on by default.
    const unsigned int parse_escapes = 0x0010;
    // This flag determines if EOL characters are normalized (converted to #xA) during parsing. This flag is on by default.
    const unsigned int parse_eol = 0x0020;
    // This flag determines if attribute values are normalized using CDATA normalization rules during parsing. This flag is on by default.
    const unsigned int parse_wconv_attribute = 0x0040;
    // This flag determines if attribute values are normalized using NMTOKENS normalization rules during parsing. This flag is off by default.
    const unsigned int parse_wnorm_attribute = 0x0080;
    // This flag determines if document declaration (node_declaration) is added to the DOM tree. This flag is off by default.
    const unsigned int parse_declaration = 0x0100;
    // This flag determines if document type declaration (node_doctype) is added to the DOM tree. This flag is off by default.
    const unsigned int parse_doctype = 0x0200;
    // This flag determines if plain character data (node_pcdata) that is the only child of the parent node and that consists only
    // of whitespace is added to the DOM tree.
    // This flag is off by default; turning it on may result in slower parsing and more memory consumption.
    const unsigned int parse_ws_pcdata_single = 0x0400;
    // This flag determines if leading and trailing whitespace is to be removed from plain character data. This flag is off by default.
    const unsigned int parse_trim_pcdata = 0x0800;
    // This flag determines if plain character data that does not have a parent node is added to the DOM tree, and if an empty document
    // is a valid document. This flag is off by default.
    const unsigned int parse_fragment = 0x1000;
    // This flag determines if plain character data is be stored in the parent element's value. This significantly changes the structure of
    // the document; this flag is only recommended for parsing documents with many PCDATA nodes in memory-constrained environments.
    // This flag is off by default.
    const unsigned int parse_embed_pcdata = 0x2000;
    // This flag determines whether determines whether the the two pcdata should be merged or not, if no intermediatory data are parsed in the document.
    // This flag is off by default.
    const unsigned int parse_merge_pcdata = 0x4000;
    // The default parsing mode.
    // Elements, PCDATA and CDATA sections are added to the DOM tree, character/reference entities are expanded,
    // End-of-Line characters are normalized, attribute values are normalized using CDATA normalization rules.
    const unsigned int parse_default = parse_cdata | parse_escapes | parse_wconv_attribute | parse_eol;
    // The full parsing mode.
    // Nodes of all types are added to the DOM tree, character/reference entities are expanded,
    // End-of-Line characters are normalized, attribute values are normalized using CDATA normalization rules.
    const unsigned int parse_full = parse_default | parse_pi | parse_comments | parse_declaration | parse_doctype;
    // These flags determine the encoding of input data for XML document
    enum xml_encoding
    {
        encoding_auto,        // Auto-detect input encoding using BOM or < / <? detection; use UTF8 if BOM is not found
        encoding_utf8,        // UTF8 encoding
        encoding_utf16_le,    // Little-endian UTF16
        encoding_utf16_be,    // Big-endian UTF16
        encoding_utf16,        // UTF16 with native endianness
        encoding_utf32_le,    // Little-endian UTF32
        encoding_utf32_be,    // Big-endian UTF32
        encoding_utf32,        // UTF32 with native endianness
        encoding_wchar,        // The same encoding wchar_t has (either UTF16 or UTF32)
        encoding_latin1
    };
    // Formatting flags
    // Indent the nodes that are written to output stream with as many indentation strings as deep the node is in DOM tree. This flag is on by default.
    const unsigned int format_indent = 0x01;
    // Write encoding-specific BOM to the output stream. This flag is off by default.
    const unsigned int format_write_bom = 0x02;
    // Use raw output mode (no indentation and no line breaks are written). This flag is off by default.
    const unsigned int format_raw = 0x04;
    // Omit default XML declaration even if there is no declaration in the document. This flag is off by default.
    const unsigned int format_no_declaration = 0x08;
    // Don't escape attribute values and PCDATA contents. This flag is off by default.
    const unsigned int format_no_escapes = 0x10;
    // Open file using text mode in xml_document::save_file. This enables special character (i.e. new-line) conversions on some systems. This flag is off by default.
    const unsigned int format_save_file_text = 0x20;
    // Write every attribute on a new line with appropriate indentation. This flag is off by default.
    const unsigned int format_indent_attributes = 0x40;
    // Don't output empty element tags, instead writing an explicit start and end tag even if there are no children. This flag is off by default.
    const unsigned int format_no_empty_element_tags = 0x80;
    // Skip characters belonging to range [0; 32) instead of "&#xNN;" encoding. This flag is off by default.
    const unsigned int format_skip_control_chars = 0x100;
    // Use single quotes ' instead of double quotes " for enclosing attribute values. This flag is off by default.
    const unsigned int format_attribute_single_quote = 0x200;
    // The default set of formatting flags.
    // Nodes are indented depending on their depth in DOM tree, a default declaration is output if document has none.
    const unsigned int format_default = format_indent;
    const int default_double_precision = 17;
    const int default_float_precision = 9;
    // Forward declarations
    struct xml_attribute_struct;
    struct xml_node_struct;
    class xml_node_iterator;
    class xml_attribute_iterator;
    class xml_named_node_iterator;
    class xml_tree_walker;
    struct xml_parse_result;
    class xml_node;
    class xml_text;
    #ifndef PUGIXML_NO_XPATH
    class xpath_node;
    class xpath_node_set;
    class xpath_query;
    class xpath_variable_set;
    #endif
    // Range-based for loop support
    template <typename It> class xml_object_range
    {
    public:
        typedef It const_iterator;
        typedef It iterator;
        xml_object_range(It b, It e): _begin(b), _end(e)
        {
        }
        It begin() const { return _begin; }
        It end() const { return _end; }
        bool empty() const { return _begin == _end; }
    private:
        It _begin, _end;
    };
    // Writer interface for node printing (see xml_node::print)
    class PUGIXML_CLASS xml_writer
    {
    public:
        virtual ~xml_writer();
        // Write memory chunk into stream/file/whatever
        virtual void write(const void* data, size_t size) = 0;
    };
    // xml_writer implementation for FILE*
    class PUGIXML_CLASS xml_writer_file: public xml_writer
    {
    public:
        // Construct writer from a FILE* object; void* is used to avoid header dependencies on stdio
        xml_writer_file(void* file);
        virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE;
    private:
        void* file;
    };
    #ifndef PUGIXML_NO_STL
    // xml_writer implementation for streams
    class PUGIXML_CLASS xml_writer_stream: public xml_writer
    {
    public:
        // Construct writer from an output stream object
        xml_writer_stream(std::basic_ostream<char, std::char_traits<char> >& stream);
        xml_writer_stream(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream);
        virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE;
    private:
        std::basic_ostream<char, std::char_traits<char> >* narrow_stream;
        std::basic_ostream<wchar_t, std::char_traits<wchar_t> >* wide_stream;
    };
    #endif
    // A light-weight handle for manipulating attributes in DOM tree
    class PUGIXML_CLASS xml_attribute
    {
        friend class xml_attribute_iterator;
        friend class xml_node;
    private:
        xml_attribute_struct* _attr;
        typedef void (*unspecified_bool_type)(xml_attribute***);
    public:
        // Default constructor. Constructs an empty attribute.
        xml_attribute();
        // Constructs attribute from internal pointer
        explicit xml_attribute(xml_attribute_struct* attr);
        // Safe bool conversion operator
        operator unspecified_bool_type() const;
        // Borland C++ workaround
        bool operator!() const;
        // Comparison operators (compares wrapped attribute pointers)
        bool operator==(const xml_attribute& r) const;
        bool operator!=(const xml_attribute& r) const;
        bool operator<(const xml_attribute& r) const;
        bool operator>(const xml_attribute& r) const;
        bool operator<=(const xml_attribute& r) const;
        bool operator>=(const xml_attribute& r) const;
        // Check if attribute is empty
        bool empty() const;
        // Get attribute name/value, or "" if attribute is empty
        const char_t* name() const;
        const char_t* value() const;
        // Get attribute value, or the default value if attribute is empty
        const char_t* as_string(const char_t* def = PUGIXML_TEXT("")) const;
        // Get attribute value as a number, or the default value if conversion did not succeed or attribute is empty
        int as_int(int def = 0) const;
        unsigned int as_uint(unsigned int def = 0) const;
        double as_double(double def = 0) const;
        float as_float(float def = 0) const;
    #ifdef PUGIXML_HAS_LONG_LONG
        long long as_llong(long long def = 0) const;
        unsigned long long as_ullong(unsigned long long def = 0) const;
    #endif
        // Get attribute value as bool (returns true if first character is in '1tTyY' set), or the default value if attribute is empty
        bool as_bool(bool def = false) const;
        // Set attribute name/value (returns false if attribute is empty or there is not enough memory)
        bool set_name(const char_t* rhs);
        bool set_name(const char_t* rhs, size_t size);
        bool set_value(const char_t* rhs);
        bool set_value(const char_t* rhs, size_t size);
        // Set attribute value with type conversion (numbers are converted to strings, boolean is converted to "true"/"false")
        bool set_value(int rhs);
        bool set_value(unsigned int rhs);
        bool set_value(long rhs);
        bool set_value(unsigned long rhs);
        bool set_value(double rhs);
        bool set_value(double rhs, int precision);
        bool set_value(float rhs);
        bool set_value(float rhs, int precision);
        bool set_value(bool rhs);
    #ifdef PUGIXML_HAS_LONG_LONG
        bool set_value(long long rhs);
        bool set_value(unsigned long long rhs);
    #endif
        // Set attribute value (equivalent to set_value without error checking)
        xml_attribute& operator=(const char_t* rhs);
        xml_attribute& operator=(int rhs);
        xml_attribute& operator=(unsigned int rhs);
        xml_attribute& operator=(long rhs);
        xml_attribute& operator=(unsigned long rhs);
        xml_attribute& operator=(double rhs);
        xml_attribute& operator=(float rhs);
        xml_attribute& operator=(bool rhs);
    #ifdef PUGIXML_HAS_LONG_LONG
        xml_attribute& operator=(long long rhs);
        xml_attribute& operator=(unsigned long long rhs);
    #endif
        // Get next/previous attribute in the attribute list of the parent node
        xml_attribute next_attribute() const;
        xml_attribute previous_attribute() const;
        // Get hash value (unique for handles to the same object)
        size_t hash_value() const;
        // Get internal pointer
        xml_attribute_struct* internal_object() const;
    };
#ifdef __BORLANDC__
    // Borland C++ workaround
    bool PUGIXML_FUNCTION operator&&(const xml_attribute& lhs, bool rhs);
    bool PUGIXML_FUNCTION operator||(const xml_attribute& lhs, bool rhs);
#endif
    // A light-weight handle for manipulating nodes in DOM tree
    class PUGIXML_CLASS xml_node
    {
        friend class xml_attribute_iterator;
        friend class xml_node_iterator;
        friend class xml_named_node_iterator;
    protected:
        xml_node_struct* _root;
        typedef void (*unspecified_bool_type)(xml_node***);
    public:
        // Default constructor. Constructs an empty node.
        xml_node();
        // Constructs node from internal pointer
        explicit xml_node(xml_node_struct* p);
        // Safe bool conversion operator
        operator unspecified_bool_type() const;
        // Borland C++ workaround
        bool operator!() const;
        // Comparison operators (compares wrapped node pointers)
        bool operator==(const xml_node& r) const;
        bool operator!=(const xml_node& r) const;
        bool operator<(const xml_node& r) const;
        bool operator>(const xml_node& r) const;
        bool operator<=(const xml_node& r) const;
        bool operator>=(const xml_node& r) const;
        // Check if node is empty.
        bool empty() const;
        // Get node type
        xml_node_type type() const;
        // Get node name, or "" if node is empty or it has no name
        const char_t* name() const;
        // Get node value, or "" if node is empty or it has no value
        // Note: For <node>text</node> node.value() does not return "text"! Use child_value() or text() methods to access text inside nodes.
        const char_t* value() const;
        // Get attribute list
        xml_attribute first_attribute() const;
        xml_attribute last_attribute() const;
        // Get children list
        xml_node first_child() const;
        xml_node last_child() const;
        // Get next/previous sibling in the children list of the parent node
        xml_node next_sibling() const;
        xml_node previous_sibling() const;
        // Get parent node
        xml_node parent() const;
        // Get root of DOM tree this node belongs to
        xml_node root() const;
        // Get text object for the current node
        xml_text text() const;
        // Get child, attribute or next/previous sibling with the specified name
        xml_node child(const char_t* name) const;
        xml_attribute attribute(const char_t* name) const;
        xml_node next_sibling(const char_t* name) const;
        xml_node previous_sibling(const char_t* name) const;
        // Get attribute, starting the search from a hint (and updating hint so that searching for a sequence of attributes is fast)
        xml_attribute attribute(const char_t* name, xml_attribute& hint) const;
        // Get child value of current node; that is, value of the first child node of type PCDATA/CDATA
        const char_t* child_value() const;
        // Get child value of child with specified name. Equivalent to child(name).child_value().
        const char_t* child_value(const char_t* name) const;
        // Set node name/value (returns false if node is empty, there is not enough memory, or node can not have name/value)
        bool set_name(const char_t* rhs);
        bool set_name(const char_t* rhs, size_t size);
        bool set_value(const char_t* rhs);
        bool set_value(const char_t* rhs, size_t size);
        // Add attribute with specified name. Returns added attribute, or empty attribute on errors.
        xml_attribute append_attribute(const char_t* name);
        xml_attribute prepend_attribute(const char_t* name);
        xml_attribute insert_attribute_after(const char_t* name, const xml_attribute& attr);
        xml_attribute insert_attribute_before(const char_t* name, const xml_attribute& attr);
        // Add a copy of the specified attribute. Returns added attribute, or empty attribute on errors.
        xml_attribute append_copy(const xml_attribute& proto);
        xml_attribute prepend_copy(const xml_attribute& proto);
        xml_attribute insert_copy_after(const xml_attribute& proto, const xml_attribute& attr);
        xml_attribute insert_copy_before(const xml_attribute& proto, const xml_attribute& attr);
        // Add child node with specified type. Returns added node, or empty node on errors.
        xml_node append_child(xml_node_type type = node_element);
        xml_node prepend_child(xml_node_type type = node_element);
        xml_node insert_child_after(xml_node_type type, const xml_node& node);
        xml_node insert_child_before(xml_node_type type, const xml_node& node);
        // Add child element with specified name. Returns added node, or empty node on errors.
        xml_node append_child(const char_t* name);
        xml_node prepend_child(const char_t* name);
        xml_node insert_child_after(const char_t* name, const xml_node& node);
        xml_node insert_child_before(const char_t* name, const xml_node& node);
        // Add a copy of the specified node as a child. Returns added node, or empty node on errors.
        xml_node append_copy(const xml_node& proto);
        xml_node prepend_copy(const xml_node& proto);
        xml_node insert_copy_after(const xml_node& proto, const xml_node& node);
        xml_node insert_copy_before(const xml_node& proto, const xml_node& node);
        // Move the specified node to become a child of this node. Returns moved node, or empty node on errors.
        xml_node append_move(const xml_node& moved);
        xml_node prepend_move(const xml_node& moved);
        xml_node insert_move_after(const xml_node& moved, const xml_node& node);
        xml_node insert_move_before(const xml_node& moved, const xml_node& node);
        // Remove specified attribute
        bool remove_attribute(const xml_attribute& a);
        bool remove_attribute(const char_t* name);
        // Remove all attributes
        bool remove_attributes();
        // Remove specified child
        bool remove_child(const xml_node& n);
        bool remove_child(const char_t* name);
        // Remove all children
        bool remove_children();
        // Parses buffer as an XML document fragment and appends all nodes as children of the current node.
        // Copies/converts the buffer, so it may be deleted or changed after the function returns.
        // Note: append_buffer allocates memory that has the lifetime of the owning document; removing the appended nodes does not immediately reclaim that memory.
        xml_parse_result append_buffer(const void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
        // Find attribute using predicate. Returns first attribute for which predicate returned true.
        template <typename Predicate> xml_attribute find_attribute(Predicate pred) const
        {
            if (!_root) return xml_attribute();
            for (xml_attribute attrib = first_attribute(); attrib; attrib = attrib.next_attribute())
                if (pred(attrib))
                    return attrib;
            return xml_attribute();
        }
        // Find child node using predicate. Returns first child for which predicate returned true.
        template <typename Predicate> xml_node find_child(Predicate pred) const
        {
            if (!_root) return xml_node();
            for (xml_node node = first_child(); node; node = node.next_sibling())
                if (pred(node))
                    return node;
            return xml_node();
        }
        // Find node from subtree using predicate. Returns first node from subtree (depth-first), for which predicate returned true.
        template <typename Predicate> xml_node find_node(Predicate pred) const
        {
            if (!_root) return xml_node();
            xml_node cur = first_child();
            while (cur._root && cur._root != _root)
            {
                if (pred(cur)) return cur;
                if (cur.first_child()) cur = cur.first_child();
                else if (cur.next_sibling()) cur = cur.next_sibling();
                else
                {
                    while (!cur.next_sibling() && cur._root != _root) cur = cur.parent();
                    if (cur._root != _root) cur = cur.next_sibling();
                }
            }
            return xml_node();
        }
        // Find child node by attribute name/value
        xml_node find_child_by_attribute(const char_t* name, const char_t* attr_name, const char_t* attr_value) const;
        xml_node find_child_by_attribute(const char_t* attr_name, const char_t* attr_value) const;
    #ifndef PUGIXML_NO_STL
        // Get the absolute node path from root as a text string.
        string_t path(char_t delimiter = '/') const;
    #endif
        // Search for a node by path consisting of node names and . or .. elements.
        xml_node first_element_by_path(const char_t* path, char_t delimiter = '/') const;
        // Recursively traverse subtree with xml_tree_walker
        bool traverse(xml_tree_walker& walker);
    #ifndef PUGIXML_NO_XPATH
        // Select single node by evaluating XPath query. Returns first node from the resulting node set.
        xpath_node select_node(const char_t* query, xpath_variable_set* variables = PUGIXML_NULL) const;
        xpath_node select_node(const xpath_query& query) const;
        // Select node set by evaluating XPath query
        xpath_node_set select_nodes(const char_t* query, xpath_variable_set* variables = PUGIXML_NULL) const;
        xpath_node_set select_nodes(const xpath_query& query) const;
        // (deprecated: use select_node instead) Select single node by evaluating XPath query.
        PUGIXML_DEPRECATED xpath_node select_single_node(const char_t* query, xpath_variable_set* variables = PUGIXML_NULL) const;
        PUGIXML_DEPRECATED xpath_node select_single_node(const xpath_query& query) const;
    #endif
        // Print subtree using a writer object
        void print(xml_writer& writer, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto, unsigned int depth = 0) const;
    #ifndef PUGIXML_NO_STL
        // Print subtree to stream
        void print(std::basic_ostream<char, std::char_traits<char> >& os, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto, unsigned int depth = 0) const;
        void print(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& os, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, unsigned int depth = 0) const;
    #endif
        // Child nodes iterators
        typedef xml_node_iterator iterator;
        iterator begin() const;
        iterator end() const;
        // Attribute iterators
        typedef xml_attribute_iterator attribute_iterator;
        attribute_iterator attributes_begin() const;
        attribute_iterator attributes_end() const;
        // Range-based for support
        xml_object_range<xml_node_iterator> children() const;
        xml_object_range<xml_attribute_iterator> attributes() const;
        // Range-based for support for all children with the specified name
        // Note: name pointer must have a longer lifetime than the returned object; be careful with passing temporaries!
        xml_object_range<xml_named_node_iterator> children(const char_t* name) const;
        // Get node offset in parsed file/string (in char_t units) for debugging purposes
        ptrdiff_t offset_debug() const;
        // Get hash value (unique for handles to the same object)
        size_t hash_value() const;
        // Get internal pointer
        xml_node_struct* internal_object() const;
    };
#ifdef __BORLANDC__
    // Borland C++ workaround
    bool PUGIXML_FUNCTION operator&&(const xml_node& lhs, bool rhs);
    bool PUGIXML_FUNCTION operator||(const xml_node& lhs, bool rhs);
#endif
    // A helper for working with text inside PCDATA nodes
    class PUGIXML_CLASS xml_text
    {
        friend class xml_node;
        xml_node_struct* _root;
        typedef void (*unspecified_bool_type)(xml_text***);
        explicit xml_text(xml_node_struct* root);
        xml_node_struct* _data_new();
        xml_node_struct* _data() const;
    public:
        // Default constructor. Constructs an empty object.
        xml_text();
        // Safe bool conversion operator
        operator unspecified_bool_type() const;
        // Borland C++ workaround
        bool operator!() const;
        // Check if text object is empty
        bool empty() const;
        // Get text, or "" if object is empty
        const char_t* get() const;
        // Get text, or the default value if object is empty
        const char_t* as_string(const char_t* def = PUGIXML_TEXT("")) const;
        // Get text as a number, or the default value if conversion did not succeed or object is empty
        int as_int(int def = 0) const;
        unsigned int as_uint(unsigned int def = 0) const;
        double as_double(double def = 0) const;
        float as_float(float def = 0) const;
    #ifdef PUGIXML_HAS_LONG_LONG
        long long as_llong(long long def = 0) const;
        unsigned long long as_ullong(unsigned long long def = 0) const;
    #endif
        // Get text as bool (returns true if first character is in '1tTyY' set), or the default value if object is empty
        bool as_bool(bool def = false) const;
        // Set text (returns false if object is empty or there is not enough memory)
        bool set(const char_t* rhs);
        bool set(const char_t* rhs, size_t size);
        // Set text with type conversion (numbers are converted to strings, boolean is converted to "true"/"false")
        bool set(int rhs);
        bool set(unsigned int rhs);
        bool set(long rhs);
        bool set(unsigned long rhs);
        bool set(double rhs);
        bool set(double rhs, int precision);
        bool set(float rhs);
        bool set(float rhs, int precision);
        bool set(bool rhs);
    #ifdef PUGIXML_HAS_LONG_LONG
        bool set(long long rhs);
        bool set(unsigned long long rhs);
    #endif
        // Set text (equivalent to set without error checking)
        xml_text& operator=(const char_t* rhs);
        xml_text& operator=(int rhs);
        xml_text& operator=(unsigned int rhs);
        xml_text& operator=(long rhs);
        xml_text& operator=(unsigned long rhs);
        xml_text& operator=(double rhs);
        xml_text& operator=(float rhs);
        xml_text& operator=(bool rhs);
    #ifdef PUGIXML_HAS_LONG_LONG
        xml_text& operator=(long long rhs);
        xml_text& operator=(unsigned long long rhs);
    #endif
        // Get the data node (node_pcdata or node_cdata) for this object
        xml_node data() const;
    };
#ifdef __BORLANDC__
    // Borland C++ workaround
    bool PUGIXML_FUNCTION operator&&(const xml_text& lhs, bool rhs);
    bool PUGIXML_FUNCTION operator||(const xml_text& lhs, bool rhs);
#endif
    // Child node iterator (a bidirectional iterator over a collection of xml_node)
    class PUGIXML_CLASS xml_node_iterator
    {
        friend class xml_node;
    private:
        mutable xml_node _wrap;
        xml_node _parent;
        xml_node_iterator(xml_node_struct* ref, xml_node_struct* parent);
    public:
        // Iterator traits
        typedef ptrdiff_t difference_type;
        typedef xml_node value_type;
        typedef xml_node* pointer;
        typedef xml_node& reference;
    #ifndef PUGIXML_NO_STL
        typedef std::bidirectional_iterator_tag iterator_category;
    #endif
        // Default constructor
        xml_node_iterator();
        // Construct an iterator which points to the specified node
        xml_node_iterator(const xml_node& node);
        // Iterator operators
        bool operator==(const xml_node_iterator& rhs) const;
        bool operator!=(const xml_node_iterator& rhs) const;
        xml_node& operator*() const;
        xml_node* operator->() const;
        xml_node_iterator& operator++();
        xml_node_iterator operator++(int);
        xml_node_iterator& operator--();
        xml_node_iterator operator--(int);
    };
    // Attribute iterator (a bidirectional iterator over a collection of xml_attribute)
    class PUGIXML_CLASS xml_attribute_iterator
    {
        friend class xml_node;
    private:
        mutable xml_attribute _wrap;
        xml_node _parent;
        xml_attribute_iterator(xml_attribute_struct* ref, xml_node_struct* parent);
    public:
        // Iterator traits
        typedef ptrdiff_t difference_type;
        typedef xml_attribute value_type;
        typedef xml_attribute* pointer;
        typedef xml_attribute& reference;
    #ifndef PUGIXML_NO_STL
        typedef std::bidirectional_iterator_tag iterator_category;
    #endif
        // Default constructor
        xml_attribute_iterator();
        // Construct an iterator which points to the specified attribute
        xml_attribute_iterator(const xml_attribute& attr, const xml_node& parent);
        // Iterator operators
        bool operator==(const xml_attribute_iterator& rhs) const;
        bool operator!=(const xml_attribute_iterator& rhs) const;
        xml_attribute& operator*() const;
        xml_attribute* operator->() const;
        xml_attribute_iterator& operator++();
        xml_attribute_iterator operator++(int);
        xml_attribute_iterator& operator--();
        xml_attribute_iterator operator--(int);
    };
    // Named node range helper
    class PUGIXML_CLASS xml_named_node_iterator
    {
        friend class xml_node;
    public:
        // Iterator traits
        typedef ptrdiff_t difference_type;
        typedef xml_node value_type;
        typedef xml_node* pointer;
        typedef xml_node& reference;
    #ifndef PUGIXML_NO_STL
        typedef std::bidirectional_iterator_tag iterator_category;
    #endif
        // Default constructor
        xml_named_node_iterator();
        // Construct an iterator which points to the specified node
        // Note: name pointer is stored in the iterator and must have a longer lifetime than iterator itself
        xml_named_node_iterator(const xml_node& node, const char_t* name);
        // Iterator operators
        bool operator==(const xml_named_node_iterator& rhs) const;
        bool operator!=(const xml_named_node_iterator& rhs) const;
        xml_node& operator*() const;
        xml_node* operator->() const;
        xml_named_node_iterator& operator++();
        xml_named_node_iterator operator++(int);
        xml_named_node_iterator& operator--();
        xml_named_node_iterator operator--(int);
    private:
        mutable xml_node _wrap;
        xml_node _parent;
        const char_t* _name;
        xml_named_node_iterator(xml_node_struct* ref, xml_node_struct* parent, const char_t* name);
    };
    // Abstract tree walker class (see xml_node::traverse)
    class PUGIXML_CLASS xml_tree_walker
    {
        friend class xml_node;
    private:
        int _depth;
    protected:
        // Get current traversal depth
        int depth() const;
    public:
        xml_tree_walker();
        virtual ~xml_tree_walker();
        // Callback that is called when traversal begins
        virtual bool begin(xml_node& node);
        // Callback that is called for each node traversed
        virtual bool for_each(xml_node& node) = 0;
        // Callback that is called when traversal ends
        virtual bool end(xml_node& node);
    };
    // Parsing status, returned as part of xml_parse_result object
    enum xml_parse_status
    {
        status_ok = 0,                // No error
        status_file_not_found,        // File was not found during load_file()
        status_io_error,            // Error reading from file/stream
        status_out_of_memory,        // Could not allocate memory
        status_internal_error,        // Internal error occurred
        status_unrecognized_tag,    // Parser could not determine tag type
        status_bad_pi,                // Parsing error occurred while parsing document declaration/processing instruction
        status_bad_comment,            // Parsing error occurred while parsing comment
        status_bad_cdata,            // Parsing error occurred while parsing CDATA section
        status_bad_doctype,            // Parsing error occurred while parsing document type declaration
        status_bad_pcdata,            // Parsing error occurred while parsing PCDATA section
        status_bad_start_element,    // Parsing error occurred while parsing start element tag
        status_bad_attribute,        // Parsing error occurred while parsing element attribute
        status_bad_end_element,        // Parsing error occurred while parsing end element tag
        status_end_element_mismatch,// There was a mismatch of start-end tags (closing tag had incorrect name, some tag was not closed or there was an excessive closing tag)
        status_append_invalid_root,    // Unable to append nodes since root type is not node_element or node_document (exclusive to xml_node::append_buffer)
        status_no_document_element    // Parsing resulted in a document without element nodes
    };
    // Parsing result
    struct PUGIXML_CLASS xml_parse_result
    {
        // Parsing status (see xml_parse_status)
        xml_parse_status status;
        // Last parsed offset (in char_t units from start of input data)
        ptrdiff_t offset;
        // Source document encoding
        xml_encoding encoding;
        // Default constructor, initializes object to failed state
        xml_parse_result();
        // Cast to bool operator
        operator bool() const;
        // Get error description
        const char* description() const;
    };
    // Document class (DOM tree root)
    class PUGIXML_CLASS xml_document: public xml_node
    {
    private:
        char_t* _buffer;
        char _memory[192];
        // Non-copyable semantics
        xml_document(const xml_document&);
        xml_document& operator=(const xml_document&);
        void _create();
        void _destroy();
        void _move(xml_document& rhs) PUGIXML_NOEXCEPT_IF_NOT_COMPACT;
    public:
        // Default constructor, makes empty document
        xml_document();
        // Destructor, invalidates all node/attribute handles to this document
        ~xml_document();
    #ifdef PUGIXML_HAS_MOVE
        // Move semantics support
        xml_document(xml_document&& rhs) PUGIXML_NOEXCEPT_IF_NOT_COMPACT;
        xml_document& operator=(xml_document&& rhs) PUGIXML_NOEXCEPT_IF_NOT_COMPACT;
    #endif
        // Removes all nodes, leaving the empty document
        void reset();
        // Removes all nodes, then copies the entire contents of the specified document
        void reset(const xml_document& proto);
    #ifndef PUGIXML_NO_STL
        // Load document from stream.
        xml_parse_result load(std::basic_istream<char, std::char_traits<char> >& stream, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
        xml_parse_result load(std::basic_istream<wchar_t, std::char_traits<wchar_t> >& stream, unsigned int options = parse_default);
    #endif
        // (deprecated: use load_string instead) Load document from zero-terminated string. No encoding conversions are applied.
        PUGIXML_DEPRECATED xml_parse_result load(const char_t* contents, unsigned int options = parse_default);
        // Load document from zero-terminated string. No encoding conversions are applied.
        xml_parse_result load_string(const char_t* contents, unsigned int options = parse_default);
        // Load document from file
        xml_parse_result load_file(const char* path, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
        xml_parse_result load_file(const wchar_t* path, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
        // Load document from buffer. Copies/converts the buffer, so it may be deleted or changed after the function returns.
        xml_parse_result load_buffer(const void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
        // Load document from buffer, using the buffer for in-place parsing (the buffer is modified and used for storage of document data).
        // You should ensure that buffer data will persist throughout the document's lifetime, and free the buffer memory manually once document is destroyed.
        xml_parse_result load_buffer_inplace(void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
        // Load document from buffer, using the buffer for in-place parsing (the buffer is modified and used for storage of document data).
        // You should allocate the buffer with pugixml allocation function; document will free the buffer when it is no longer needed (you can't use it anymore).
        xml_parse_result load_buffer_inplace_own(void* contents, size_t size, unsigned int options = parse_default, xml_encoding encoding = encoding_auto);
        // Save XML document to writer (semantics is slightly different from xml_node::print, see documentation for details).
        void save(xml_writer& writer, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;
    #ifndef PUGIXML_NO_STL
        // Save XML document to stream (semantics is slightly different from xml_node::print, see documentation for details).
        void save(std::basic_ostream<char, std::char_traits<char> >& stream, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;
        void save(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default) const;
    #endif
        // Save XML to file
        bool save_file(const char* path, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;
        bool save_file(const wchar_t* path, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto) const;
        // Get document element
        xml_node document_element() const;
    };
#ifndef PUGIXML_NO_XPATH
    // XPath query return type
    enum xpath_value_type
    {
        xpath_type_none,      // Unknown type (query failed to compile)
        xpath_type_node_set,  // Node set (xpath_node_set)
        xpath_type_number,      // Number
        xpath_type_string,      // String
        xpath_type_boolean      // Boolean
    };
    // XPath parsing result
    struct PUGIXML_CLASS xpath_parse_result
    {
        // Error message (0 if no error)
        const char* error;
        // Last parsed offset (in char_t units from string start)
        ptrdiff_t offset;
        // Default constructor, initializes object to failed state
        xpath_parse_result();
        // Cast to bool operator
        operator bool() const;
        // Get error description
        const char* description() const;
    };
    // A single XPath variable
    class PUGIXML_CLASS xpath_variable
    {
        friend class xpath_variable_set;
    protected:
        xpath_value_type _type;
        xpath_variable* _next;
        xpath_variable(xpath_value_type type);
        // Non-copyable semantics
        xpath_variable(const xpath_variable&);
        xpath_variable& operator=(const xpath_variable&);
    public:
        // Get variable name
        const char_t* name() const;
        // Get variable type
        xpath_value_type type() const;
        // Get variable value; no type conversion is performed, default value (false, NaN, empty string, empty node set) is returned on type mismatch error
        bool get_boolean() const;
        double get_number() const;
        const char_t* get_string() const;
        const xpath_node_set& get_node_set() const;
        // Set variable value; no type conversion is performed, false is returned on type mismatch error
        bool set(bool value);
        bool set(double value);
        bool set(const char_t* value);
        bool set(const xpath_node_set& value);
    };
    // A set of XPath variables
    class PUGIXML_CLASS xpath_variable_set
    {
    private:
        xpath_variable* _data[64];
        void _assign(const xpath_variable_set& rhs);
        void _swap(xpath_variable_set& rhs);
        xpath_variable* _find(const char_t* name) const;
        static bool _clone(xpath_variable* var, xpath_variable** out_result);
        static void _destroy(xpath_variable* var);
    public:
        // Default constructor/destructor
        xpath_variable_set();
        ~xpath_variable_set();
        // Copy constructor/assignment operator
        xpath_variable_set(const xpath_variable_set& rhs);
        xpath_variable_set& operator=(const xpath_variable_set& rhs);
    #ifdef PUGIXML_HAS_MOVE
        // Move semantics support
        xpath_variable_set(xpath_variable_set&& rhs) PUGIXML_NOEXCEPT;
        xpath_variable_set& operator=(xpath_variable_set&& rhs) PUGIXML_NOEXCEPT;
    #endif
        // Add a new variable or get the existing one, if the types match
        xpath_variable* add(const char_t* name, xpath_value_type type);
        // Set value of an existing variable; no type conversion is performed, false is returned if there is no such variable or if types mismatch
        bool set(const char_t* name, bool value);
        bool set(const char_t* name, double value);
        bool set(const char_t* name, const char_t* value);
        bool set(const char_t* name, const xpath_node_set& value);
        // Get existing variable by name
        xpath_variable* get(const char_t* name);
        const xpath_variable* get(const char_t* name) const;
    };
    // A compiled XPath query object
    class PUGIXML_CLASS xpath_query
    {
    private:
        void* _impl;
        xpath_parse_result _result;
        typedef void (*unspecified_bool_type)(xpath_query***);
        // Non-copyable semantics
        xpath_query(const xpath_query&);
        xpath_query& operator=(const xpath_query&);
    public:
        // Construct a compiled object from XPath expression.
        // If PUGIXML_NO_EXCEPTIONS is not defined, throws xpath_exception on compilation errors.
        explicit xpath_query(const char_t* query, xpath_variable_set* variables = PUGIXML_NULL);
        // Constructor
        xpath_query();
        // Destructor
        ~xpath_query();
    #ifdef PUGIXML_HAS_MOVE
        // Move semantics support
        xpath_query(xpath_query&& rhs) PUGIXML_NOEXCEPT;
        xpath_query& operator=(xpath_query&& rhs) PUGIXML_NOEXCEPT;
    #endif
        // Get query expression return type
        xpath_value_type return_type() const;
        // Evaluate expression as boolean value in the specified context; performs type conversion if necessary.
        // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.
        bool evaluate_boolean(const xpath_node& n) const;
        // Evaluate expression as double value in the specified context; performs type conversion if necessary.
        // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.
        double evaluate_number(const xpath_node& n) const;
    #ifndef PUGIXML_NO_STL
        // Evaluate expression as string value in the specified context; performs type conversion if necessary.
        // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.
        string_t evaluate_string(const xpath_node& n) const;
    #endif
        // Evaluate expression as string value in the specified context; performs type conversion if necessary.
        // At most capacity characters are written to the destination buffer, full result size is returned (includes terminating zero).
        // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors.
        // If PUGIXML_NO_EXCEPTIONS is defined, returns empty  set instead.
        size_t evaluate_string(char_t* buffer, size_t capacity, const xpath_node& n) const;
        // Evaluate expression as node set in the specified context.
        // If PUGIXML_NO_EXCEPTIONS is not defined, throws xpath_exception on type mismatch and std::bad_alloc on out of memory errors.
        // If PUGIXML_NO_EXCEPTIONS is defined, returns empty node set instead.
        xpath_node_set evaluate_node_set(const xpath_node& n) const;
        // Evaluate expression as node set in the specified context.
        // Return first node in document order, or empty node if node set is empty.
        // If PUGIXML_NO_EXCEPTIONS is not defined, throws xpath_exception on type mismatch and std::bad_alloc on out of memory errors.
        // If PUGIXML_NO_EXCEPTIONS is defined, returns empty node instead.
        xpath_node evaluate_node(const xpath_node& n) const;
        // Get parsing result (used to get compilation errors in PUGIXML_NO_EXCEPTIONS mode)
        const xpath_parse_result& result() const;
        // Safe bool conversion operator
        operator unspecified_bool_type() const;
        // Borland C++ workaround
        bool operator!() const;
    };
    #ifndef PUGIXML_NO_EXCEPTIONS
        #if defined(_MSC_VER)
          // C4275 can be ignored in Visual C++ if you are deriving
          // from a type in the Standard C++ Library
          #pragma warning(push)
          #pragma warning(disable: 4275)
        #endif
    // XPath exception class
    class PUGIXML_CLASS xpath_exception: public std::exception
    {
    private:
        xpath_parse_result _result;
    public:
        // Construct exception from parse result
        explicit xpath_exception(const xpath_parse_result& result);
        // Get error message
        virtual const char* what() const throw() PUGIXML_OVERRIDE;
        // Get parse result
        const xpath_parse_result& result() const;
    };
        #if defined(_MSC_VER)
          #pragma warning(pop)
        #endif
    #endif
    // XPath node class (either xml_node or xml_attribute)
    class PUGIXML_CLASS xpath_node
    {
    private:
        xml_node _node;
        xml_attribute _attribute;
        typedef void (*unspecified_bool_type)(xpath_node***);
    public:
        // Default constructor; constructs empty XPath node
        xpath_node();
        // Construct XPath node from XML node/attribute
        xpath_node(const xml_node& node);
        xpath_node(const xml_attribute& attribute, const xml_node& parent);
        // Get node/attribute, if any
        xml_node node() const;
        xml_attribute attribute() const;
        // Get parent of contained node/attribute
        xml_node parent() const;
        // Safe bool conversion operator
        operator unspecified_bool_type() const;
        // Borland C++ workaround
        bool operator!() const;
        // Comparison operators
        bool operator==(const xpath_node& n) const;
        bool operator!=(const xpath_node& n) const;
    };
#ifdef __BORLANDC__
    // Borland C++ workaround
    bool PUGIXML_FUNCTION operator&&(const xpath_node& lhs, bool rhs);
    bool PUGIXML_FUNCTION operator||(const xpath_node& lhs, bool rhs);
#endif
    // A fixed-size collection of XPath nodes
    class PUGIXML_CLASS xpath_node_set
    {
    public:
        // Collection type
        enum type_t
        {
            type_unsorted,            // Not ordered
            type_sorted,            // Sorted by document order (ascending)
            type_sorted_reverse        // Sorted by document order (descending)
        };
        // Constant iterator type
        typedef const xpath_node* const_iterator;
        // We define non-constant iterator to be the same as constant iterator so that various generic algorithms (i.e. boost foreach) work
        typedef const xpath_node* iterator;
        // Default constructor. Constructs empty set.
        xpath_node_set();
        // Constructs a set from iterator range; data is not checked for duplicates and is not sorted according to provided type, so be careful
        xpath_node_set(const_iterator begin, const_iterator end, type_t type = type_unsorted);
        // Destructor
        ~xpath_node_set();
        // Copy constructor/assignment operator
        xpath_node_set(const xpath_node_set& ns);
        xpath_node_set& operator=(const xpath_node_set& ns);
    #ifdef PUGIXML_HAS_MOVE
        // Move semantics support
        xpath_node_set(xpath_node_set&& rhs) PUGIXML_NOEXCEPT;
        xpath_node_set& operator=(xpath_node_set&& rhs) PUGIXML_NOEXCEPT;
    #endif
        // Get collection type
        type_t type() const;
        // Get collection size
        size_t size() const;
        // Indexing operator
        const xpath_node& operator[](size_t index) const;
        // Collection iterators
        const_iterator begin() const;
        const_iterator end() const;
        // Sort the collection in ascending/descending order by document order
        void sort(bool reverse = false);
        // Get first node in the collection by document order
        xpath_node first() const;
        // Check if collection is empty
        bool empty() const;
    private:
        type_t _type;
        xpath_node _storage[1];
        xpath_node* _begin;
        xpath_node* _end;
        void _assign(const_iterator begin, const_iterator end, type_t type);
        void _move(xpath_node_set& rhs) PUGIXML_NOEXCEPT;
    };
#endif
#ifndef PUGIXML_NO_STL
    // Convert wide string to UTF8
    std::basic_string<char, std::char_traits<char>, std::allocator<char> > PUGIXML_FUNCTION as_utf8(const wchar_t* str);
    std::basic_string<char, std::char_traits<char>, std::allocator<char> > PUGIXML_FUNCTION as_utf8(const std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >& str);
    // Convert UTF8 to wide string
    std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > PUGIXML_FUNCTION as_wide(const char* str);
    std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > PUGIXML_FUNCTION as_wide(const std::basic_string<char, std::char_traits<char>, std::allocator<char> >& str);
#endif
    // Memory allocation function interface; returns pointer to allocated memory or NULL on failure
    typedef void* (*allocation_function)(size_t size);
    // Memory deallocation function interface
    typedef void (*deallocation_function)(void* ptr);
    // Override default memory management functions. All subsequent allocations/deallocations will be performed via supplied functions.
    void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate);
    // Get current memory management functions
    allocation_function PUGIXML_FUNCTION get_memory_allocation_function();
    deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function();
}
#if !defined(PUGIXML_NO_STL) && (defined(_MSC_VER) || defined(__ICC))
namespace std
{
    // Workarounds for (non-standard) iterator category detection for older versions (MSVC7/IC8 and earlier)
    std::bidirectional_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_node_iterator&);
    std::bidirectional_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_attribute_iterator&);
    std::bidirectional_iterator_tag PUGIXML_FUNCTION _Iter_cat(const pugi::xml_named_node_iterator&);
}
#endif
#if !defined(PUGIXML_NO_STL) && defined(__SUNPRO_CC)
namespace std
{
    // Workarounds for (non-standard) iterator category detection
    std::bidirectional_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_node_iterator&);
    std::bidirectional_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_attribute_iterator&);
    std::bidirectional_iterator_tag PUGIXML_FUNCTION __iterator_category(const pugi::xml_named_node_iterator&);
}
#endif
#endif
// Make sure implementation is included in header-only mode
// Use macro expansion in #include to work around QMake (QTBUG-11923)
#if defined(PUGIXML_HEADER_ONLY) && !defined(PUGIXML_SOURCE)
#    define PUGIXML_SOURCE "pugixml.cpp"
#    include PUGIXML_SOURCE
#endif
/**
 * Copyright (c) 2006-2023 Arseny Kapoulkine
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */
SourceCode/Bond/BondEq/Resource.h
Binary files differ
SourceCode/Bond/BondEq/ToolUnits.cpp
@@ -80,6 +80,10 @@
void CToolUnits::createDir(const char* pszDir)
{
    if (isDirectory(std::string(pszDir))) {
        return;
    }
    CString strDir = pszDir;
    int lastIndex = 0;
    int index = strDir.Find(_T("\\"), lastIndex);
SourceCode/Bond/BondEq/View/AxisSettingsDlg.cpp
@@ -39,6 +39,11 @@
    m_pPLC = pPLC;
}
void CAxisSettingsDlg::SetRecipeName(const CString& strRecipeName)
{
    m_strRecipeName = strRecipeName;
}
void CAxisSettingsDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialogEx::DoDataExchange(pDX);
@@ -57,6 +62,11 @@
    DDX_Control(pDX, IDC_EDIT_AXIS_MODITFY_ACCE_TIME, m_editAccelerationTime);
    DDX_Control(pDX, IDC_EDIT_AXIS_MODITFY_DECE_TIME, m_editDecelerationTime);
    DDX_Control(pDX, IDC_EDIT_AXIS_MODITFY_MICROMENTUM, m_editJogDistance);
    DDX_Control(pDX, IDC_BUTTON_AXIS_ANCHOR_POINT_GROUP1, m_pageButtons[0]);
    DDX_Control(pDX, IDC_BUTTON_AXIS_ANCHOR_POINT_GROUP2, m_pageButtons[1]);
    DDX_Control(pDX, IDC_BUTTON_AXIS_ANCHOR_POINT_GROUP3, m_pageButtons[2]);
    DDX_Control(pDX, IDC_BUTTON_AXIS_ANCHOR_POINT_GROUP4, m_pageButtons[3]);
    DDX_Control(pDX, IDC_BUTTON_AXIS_ANCHOR_POINT_GROUP5, m_pageButtons[4]);
}
UINT CAxisSettingsDlg::FindIDByName(const CString& strControlID)
@@ -190,6 +200,20 @@
    label.UpdateWindow();            // ç«‹å³åˆ·æ–°
}
void CAxisSettingsDlg::updatePageButtonStates()
{
    for (int i = 0; i < 5; ++i) {
        if (i + 1 == m_currentPage) {
            m_pageButtons[i].SetFaceColor(RGB(0, 122, 204));    // é€‰ä¸­èƒŒæ™¯è‰²ï¼ˆè“è‰²ï¼‰
        }
        else {
            m_pageButtons[i].SetFaceColor(RGB(240, 240, 240));    // é»˜è®¤èƒŒæ™¯è‰²
        }
        m_pageButtons[i].Invalidate();
    }
}
int CAxisSettingsDlg::getCurrentSelectedAxisID()
{
    int currentIndex = m_comboAxisNO.GetCurSel();
@@ -205,8 +229,15 @@
void CAxisSettingsDlg::initializeAxisIDCombo()
{
    // èŽ·å–æ‰€æœ‰è½´çš„è½´NO
    auto axisNumbers = AxisManager::getInstance().getUsedAxisIds();
    // æ£€æŸ¥é…æ–¹æ˜¯å¦åŠ è½½æˆåŠŸ
    RecipeManager& recipeManager = RecipeManager::getInstance();
    if (m_strRecipeName.IsEmpty() || !recipeManager.loadRecipe(std::string(CT2A(m_strRecipeName)))) {
        AfxMessageBox(_T("加载配方失败!"));
        return;
    }
    // èŽ·å–æ‰€æœ‰è½´çš„ç¼–å·
    auto axisNumbers = recipeManager.getAllAxisID();
    // æ¸…空下拉框
    m_comboAxisNO.ResetContent();
@@ -227,85 +258,70 @@
void CAxisSettingsDlg::refreshAxisDetails()
{
    // èŽ·å–å½“å‰é€‰ä¸­çš„è½´ID
    RecipeManager& recipeManager = RecipeManager::getInstance();
    int axisId = getCurrentSelectedAxisID();
    // èŽ·å–è½´ä¿¡æ¯
    auto axisDetails = AxisManager::getInstance().getAxis(axisId);
    if (axisDetails.empty()) {
    auto axisDetails = recipeManager.getAxis(axisId);
    if (axisDetails.id == -1 || axisDetails.startAddress.empty()) {
        AfxMessageBox(_T("未找到轴信息!"));
        return;
    }
    // æ ¼å¼åŒ–浮点数为 3 ä½å°æ•°çš„ CString
    auto formatDouble = [](const std::string& value) -> CString {
        char buffer[32];
        snprintf(buffer, sizeof(buffer), "%.3f", std::stod(value));
        return CString(buffer);
    };
    auto formatDouble = [](double value) -> CString {
        CString str;
        str.Format(_T("%.3f"), value);
        return str;
        };
    // åˆ·æ–°ç•Œé¢æŽ§ä»¶æ•°æ®
    m_staticAxisNO.SetWindowText(CString(axisDetails[1].c_str()));            // è½´NO
    m_staticAxisDescription.SetWindowText(CString(axisDetails[2].c_str())); // è½´æè¿°
    m_staticStartAddress.SetWindowText(CString(axisDetails[3].c_str()));    // èµ·å§‹åœ°å€
    m_editJogDistance.SetWindowText(formatDouble(axisDetails[4]));            // å¾®åŠ¨é‡
    m_editManualSpeed.SetWindowText(formatDouble(axisDetails[5]));            // æ‰‹åŠ¨é€Ÿåº¦
    m_editAutoSpeed.SetWindowText(formatDouble(axisDetails[8]));            // è‡ªåŠ¨é€Ÿåº¦
    m_editAccelerationTime.SetWindowText(formatDouble(axisDetails[11]));    // åŠ é€Ÿæ—¶é—´
    m_editDecelerationTime.SetWindowText(formatDouble(axisDetails[12]));    // å‡é€Ÿæ—¶é—´
    // æ›´æ–°æŽ§ä»¶æ˜¾ç¤º
    m_staticAxisNO.SetWindowText(CString(axisDetails.number.c_str()));                    // è½´ç¼–号
    m_staticAxisDescription.SetWindowText(CString(axisDetails.description.c_str()));    // è½´æè¿°
    m_staticStartAddress.SetWindowText(CString(axisDetails.startAddress.c_str()));        // èµ·å§‹åœ°å€
    m_editJogDistance.SetWindowText(formatDouble(axisDetails.jogDistance));                // å¾®åŠ¨é‡
    m_editManualSpeed.SetWindowText(formatDouble(axisDetails.manualSpeed));                // æ‰‹åŠ¨é€Ÿåº¦
    m_editAutoSpeed.SetWindowText(formatDouble(axisDetails.autoSpeed));                    // è‡ªåŠ¨é€Ÿåº¦
    m_editAccelerationTime.SetWindowText(formatDouble(axisDetails.accelerationTime));    // åŠ é€Ÿæ—¶é—´
    m_editDecelerationTime.SetWindowText(formatDouble(axisDetails.decelerationTime));    // å‡é€Ÿæ—¶é—´
}
void CAxisSettingsDlg::refreshPositionDetails(int pageNumber)
{
    RecipeManager& recipeManager = RecipeManager::getInstance();
    // æ¯é¡µæ˜¾ç¤ºçš„定位点数量
    const int pageSize = 5;
    // èŽ·å–å½“å‰é€‰ä¸­çš„è½´ID
    int axisId = getCurrentSelectedAxisID();
    if (axisId == -1) {
        return;
    }
    // èŽ·å–å®šä½ç‚¹æ•°æ®
    auto positions = AxisManager::getInstance().getPositions(axisId, pageNumber, pageSize);
    auto positions = recipeManager.getPositions(axisId, pageNumber, pageSize);
    // åˆ·æ–° UI
    for (int i = 0; i < pageSize; ++i) {
        // åŠ¨æ€æž„é€ æŽ§ä»¶åç§°
        CString descriptionName;
        CString positionName;
        CString descriptionCtrlName, positionCtrlName;
        descriptionCtrlName.Format(_T("IDC_EDIT_AXIS_ANCHOR_POINT_DESCRIP%d"), i + 1);
        positionCtrlName.Format(_T("IDC_EDIT_AXIS_ANCHOR_POINT%d"), i + 1);
        // IDC_EDIT_AXIS_ANCHOR_POINT_DESCRIP1;
        // IDC_EDIT_AXIS_ANCHOR_POINT1;
        descriptionName.Format(_T("IDC_EDIT_AXIS_ANCHOR_POINT_DESCRIP%d"), i + 1);
        positionName.Format(_T("IDC_EDIT_AXIS_ANCHOR_POINT%d"), i + 1);
        UINT descriptionCtrlId = FindIDByName(descriptionCtrlName);
        UINT positionCtrlId = FindIDByName(positionCtrlName);
        // èŽ·å–æŽ§ä»¶æŒ‡é’ˆ
        UINT unDescription = FindIDByName(descriptionName);
        UINT unPosition = FindIDByName(positionName);
        CWnd* pDescriptionCtrl = GetDlgItem(descriptionCtrlId);
        CWnd* pPositionCtrl = GetDlgItem(positionCtrlId);
        TRACE("CAxisSettingsDlg::refreshPositionDetails %unDescription[%d], unPosition[%d]\n", unDescription, unPosition);
        if (unDescription == 0 || unPosition == 0) {
            continue;
        }
        if (i < positions.size()) {
            CString description = CString(positions[i].first.c_str());
            CString value;
            value.Format(_T("%.3f"), positions[i].second);
        CWnd* pDescription = GetDlgItem(unDescription);
        CWnd* pPosition = GetDlgItem(unPosition);
        if (i < positions.size()
            && !positions[i][2].empty()
            && !positions[i][3].empty()) {
            // æœ‰æ•°æ®ï¼Œåˆ·æ–°æè¿°å’Œä½ç½®
            CString description = CString(positions[i][2].c_str()); // å®šä½ç‚¹æè¿°
            CString positionValue;
            // ä¿ç•™3位小数
            char buffer[32];
            snprintf(buffer, sizeof(buffer), "%.3f", std::stod(positions[i][3]));
            positionValue = CString(buffer);
            if (pDescription) pDescription->SetWindowText(description);
            if (pPosition) pPosition->SetWindowText(positionValue);
            if (pDescriptionCtrl) pDescriptionCtrl->SetWindowText(description);
            if (pPositionCtrl) pPositionCtrl->SetWindowText(value);
        }
        else {
            // æ— æ•°æ®ï¼Œæ¸…空控件内容
            if (pDescription) pDescription->SetWindowText(_T(""));
            if (pPosition) pPosition->SetWindowText(_T(""));
            if (pDescriptionCtrl) pDescriptionCtrl->SetWindowText(_T(""));
            if (pPositionCtrl) pPositionCtrl->SetWindowText(_T(""));
        }
    }
}
@@ -328,7 +344,64 @@
    m_comboAxisNO.SetCurSel(newIndex);
    refreshAxisDetails();
    refreshPositionDetails(1);
    refreshPositionDetails(m_currentPage);
    updatePageButtonStates();
}
void CAxisSettingsDlg::updateDataFromUI()
{
    const int pageSize = 5; // æ¯é¡µæ˜¾ç¤º 5 ä¸ªå®šä½ç‚¹
    // èŽ·å–å½“å‰é€‰ä¸­çš„è½´ ID
    int axisId = getCurrentSelectedAxisID();
    if (axisId == -1) return;
    RecipeManager& recipeManager = RecipeManager::getInstance();
    auto axisData = recipeManager.getAxis(axisId);
    // èŽ·å–ç•Œé¢ä¸Šçš„ä¿®æ”¹å‚æ•°
    CString text;
    m_editManualSpeed.GetWindowText(text);
    axisData.manualSpeed = _ttof(text);
    m_editAutoSpeed.GetWindowText(text);
    axisData.autoSpeed = _ttof(text);
    m_editAccelerationTime.GetWindowText(text);
    axisData.accelerationTime = _ttof(text);
    m_editDecelerationTime.GetWindowText(text);
    axisData.decelerationTime = _ttof(text);
    m_editJogDistance.GetWindowText(text);
    axisData.jogDistance = _ttof(text);
    // æ›´æ–°å®šä½ç‚¹æ•°æ®
    for (int i = 0; i < pageSize; ++i) {
        int index = (m_currentPage - 1) * pageSize + i;
        if (index < axisData.positions.size()) {
            CString descriptionName, positionName;
            descriptionName.Format(_T("IDC_EDIT_AXIS_ANCHOR_POINT_DESCRIP%d"), i + 1);
            positionName.Format(_T("IDC_EDIT_AXIS_ANCHOR_POINT%d"), i + 1);
            CEdit* pDescriptionEdit = (CEdit*)GetDlgItem(FindIDByName(descriptionName));
            CEdit* pPositionEdit = (CEdit*)GetDlgItem(FindIDByName(positionName));
            if (pDescriptionEdit && pPositionEdit) {
                CString description, positionValue;
                pDescriptionEdit->GetWindowText(description);
                pPositionEdit->GetWindowText(positionValue);
                // æ›´æ–° RecipeManager ä¸­çš„æ•°æ®
                axisData.positions[index].first = CT2A(description);
                axisData.positions[index].second = _ttof(positionValue);
            }
        }
    }
    // ä¿å­˜å›ž RecipeManager
    recipeManager.updateAxis(axisData);
}
BEGIN_MESSAGE_MAP(CAxisSettingsDlg, CDialogEx)
@@ -349,6 +422,7 @@
    ON_BN_CLICKED(IDC_BUTTON_AXIS_TEST_JOG_SUB, &CAxisSettingsDlg::OnBnClickedButtonAxisTestJogSub)
    ON_BN_CLICKED(IDC_BUTTON_AXIS_TEST_STOP, &CAxisSettingsDlg::OnBnClickedButtonAxisTestStop)
    ON_CBN_SELCHANGE(IDC_COMBO_AXIS_NAME, &CAxisSettingsDlg::OnSelchangeComboAxisName)
    ON_BN_CLICKED(IDC_BUTTON_AXIS_SAVE, &CAxisSettingsDlg::OnBnClickedButtonAxisSave)
    ON_WM_SIZE()
    ON_WM_CTLCOLOR()
    ON_WM_SIZING()
@@ -364,7 +438,9 @@
    CDialogEx::OnInitDialog();
    // TODO:  åœ¨æ­¤æ·»åŠ é¢å¤–çš„åˆå§‹åŒ–
    SetWindowText(_T("Axis设定"));
    CString strTitle;
    strTitle.Format(_T("Axis设定(配方: %s)"), m_strRecipeName);
    SetWindowText(strTitle);
    // è®¾ç½®æµ‹è¯•状态
    CBLLabel* pLabels[] = { &m_staticFLS, &m_staticDOG, &m_staticRLS, &m_staticReady, &m_staticBusy, &m_staticErr };
@@ -376,10 +452,14 @@
        pLabel->SetDynamicFont(TRUE);
    }
    // åˆå§‹åŒ–当前页面为第一页
    m_currentPage = 1;
    updatePageButtonStates();
    try {
        initializeAxisIDCombo();
        refreshAxisDetails();
        refreshPositionDetails(1);
        refreshPositionDetails(m_currentPage);
    }
    catch (const std::exception& ex) {
        CString errorMsg;
@@ -454,6 +534,28 @@
    for (auto pLabel : pLabels) {
        AdjustLabelFont(*pLabel);
    }
    // è°ƒæ•´ä¸‹æ‹‰æ¡†é«˜åº¦
    CComboBox* pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_AXIS_NAME);
    CButton* pButtonLeft = (CButton*)GetDlgItem(IDC_BUTTON_AXIS_LAST);
    CButton* pButtonRight = (CButton*)GetDlgItem(IDC_BUTTON_AXIS_NEXT);
    if (pComboBox && pButtonLeft && pButtonRight) {
        CRect rectButton;
        pButtonLeft->GetWindowRect(&rectButton);    // èŽ·å–æŒ‰é’®å°ºå¯¸
        ScreenToClient(&rectButton);                // è½¬æ¢ä¸ºå®¢æˆ·ç«¯åæ ‡
        CRect rectComboBox;
        pComboBox->GetWindowRect(&rectComboBox);
        ScreenToClient(&rectComboBox);
        // è°ƒæ•´ä¸‹æ‹‰æ¡†é«˜åº¦
        int heightAdjustment = 2;
        rectComboBox.top = rectButton.top;
        rectComboBox.bottom = rectButton.bottom + heightAdjustment;
        pComboBox->MoveWindow(&rectComboBox);
        pComboBox->SetItemHeight(-1, rectButton.Height() - 6);
    }
}
void CAxisSettingsDlg::OnSizing(UINT fwSide, LPRECT pRect)
@@ -510,7 +612,14 @@
{
    // TODO: åœ¨æ­¤æ·»åŠ æŽ§ä»¶é€šçŸ¥å¤„ç†ç¨‹åºä»£ç 
    try {
        if (m_currentPage == 1) {
            return;
        }
        updateDataFromUI();
        m_currentPage = 1;
        refreshPositionDetails(1);
        updatePageButtonStates();
    }
    catch (const std::exception& ex) {
        CString errorMsg;
@@ -523,7 +632,14 @@
{
    // TODO: åœ¨æ­¤æ·»åŠ æŽ§ä»¶é€šçŸ¥å¤„ç†ç¨‹åºä»£ç 
    try {
        if (m_currentPage == 2) {
            return;
        }
        updateDataFromUI();
        m_currentPage = 2;
        refreshPositionDetails(2);
        updatePageButtonStates();
    }
    catch (const std::exception& ex) {
        CString errorMsg;
@@ -536,7 +652,14 @@
{
    // TODO: åœ¨æ­¤æ·»åŠ æŽ§ä»¶é€šçŸ¥å¤„ç†ç¨‹åºä»£ç 
    try {
        if (m_currentPage == 3) {
            return;
        }
        updateDataFromUI();
        m_currentPage = 3;
        refreshPositionDetails(3);
        updatePageButtonStates();
    }
    catch (const std::exception& ex) {
        CString errorMsg;
@@ -549,7 +672,14 @@
{
    // TODO: åœ¨æ­¤æ·»åŠ æŽ§ä»¶é€šçŸ¥å¤„ç†ç¨‹åºä»£ç 
    try {
        if (m_currentPage == 4) {
            return;
        }
        updateDataFromUI();
        m_currentPage = 4;
        refreshPositionDetails(4);
        updatePageButtonStates();
    }
    catch (const std::exception& ex) {
        CString errorMsg;
@@ -562,7 +692,14 @@
{
    // TODO: åœ¨æ­¤æ·»åŠ æŽ§ä»¶é€šçŸ¥å¤„ç†ç¨‹åºä»£ç 
    try {
        if (m_currentPage == 5) {
            return;
        }
        updateDataFromUI();
        m_currentPage = 5;
        refreshPositionDetails(5);
        updatePageButtonStates();
    }
    catch (const std::exception& ex) {
        CString errorMsg;
@@ -621,7 +758,8 @@
    // TODO: åœ¨æ­¤æ·»åŠ æŽ§ä»¶é€šçŸ¥å¤„ç†ç¨‹åºä»£ç 
    try {
        refreshAxisDetails();
        refreshPositionDetails(1);
        refreshPositionDetails(m_currentPage);
        updatePageButtonStates();
    }
    catch (const std::exception& ex) {
        CString errorMsg;
@@ -630,6 +768,25 @@
    }
}
void CAxisSettingsDlg::OnBnClickedButtonAxisSave()
{
    // TODO: åœ¨æ­¤æ·»åŠ æŽ§ä»¶é€šçŸ¥å¤„ç†ç¨‹åºä»£ç 
    CString cstrMessage;
    cstrMessage.Format(_T("是否保存轴 [%d] å‚数?"), getCurrentSelectedAxisID());
    int ret = AfxMessageBox(_T(cstrMessage), MB_OKCANCEL | MB_ICONEXCLAMATION);
    if (ret != IDOK) {
        return;
    }
    updateDataFromUI();
    if (RecipeManager::getInstance().saveRecipe(std::string(CT2A(m_strRecipeName)))) {
        AfxMessageBox(_T("保存成功!"));
    }
    else {
        AfxMessageBox(_T("保存失败!"));
    }
}
void CAxisSettingsDlg::OnTimer(UINT_PTR nIDEvent)
{
    if (TIMER_READ_PLC_DATA == nIDEvent) {
SourceCode/Bond/BondEq/View/AxisSettingsDlg.h
@@ -1,5 +1,6 @@
#pragma once
#include "afxdialogex.h"
#include "BlButton.h"
#include "BLLabel.h"
#include "CPLC.h"
@@ -15,6 +16,7 @@
public:
    void SetPLC(CPLC* pPLC);
    void SetRecipeName(const CString& strRecipeName);
// å¯¹è¯æ¡†æ•°æ®
#ifdef AFX_DESIGN_TIME
@@ -29,22 +31,31 @@
    void AdjustControlFont(CWnd* pWnd, int nWidth, int nHeight);
    void AdjustLabelFont(CBLLabel& label);
    void SetStatusColor(CBLLabel& label, BOOL bStatus);
    void updatePageButtonStates();
    int getCurrentSelectedAxisID();
    void initializeAxisIDCombo();
    void refreshAxisDetails();
    void refreshPositionDetails(int pageNumber);
    void updateAxisSelection(int offset);
    void updateDataFromUI();
private:
    CPLC* m_pPLC;
    int m_nInitialWidth;
    int m_nInitialHeight;
    // å½“前选中的定位页面索引
    int m_currentPage;
    // é…æ–¹åç§°
    CString m_strRecipeName;
    // æŽ§ä»¶
    CBLLabel m_staticFLS, m_staticDOG, m_staticRLS, m_staticReady, m_staticBusy, m_staticErr;
    CComboBox m_comboAxisNO;
    CStatic m_staticAxisNO, m_staticAxisDescription, m_staticStartAddress;
    CEdit m_editManualSpeed, m_editAutoSpeed, m_editAccelerationTime, m_editDecelerationTime, m_editJogDistance;
    CBlButton m_pageButtons[5];
    std::map<int, CRect> m_mapCtrlLayouts;
    std::map<int, CFont*> m_mapFonts;
@@ -72,6 +83,7 @@
    afx_msg void OnBnClickedButtonAxisTestJogSub();
    afx_msg void OnBnClickedButtonAxisTestStop();
    afx_msg void OnSelchangeComboAxisName();
    afx_msg void OnBnClickedButtonAxisSave();
    afx_msg void OnTimer(UINT_PTR nIDEvent);
    DECLARE_MESSAGE_MAP()
};
SourceCode/Bond/BondEq/stdafx.h
@@ -49,7 +49,7 @@
// å•例模式的数据库管理类
#include "UserManager.h"
#include "AxisManager.h"
#include "RecipeManager.h"
#include "SystemLogManager.h"
// æŽ§ä»¶æ ·å¼
SourceCode/Bond/x64/Debug/Config/BondEq.db
Binary files differ