55 lines
2.2 KiB
C++
55 lines
2.2 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.
|
|
*
|
|
***********************************************************************************************************************/
|
|
|
|
#ifndef __XMLELEMENT__
|
|
#define __XMLELEMENT__
|
|
|
|
#ifndef WIN32
|
|
#define sprintf_s(buf, buf_size, ...) sprintf((buf), __VA_ARGS__)
|
|
#endif
|
|
#include "tinyxml.h"
|
|
class HXmlElement : public TiXmlElement
|
|
{
|
|
public:
|
|
HXmlElement (const char * in_value):TiXmlElement(in_value){}
|
|
virtual ~HXmlElement() {}
|
|
HXmlElement* add_element( const char* pcText);
|
|
//html
|
|
HXmlElement* add_element_with_id( const char* pcText, const char* pcTextId);
|
|
void add_value( const char* pcValue, bool bRTF = false);
|
|
void add_value(double dValue, int idecimal);
|
|
void add_value(int iValue);
|
|
HXmlElement* add_header( const char* pcText);
|
|
|
|
HXmlElement* add_element_and_value( char* pcText, const char* pcValue, bool bRTF = false);
|
|
HXmlElement* add_element_and_value( char* pcText, int iValue);
|
|
HXmlElement* add_element_and_value( char* pcText, double dValue);
|
|
HXmlElement* add_element_and_value( char* pcText, double dValue, int idecimal);
|
|
};
|
|
|
|
class HXmlTableRow : public HXmlElement
|
|
{
|
|
public:
|
|
HXmlTableRow ():HXmlElement("TR"){}
|
|
~HXmlTableRow() {}
|
|
|
|
public:
|
|
void add_cell( const char* pcText, int span_count = 0);
|
|
void add_cell( const char* pcText, int row_span, int col_span);
|
|
void add_cell_double( double dValue, int span_count = 0);
|
|
void add_cell_double_formated( double dValue, int idecimal, int span_count);
|
|
void add_cell_int( int iValue, int span_count = 0);
|
|
void add_rtf_cell( char* pcText, int span_count = 0);
|
|
};
|
|
|
|
|
|
#endif //__XMLELEMENT__
|