00001 /***************************************************************************** 00002 * Copyright (C) 2011 by Benjamin Hadorn (b_hadorn@bluewin.ch) 00003 ***************************************************************************** 00004 * Project : Zeus Base Library 00005 * Module : IXMLNode 00006 * Package : Zeus.ZeusBase.System.Interfaces 00007 * Author : Benjamin Hadorn 00008 * Date : 24.10.2011 00009 * System : Zeus-Framework 00010 ***************************************************************************** 00011 * Licence: * 00012 * This library is free software; you can redistribute it and/or modify * 00013 * it under the terms of the GNU Lesser General Public License as * 00014 * published by the Free Software Foundation; either version * 00015 * 2.1 of the License, or (at your option) any later version. * 00016 * * 00017 * This library is distributed in the hope that it will be useful, * 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00020 * GNU Lesser General Public License for more details. * 00021 * * 00022 * You should have received a copy of the GNU Lesser General Public * 00023 * License along with this library; if not, write to the Free Software * 00024 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA * 00025 *****************************************************************************/ 00026 00027 00028 /*************************************************************************** 00029 GENERATED : xIDL COMPILER 1.0 00030 DATE : 2012-01-16 18:50:28 00031 CAUTION : Don't change the file manualy. Change xidl file instead. 00032 ***************************************************************************/ 00033 00034 #ifndef IXMLNodeHPP 00035 #define IXMLNodeHPP 00036 00037 #include <zeusbase/System/Interfaces/IZUnknown.hpp> 00038 #include <zeusbase/System/Interfaces/IString.hpp> 00039 #include <zeusbase/System/Interfaces/INativePointer.hpp> 00040 00041 BEGIN_NAMESPACE_Zeus 00042 00043 //Forward declarations 00044 class IXMLNodeList; 00045 class IXPathResults; 00046 00047 // {9ADBE736-BB3B-4c78-BE1A-C73ACE5D3A1A} 00048 #define INTERFACE_IXMLNode TIID(0x9ADBE736, 0xBB3B, 0x4c78, 0xBE, 0x1A, 0xC7, 0x3A, 0xCE, 0x5D, 0x3A, 0x1A) 00049 00050 /*****************************************************************************/ 00053 /*****************************************************************************/ 00054 class IXMLNode : public IZUnknown 00055 { 00056 HIDE_ASSIGNMENT_OPERATOR(IXMLNode) 00057 00058 public: 00059 /*************************************************************************/ 00062 /*************************************************************************/ 00063 enum ENodeType 00064 { 00065 etCDataSection = 1, 00066 etComment = 2, 00067 etDocument = 3, 00068 etDocumentFragment = 4, 00069 etText = 5, 00070 etDocumentType = 6, 00071 etElement = 7, 00072 etEntity = 8, 00073 etEntityReference = 9, 00074 etNotation = 10, 00075 etProcessingInstruction = 11, 00076 etAttribute = 12, 00077 etNodeDecl = 13, 00078 }; 00079 00080 /*************************************************************************/ 00083 /*************************************************************************/ 00084 enum EImplementationType 00085 { 00086 etXerces = 1, 00087 etMSXML = 2, 00088 }; 00089 00090 /*************************************************************************/ 00096 /*************************************************************************/ 00097 virtual Retval MQUALIFIER getNodeName(IString& rstrName) const = 0; 00098 00099 /*************************************************************************/ 00103 /*************************************************************************/ 00104 virtual ENodeType MQUALIFIER getNodeType() const = 0; 00105 00106 /*************************************************************************/ 00112 /*************************************************************************/ 00113 virtual Retval MQUALIFIER getNodeValue(IString& rstrValue) const = 0; 00114 00115 /*************************************************************************/ 00123 /*************************************************************************/ 00124 virtual Retval MQUALIFIER getAttributeValue(const IString& rstrName, IString& rstrValue) const = 0; 00125 00126 /*************************************************************************/ 00133 /*************************************************************************/ 00134 virtual Retval MQUALIFIER getAttributeValueInt(const IString& rstrName, Int& riValue) const = 0; 00135 00136 /*************************************************************************/ 00143 /*************************************************************************/ 00144 virtual Retval MQUALIFIER getAttributeValueUint(const IString& rstrName, Uint& ruiValue) const = 0; 00145 00146 /*************************************************************************/ 00153 /*************************************************************************/ 00154 virtual Retval MQUALIFIER getAttributeValueBool(const IString& rstrName, bool& rbValue) const = 0; 00155 00156 /*************************************************************************/ 00163 /*************************************************************************/ 00164 virtual Retval MQUALIFIER getAttributeValueFloat(const IString& rstrName, Float& rfValue) const = 0; 00165 00166 /*************************************************************************/ 00172 /*************************************************************************/ 00173 virtual Retval MQUALIFIER getNodeList(IXMLNodeList*& rpList) const = 0; 00174 00175 /*************************************************************************/ 00182 /*************************************************************************/ 00183 virtual void MQUALIFIER resetNodeIterator(const IString& rstrName) const = 0; 00184 00185 /*************************************************************************/ 00193 /*************************************************************************/ 00194 virtual Retval MQUALIFIER getNextNode(IXMLNode*& rpNode) const = 0; 00195 00196 /*************************************************************************/ 00201 /*************************************************************************/ 00202 virtual bool MQUALIFIER hasChildren() const = 0; 00203 00204 /*************************************************************************/ 00210 /*************************************************************************/ 00211 virtual Retval MQUALIFIER appendNode(IXMLNode& rNewNode) = 0; 00212 00213 /*************************************************************************/ 00224 /*************************************************************************/ 00225 virtual Retval MQUALIFIER createNewChildNode(ENodeType eType, const IString& rstrName, const IString& rstrUri, IXMLNode*& rpNode) = 0; 00226 00227 /*************************************************************************/ 00245 /*************************************************************************/ 00246 virtual Retval MQUALIFIER createElementChildNodeBySchema(const IString& rstrName, IXMLNode& rSchemaNode, IXMLNode*& rpNode, IXMLNode** ppRightSibling = NULL, bool bCheckMaxOccurs = true) = 0; 00247 00248 /*************************************************************************/ 00254 /*************************************************************************/ 00255 virtual Retval MQUALIFIER setNodeValue(const IString& rstrData) = 0; 00256 00257 /*************************************************************************/ 00265 /*************************************************************************/ 00266 virtual Retval MQUALIFIER setAttributeValue(const IString& rstrName, const IString& rstrValue) = 0; 00267 00268 /*************************************************************************/ 00273 /*************************************************************************/ 00274 virtual Retval MQUALIFIER removeMe() = 0; 00275 00276 /*************************************************************************/ 00280 /*************************************************************************/ 00281 virtual EImplementationType MQUALIFIER getImplClass() const = 0; 00282 00283 /*************************************************************************/ 00287 /*************************************************************************/ 00288 virtual void MQUALIFIER resetAttributeIterator() const = 0; 00289 00290 /*************************************************************************/ 00298 /*************************************************************************/ 00299 virtual Retval MQUALIFIER getNextAttribute(IString& rstrName, IString& rstrValue) const = 0; 00300 00301 /*************************************************************************/ 00307 /*************************************************************************/ 00308 virtual Retval MQUALIFIER getParentNode(IXMLNode*& rpParent) const = 0; 00309 00310 /*************************************************************************/ 00317 /*************************************************************************/ 00318 virtual Retval MQUALIFIER getNextSibling(IXMLNode*& rpNode, bool bOnlyElements = true) const = 0; 00319 00320 /*************************************************************************/ 00327 /*************************************************************************/ 00328 virtual Retval MQUALIFIER selectNodes(const IString& rstrQuery, IXPathResults*& rpResults) const = 0; 00329 00330 /*************************************************************************/ 00338 /*************************************************************************/ 00339 virtual Retval MQUALIFIER clone(bool bRecurs, IXMLNode*& rpNode) const = 0; 00340 00341 /*************************************************************************/ 00348 /*************************************************************************/ 00349 virtual Retval MQUALIFIER insertNode(IXMLNode& rNode, IXMLNode* pBeforeNode) = 0; 00350 00351 /*************************************************************************/ 00357 /*************************************************************************/ 00358 virtual Retval MQUALIFIER serializeNode(IString& rstrStream) const = 0; 00359 00360 /*************************************************************************/ 00367 /*************************************************************************/ 00368 virtual Retval MQUALIFIER getImplPtr(INativePointer& rImpl) const = 0; 00369 00370 /*************************************************************************/ 00375 /*************************************************************************/ 00376 virtual void MQUALIFIER setImplPtr(INativePointer& rImpl) = 0; 00377 00378 /*************************************************************************/ 00385 /*************************************************************************/ 00386 virtual Retval MQUALIFIER selectNode(const IString& rstrQuery, IXMLNode*& rpResult) const = 0; 00387 00388 /*************************************************************************/ 00395 /*************************************************************************/ 00396 virtual Retval MQUALIFIER getChildNode(const IString& rstrName, IXMLNode*& rpChildNode) const = 0; 00397 00398 /*************************************************************************/ 00404 /*************************************************************************/ 00405 virtual Retval MQUALIFIER removeAttribute(const IString& rstrName) = 0; 00406 00407 /*************************************************************************/ 00414 /*************************************************************************/ 00415 virtual Retval MQUALIFIER getText(IString& rstrText) const = 0; 00416 00417 /*************************************************************************/ 00425 /*************************************************************************/ 00426 virtual Retval MQUALIFIER setText(const IString& rstrText) = 0; 00427 00428 }; 00429 00430 END_NAMESPACE_Zeus 00431 00432 #endif //define IXMLNodeHPP