| 100 | // @cmember Create a parser |
| 101 | |
| 102 | bool Create (const XML_Char * pszEncoding = NULL, const XML_Char * pszSep = NULL) |
| 103 | { |
| 104 | // Destroy the old parser |
| 105 | Destroy (); |
| 106 | |
| 107 | // If the encoding or seperator are empty, then NULL |
| 108 | if (pszEncoding != NULL && pszEncoding [0] == 0) |
| 109 | { |
| 110 | pszEncoding = NULL; |
| 111 | } |
| 112 | if (pszSep != NULL && pszSep [0] == 0) |
| 113 | { |
| 114 | pszSep = NULL; |
| 115 | } |
| 116 | |
| 117 | // Create the new parser |
| 118 | m_p = XML_ParserCreate_MM (pszEncoding, NULL, pszSep); |
| 119 | if (m_p == NULL) |
| 120 | { |
| 121 | return false; |
| 122 | } |
| 123 | |
| 124 | // Invoke the post create routine |
| 125 | _T * pThis = static_cast <_T *> (this); |
| 126 | pThis ->OnPostCreate (); |
| 127 | |
| 128 | // Set the user data used in callbacks |
| 129 | XML_SetUserData (m_p, (void *) this); |
| 130 | return true; |
| 131 | } |
| 132 | |
| 133 | // @cmember Destroy the parser |
| 134 |
nothing calls this directly
no test coverage detected