1#ifndef INCLUDE_TINYURDF_GEOMETRY_SPHERE_PARSER_H_
2#define INCLUDE_TINYURDF_GEOMETRY_SPHERE_PARSER_H_
17 p_ = std::make_shared<Sphere>();
20 void parse(
const tinyxml2::XMLElement* xml)
override {
23 const char* radius_str = xml->Attribute(
"radius");
27 p_ = std::make_shared<Sphere>();
32 bool isA(
const char* name)
override {
37 return p_->getTypename();
40 void print(std::ostream& os)
override {
41 os <<
"Parsed Sphere = [";
54 std::shared_ptr<Sphere>
get()
override {
61 std::shared_ptr<Sphere> p_;
Definition parser_base.h:16
virtual void parse(const tinyxml2::XMLElement *xml)
Definition parser_base.h:27
Parser for Sphere geometry, inherits from ParserBase<Sphere> and provides the functionality to parse ...
Definition sphere_parser.h:14
void print(std::ostream &os) override
Definition sphere_parser.h:40
SphereParser()
Definition sphere_parser.h:16
const char * getTypename() override
Definition sphere_parser.h:36
void clear() override
Definition sphere_parser.h:50
bool empty() const override
Definition sphere_parser.h:46
std::shared_ptr< Sphere > get() override
Definition sphere_parser.h:54
void parse(const tinyxml2::XMLElement *xml) override
Definition sphere_parser.h:20
bool isA(const char *name) override
Definition sphere_parser.h:32
void str2double(const char *in, double &num_)
a locale-safe version of string-to-double
Definition utils.cc:14