You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
clang format apply
This commit is contained in:
@@ -16,9 +16,9 @@
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/*******************************************************************************
|
||||
* $Id: we_xmlop.h 4450 2013-01-21 14:13:24Z rdempsey $
|
||||
*
|
||||
*******************************************************************************/
|
||||
* $Id: we_xmlop.h 4450 2013-01-21 14:13:24Z rdempsey $
|
||||
*
|
||||
*******************************************************************************/
|
||||
/** @file */
|
||||
|
||||
#ifndef _WE_XMLOP_H_
|
||||
@@ -39,81 +39,76 @@ const int XML_NODE_BUF_SIZE = 256;
|
||||
*/
|
||||
class XMLOp
|
||||
{
|
||||
protected:
|
||||
/** @brief XML types used in parsing XML content and attributes
|
||||
*
|
||||
*/
|
||||
enum XML_DTYPE
|
||||
{
|
||||
TYPE_EMPTY = 1,
|
||||
TYPE_CHAR = 2,
|
||||
TYPE_DOUBLE = 3,
|
||||
TYPE_FLOAT = 4,
|
||||
TYPE_LONGLONG = 5,
|
||||
TYPE_INT = 6
|
||||
};
|
||||
protected:
|
||||
/** @brief XML types used in parsing XML content and attributes
|
||||
*
|
||||
*/
|
||||
enum XML_DTYPE
|
||||
{
|
||||
TYPE_EMPTY = 1,
|
||||
TYPE_CHAR = 2,
|
||||
TYPE_DOUBLE = 3,
|
||||
TYPE_FLOAT = 4,
|
||||
TYPE_LONGLONG = 5,
|
||||
TYPE_INT = 6
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
XMLOp();
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
XMLOp();
|
||||
|
||||
/**
|
||||
* @brief Default Destructor
|
||||
*/
|
||||
virtual ~XMLOp();
|
||||
/**
|
||||
* @brief Default Destructor
|
||||
*/
|
||||
virtual ~XMLOp();
|
||||
|
||||
/**
|
||||
* @brief Get node attribute for non-strings
|
||||
*/
|
||||
bool getNodeAttribute( xmlNode* pNode, const char* pTag,
|
||||
void* pVal, XML_DTYPE dataType ) const;
|
||||
/**
|
||||
* @brief Get node attribute for non-strings
|
||||
*/
|
||||
bool getNodeAttribute(xmlNode* pNode, const char* pTag, void* pVal, XML_DTYPE dataType) const;
|
||||
|
||||
/**
|
||||
* @brief Get node attribute for strings
|
||||
*/
|
||||
bool getNodeAttributeStr( xmlNode* pNode, const char* pTag,
|
||||
std::string& strVal ) const;
|
||||
/**
|
||||
* @brief Get node attribute for strings
|
||||
*/
|
||||
bool getNodeAttributeStr(xmlNode* pNode, const char* pTag, std::string& strVal) const;
|
||||
|
||||
/**
|
||||
* @brief Get node content for non-strings
|
||||
*/
|
||||
bool getNodeContent( const xmlNode* pNode, void* pVal,
|
||||
XML_DTYPE dataType );
|
||||
/**
|
||||
* @brief Get node content for non-strings
|
||||
*/
|
||||
bool getNodeContent(const xmlNode* pNode, void* pVal, XML_DTYPE dataType);
|
||||
|
||||
/**
|
||||
* @brief Get node content for strings
|
||||
*/
|
||||
bool getNodeContentStr( const xmlNode* pNode, std::string& strVal);
|
||||
/**
|
||||
* @brief Get node content for strings
|
||||
*/
|
||||
bool getNodeContentStr(const xmlNode* pNode, std::string& strVal);
|
||||
|
||||
/**
|
||||
* @brief Check whether it is certain tag
|
||||
*/
|
||||
bool isTag( const xmlNode* pNode, const xmlTag tag )
|
||||
{
|
||||
return !xmlStrcmp( pNode->name, (const xmlChar*)xmlTagTable[tag] );
|
||||
}
|
||||
/**
|
||||
* @brief Check whether it is certain tag
|
||||
*/
|
||||
bool isTag(const xmlNode* pNode, const xmlTag tag)
|
||||
{
|
||||
return !xmlStrcmp(pNode->name, (const xmlChar*)xmlTagTable[tag]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Parse xml document
|
||||
*/
|
||||
int parseDoc( const char* xmlFileName );
|
||||
/**
|
||||
* @brief Parse xml document
|
||||
*/
|
||||
int parseDoc(const char* xmlFileName);
|
||||
|
||||
/**
|
||||
* @brief Process node (recursion)
|
||||
*/
|
||||
virtual bool processNode( xmlNode* pParentNode );
|
||||
/**
|
||||
* @brief Process node (recursion)
|
||||
*/
|
||||
virtual bool processNode(xmlNode* pParentNode);
|
||||
|
||||
xmlDocPtr m_fDoc; // xml document pointer
|
||||
xmlNode* m_pRoot; // root element
|
||||
xmlDocPtr m_fDoc; // xml document pointer
|
||||
xmlNode* m_pRoot; // root element
|
||||
|
||||
private:
|
||||
void closeDoc();
|
||||
void convertNodeValue( void* pVal, const char* buf,
|
||||
XML_DTYPE dataType ) const;
|
||||
int readDoc( const char* xmlFileName );
|
||||
private:
|
||||
void closeDoc();
|
||||
void convertNodeValue(void* pVal, const char* buf, XML_DTYPE dataType) const;
|
||||
int readDoc(const char* xmlFileName);
|
||||
};
|
||||
|
||||
|
||||
} //end of namespace
|
||||
#endif // _WE_XMLOP_H_
|
||||
} // namespace WriteEngine
|
||||
#endif // _WE_XMLOP_H_
|
||||
|
Reference in New Issue
Block a user