MCPcopy Create free account
hub / github.com/cuberite/cuberite / Create

Method Create

src/XMLParser.h:102–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

XML_ParserCreate_MMFunction · 0.85
XML_SetUserDataFunction · 0.85
OnPostCreateMethod · 0.80

Tested by

no test coverage detected