parser_private.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef SDF_PARSER_PRIVATE_HH_
18 #define SDF_PARSER_PRIVATE_HH_
19 
20 #include <tinyxml.h>
21 #include <string>
22 
23 #include "sdf/SDFImpl.hh"
24 #include "sdf/system_util.hh"
25 
28 namespace sdf
29 {
31  bool initDoc(TiXmlDocument *_xmlDoc, SDFPtr _sdf);
32 
34  bool initDoc(TiXmlDocument *_xmlDoc, ElementPtr _sdf);
35 
37  bool initXml(TiXmlElement *_xml, ElementPtr _sdf);
38 
40  bool readDoc(TiXmlDocument *_xmlDoc, SDFPtr _sdf, const std::string &_source,
41  bool _convert = true);
42 
43  bool readDoc(TiXmlDocument *_xmlDoc, ElementPtr _sdf,
44  const std::string &_source, bool _convert = true);
45 
47  bool readXml(TiXmlElement *_xml, ElementPtr _sdf);
48 
49  void copyChildren(ElementPtr _sdf, TiXmlElement *_xml);
50 }
51 #endif
std::shared_ptr< SDF > SDFPtr
Definition: SDFImpl.hh:44
bool initXml(TiXmlElement *_xml, ElementPtr _sdf)
For internal use only. Do not use this function.
void copyChildren(ElementPtr _sdf, TiXmlElement *_xml)
bool readDoc(TiXmlDocument *_xmlDoc, SDFPtr _sdf, const std::string &_source, bool _convert=true)
Populate the SDF values from a TinyXML document.
bool readXml(TiXmlElement *_xml, ElementPtr _sdf)
For internal use only. Do not use this function.
bool initDoc(TiXmlDocument *_xmlDoc, SDFPtr _sdf)
Initialize the SDF interface using a TinyXML document.
namespace for Simulation Description Format parser
Definition: Console.hh:36
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:45