Files
Hoops_Exchange/exchange/exchangesource/DumpFeatureTree/HXmlReport.h
2025-12-15 23:22:33 +08:00

44 lines
1.8 KiB
C++

/***********************************************************************************************************************
*
* Copyright (c) 2010 - 2025 by Tech Soft 3D, Inc.
* The information contained herein is confidential and proprietary to Tech Soft 3D, Inc., and considered a trade secret
* as defined under civil and criminal statutes. Tech Soft 3D shall pursue its civil and criminal remedies in the event
* of unauthorized use or misappropriation of its trade secrets. Use of this information by anyone other than authorized
* employees of Tech Soft 3D, Inc. is granted only under a written non-disclosure agreement, expressly prescribing the
* scope and manner of such use.
*
***********************************************************************************************************************/
#pragma once
#ifndef __HECXMLREPORT_H__
#define __HECXMLREPORT_H__
#include "HXmlElement.h"
#include <vector>
class HXmlReport
{
TiXmlDocument m_sDocument;
std::vector< HXmlElement*> m_apPath;
public:
HXmlReport();
~HXmlReport();
public:
//==================================tree manipulation========================
inline HXmlElement* currentNode() const { return m_apPath.back(); }
void closeSubNode();
void addNode(HXmlElement* psNewNode);
void createSubNode(const char* pcNameNode);
void SaveFile(const char* pcReportPath, const char* pcXslFile = NULL);
//==================================populate current node========================
public:
inline void setAttribute(const char* name, const char * _value) { currentNode()->SetAttribute(name, _value); }
inline void setAttribute(const char * name, int value) { currentNode()->SetAttribute(name, value); }
inline void setAttribute(const char * name, double value) { currentNode()->SetDoubleAttribute(name, value); }
};
#endif