Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione Partners 2.0 patch 335 git-svn-id: svn://10.65.10.50/trunk@10496 c028cbd2-c16b-5b4b-a496-9718f37d4682
60 lines
1.6 KiB
C++
Executable File
60 lines
1.6 KiB
C++
Executable File
#ifndef __SOAP_H
|
|
#define __SOAP_H
|
|
|
|
#ifndef _WX_WXMMSTREAM_H__
|
|
#include "wx/mstream.h"
|
|
#endif
|
|
|
|
class TXmlItem;
|
|
|
|
typedef bool (*XmlItemCallback)(TXmlItem& item, long jolly);
|
|
|
|
class TXmlItem : public wxObject
|
|
{
|
|
wxString m_strTag, m_strText;
|
|
wxHashTable* m_Attributes;
|
|
wxList* m_Children;
|
|
|
|
protected:
|
|
wxString GetWord(wxInputStream& input) const;
|
|
int ReadTag(wxInputStream& input);
|
|
|
|
TXmlItem& AddChild(TXmlItem* pItem);
|
|
void RemoveLastChild();
|
|
|
|
public:
|
|
const wxString& GetTag() const { return m_strTag; }
|
|
void SetTag(const wxChar* strTag) { m_strTag = strTag; }
|
|
|
|
const wxString& GetText() const { return m_strText; }
|
|
void SetText(const wxChar* str) { m_strText = str; }
|
|
wxString GetEnclosedText() const;
|
|
|
|
void SetAttr(const wxChar* strAttr, const wxChar* strVal);
|
|
wxString GetAttr(const wxChar* strAttr) const;
|
|
|
|
TXmlItem& AddChild(const wxChar* strTag);
|
|
TXmlItem& AddSoapString(const wxChar* name, const wxChar* value, bool typized = false);
|
|
TXmlItem& AddSoapInt(const wxChar* name, int value, bool typized = false);
|
|
|
|
int GetChildren() const;
|
|
TXmlItem* GetChild(size_t n) const;
|
|
|
|
bool Read(wxInputStream& input);
|
|
void Write(wxOutputStream& output, int nTab = 0) const;
|
|
wxString AsString() const;
|
|
|
|
TXmlItem* ForEach(XmlItemCallback cb, long jolly = 0);
|
|
TXmlItem* FindFirst(const wxChar* strTag) const;
|
|
|
|
TXmlItem();
|
|
~TXmlItem();
|
|
};
|
|
|
|
wxOutputStream& operator<<(wxOutputStream& outf, const wxChar* str);
|
|
wxOutputStream& operator<<(wxOutputStream& outf, const wxString str);
|
|
|
|
wxString SoapProcessMessage(const char* buf, const unsigned int len);
|
|
|
|
#endif
|