From: Yurii R. <yr...@us...> - 2003-01-25 21:51:32
|
Update of /cvsroot/eas-dev/eas-dev/libs/libsxmlstream/include In directory sc8-pr-cvs1:/tmp/cvs-serv679/libs/libsxmlstream/include Modified Files: sxml.hxx sxmlstream.hxx Log Message: a bit update to libsxmlstream; changes in build process; very small change in core-architecture-ru Index: sxml.hxx =================================================================== RCS file: /cvsroot/eas-dev/eas-dev/libs/libsxmlstream/include/sxml.hxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sxml.hxx 25 Jan 2003 20:00:36 -0000 1.1 +++ sxml.hxx 25 Jan 2003 21:51:28 -0000 1.2 @@ -38,21 +38,27 @@ struct _SXml { SXml_t type; string data; - vector<_SXml *> childs; + vector<_SXml> * childs; }; -typedef _SXml * SXml; +typedef _SXml SXml; /* Type checks */ -#define Is_SXml_t(x,y) ( x->type == y ) +#define Is_SXml_t(x,y) ( x.type == y ) #define Is_SXml_Element(x) Is_SXml_t(x,SXml_Element_t) #define Is_SXml_Attribute(x) Is_SXml_t(x,SXml_Attribute_t) #define Is_SXml_Char(x) Is_SXml_t(x,SXml_Char_t) #define Is_SXml_Namespace(x) Is_SXml_t(x,SXml_Namespace_t) +/* Tests */ + +#define SXml_has_property(x) ( ((x.childs)->size() == 1) && \ + (x.type == ((SXml)((x.childs)->at(0))).type) ) + + /* SXml creation */ SXml SXml_create(SXml_t aType, string aData); @@ -61,7 +67,13 @@ SXml SXml_Char_create(string aData); SXml SXml_Namespace_create(string aPrefix, string aURI); +/* SXml destruction */ + +void SXml_delete(SXml e); + /* Childs operations */ void SXml_create_child(SXml e, SXml c); + +string SXml_get_property(SXml e); #endif /* _LIBSXMLSTREAM_SXML_HXX_ */ Index: sxmlstream.hxx =================================================================== RCS file: /cvsroot/eas-dev/eas-dev/libs/libsxmlstream/include/sxmlstream.hxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sxmlstream.hxx 25 Jan 2003 20:00:36 -0000 1.1 +++ sxmlstream.hxx 25 Jan 2003 21:51:28 -0000 1.2 @@ -21,13 +21,43 @@ #ifndef _LIBSXMLSTREAM_SXMLSTREAM_HXX_ #define _LIBSXMLSTREAM_SXMLSTREAM_HXX_ +#include <stack> #include <sxml.hxx> -class SXMLStream +using namespace std; + +class SXmlStream { + queue<SXml,deque<SXml> > * m_queue; + public: - protected: + SXmlStream(); + ~SXmlStream(); + +}; + +class SXmlBinaryStream: public SXmlStream +{ + public: + SXmlBinaryStream(); + ~SXmlBinaryStream(); +/* friend ostream& operator<<(ostream&, + const SXmlBinaryStream&); + friend SXmlBinaryStream& operator>>( + SXmlBinaryStream&, + const ostream&);*/ }; + +class SXmlTextStream: public SXmlStream +{ + public: + SXmlTextStream(); + ~SXmlTextStream(); + + friend ostream& operator<<(ostream&, + const SXmlTextStream&); +}; + #endif /* _LIBSXMLSTREAM_SXMLSTREAM_HXX_ */ |