libzypp
10.5.0
|
00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00013 #include <iostream> 00014 00015 #include "zypp/parser/xml/libxmlfwd.h" 00016 00018 namespace zypp 00019 { 00020 00021 namespace xml 00022 { 00023 00024 /****************************************************************** 00025 ** 00026 ** FUNCTION NAME : operator<< 00027 ** FUNCTION TYPE : std::ostream & 00028 */ 00029 std::ostream & operator<<( std::ostream & str, const ReadState & obj ) 00030 { 00031 switch ( obj ) 00032 { 00033 #define X(T) case XML_TEXTREADER_MODE_##T: return str << #T 00034 X(INITIAL); 00035 X(INTERACTIVE); 00036 X(ERROR); 00037 X(EOF); 00038 X(CLOSED); 00039 X(READING); 00040 #undef X 00041 } 00042 return str << "UNKNOWN_READ_STATE"; 00043 } 00044 00045 /****************************************************************** 00046 ** 00047 ** FUNCTION NAME : operator<< 00048 ** FUNCTION TYPE : std::ostream & 00049 */ 00050 std::ostream & operator<<( std::ostream & str, const NodeType & obj ) 00051 { 00052 switch ( obj ) 00053 { 00054 #define X(T) case XML_READER_TYPE_##T: return str << #T 00055 X(NONE); 00056 X(ELEMENT); 00057 X(ATTRIBUTE); 00058 X(TEXT); 00059 X(CDATA); 00060 X(ENTITY_REFERENCE); 00061 X(ENTITY); 00062 X(PROCESSING_INSTRUCTION); 00063 X(COMMENT); 00064 X(DOCUMENT); 00065 X(DOCUMENT_TYPE); 00066 X(DOCUMENT_FRAGMENT); 00067 X(NOTATION); 00068 X(WHITESPACE); 00069 X(SIGNIFICANT_WHITESPACE); 00070 X(END_ELEMENT); 00071 X(END_ENTITY); 00072 X(XML_DECLARATION); 00073 #undef X 00074 } 00075 return str << "UNKNOWN_NODE_TYPE"; 00076 } 00077 00079 } // namespace xml 00082 } // namespace zypp