MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / initFilePath

Method initFilePath

common/map_sdk/map_import/src/OpenDriveOutput.cpp:306–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304}
305
306bool OpenDriveOutput::initFilePath(const char* filePath, bool replace) {
307 m_filePath = filePath;
308 if (replace) {
309 doc = new tinyxml2::XMLDocument();
310 tinyxml2::XMLDeclaration* tinyXmlDelare = doc->NewDeclaration();
311 tinyxml2::XMLElement* _opendrive_ele = doc->NewElement("OpenDRIVE");
312 doc->InsertFirstChild(tinyXmlDelare);
313 doc->InsertEndChild(_opendrive_ele);
314 } else {
315 doc = new tinyxml2::XMLDocument();
316 doc->LoadFile(m_filePath);
317 }
318 m_isInit = true;
319 return true;
320}
321
322bool OpenDriveOutput::insertHeader(const hadmap::txPoint refPoint) {
323 tinyxml2::XMLElement* _header = doc->NewElement("header");

Callers 3

saveMapMethod · 0.80
initFileMethod · 0.80
saveMapMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected