MCPcopy Create free account
hub / github.com/Kitware/CMake / InitializeParser

Method InitializeParser

Source/cmXMLParser.cxx:50–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50int cmXMLParser::InitializeParser()
51{
52 if (this->Parser) {
53 std::cerr << "Parser already initialized" << std::endl;
54 this->ParseError = 1;
55 return 0;
56 }
57
58 // Create the expat XML parser.
59 this->Parser = XML_ParserCreate(nullptr);
60 XML_SetElementHandler(static_cast<XML_Parser>(this->Parser),
61 &cmXMLParserStartElement, &cmXMLParserEndElement);
62 XML_SetCharacterDataHandler(static_cast<XML_Parser>(this->Parser),
63 &cmXMLParserCharacterDataHandler);
64 XML_SetUserData(static_cast<XML_Parser>(this->Parser), this);
65 this->ParseError = 0;
66 return 1;
67}
68
69int cmXMLParser::ParseChunk(char const* inputString,
70 std::string::size_type length)

Callers 1

ParseMethod · 0.95

Calls 4

XML_ParserCreateFunction · 0.85
XML_SetElementHandlerFunction · 0.85
XML_SetUserDataFunction · 0.85

Tested by

no test coverage detected