CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
MvdXmlElement.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24#if !defined(ODA_ODMVDXMLELEMENT_H_INCLUDED_)
25#define ODA_ODMVDXMLELEMENT_H_INCLUDED_
26
27#if _MSC_VER > 1000
28#pragma once
29#endif // _MSC_VER > 1000
30
31#include "MvdXmlCommon.h"
32#include "OdString.h"
33#include "StringArray.h"
34#include "MvdXmlAuditInfo.h"
35#include "tinyxml.h"
36
37namespace OdMvdXml
38{
39 class OdMvdXmlRoot;
41
43 {
45
46 public:
48
56 virtual OdResult inFields(TiXmlElement* pItem);
57 virtual OdResult outFields(TiXmlNode* pParent);
59 void appendXmlErrorMessage(TiXmlElement* pParent, const char* text, const char* caption = NULL, OdResult code = eOk);
60 void appendXmlWarningMessage(TiXmlElement* pParent, const char* text, const char* caption = NULL, OdResult code = eOk);
61 void appendErrorMessage(const char* text, const char* caption = NULL) const;
62 void appendWarningMessage(const char* text, const char* caption = NULL) const;
63
70
71 protected:
77 void assign(const OdMvdXmlElement* other);
78
84 virtual OdAnsiString getElementName();
85
93 virtual OdResult inAttributes(TiXmlElement* pItem);
94
103 virtual OdResult inChildNode(const char *nodeName, TiXmlElement* pChild);
104
112 virtual OdResult outAttributes(TiXmlElement* pItem);
113
121 virtual OdResult outChildNodes(TiXmlNode* pParent);
122
123 OdString getString(const char* buffer, const OdString& lang);
124 OdResult getText(TiXmlElement* pItem, OdAnsiString& result);
125 OdResult getText(TiXmlElement* pItem, const OdString& lang, OdString& result);
126 void setText(TiXmlElement* pItem, const OdString& lang, const OdString& value);
127 void setText(TiXmlElement* pItem, const OdString& lang, const OdAnsiString& value);
128
129 void SetAttribute(TiXmlElement* pItem, const char* attrName, const OdAnsiString& value, bool opt = false);
130 void SetAttribute(TiXmlElement* pItem, const char* attrName, const OdString& value, bool opt = false);
131
132 void SplitToArray(const char* buffer, const char separator, OdStringArray& items);
133 void SplitToArray(const char* buffer, const char separator, OdAnsiStringArray& items);
134 OdString ArrayToString(const char separator, const OdStringArray& items);
135 OdAnsiString ArrayToAnsiString(const char separator, const OdAnsiStringArray& items);
136
138 };
139}
140
141#endif // !defined(ODA_ODMVDXMLELEMENT_H_INCLUDED_)
142
#define SMARTPTR(classname)
Definition: IfcCommon.h:33
OdResult
Definition: OdResult.h:29
#define ODRX_DECLARE_MEMBERS(ClassName)
Definition: RxObject.h:112
OdResult getText(TiXmlElement *pItem, const OdString &lang, OdString &result)
void SplitToArray(const char *buffer, const char separator, OdAnsiStringArray &items)
void setText(TiXmlElement *pItem, const OdString &lang, const OdAnsiString &value)
OdMvdXmlElement & operator=(const OdMvdXmlElement &other)
virtual OdResult outFields(TiXmlNode *pParent)
virtual OdAnsiString getElementName()
void assign(const OdMvdXmlElement *other)
void setText(TiXmlElement *pItem, const OdString &lang, const OdString &value)
OdMvdXmlRoot * getRoot() const
OdString getString(const char *buffer, const OdString &lang)
OdResult getText(TiXmlElement *pItem, OdAnsiString &result)
void appendXmlErrorMessage(TiXmlElement *pParent, const char *text, const char *caption=NULL, OdResult code=eOk)
void appendErrorMessage(const char *text, const char *caption=NULL) const
virtual OdResult inChildNode(const char *nodeName, TiXmlElement *pChild)
void SetAttribute(TiXmlElement *pItem, const char *attrName, const OdAnsiString &value, bool opt=false)
virtual OdResult inFields(TiXmlElement *pItem)
void SetAttribute(TiXmlElement *pItem, const char *attrName, const OdString &value, bool opt=false)
virtual OdResult inAttributes(TiXmlElement *pItem)
OdAnsiString ArrayToAnsiString(const char separator, const OdAnsiStringArray &items)
void appendXmlWarningMessage(TiXmlElement *pParent, const char *text, const char *caption=NULL, OdResult code=eOk)
void appendWarningMessage(const char *text, const char *caption=NULL) const
virtual OdResult outChildNodes(TiXmlNode *pParent)
OdString ArrayToString(const char separator, const OdStringArray &items)
void SplitToArray(const char *buffer, const char separator, OdStringArray &items)
virtual OdResult outAttributes(TiXmlElement *pItem)
GLuint buffer
Definition: gles2_ext.h:178
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
#define MVDXML_EXPORT