1#ifndef INCLUDE_TINYURDF_GEOMETRY_CYLINDER_PARSER_H_
2#define INCLUDE_TINYURDF_GEOMETRY_CYLINDER_PARSER_H_
19 p_ = std::make_shared<Cylinder>();
22 void parse(
const tinyxml2::XMLElement* xml)
override {
25 const char* radius_str = xml->Attribute(
"radius");
26 const char* length_str = xml->Attribute(
"length");
27 if (radius_str && length_str) {
31 p_ = std::make_shared<Cylinder>();
37 bool isA(
const char* name)
override {
42 return p_->getTypename();
45 void print(std::ostream& os)
override {
46 os <<
"Parsed Cylinder = [";
59 std::shared_ptr<Cylinder>
get()
override {
66 std::shared_ptr<Cylinder> p_;
Parser for Cylinder geometry, inherits from ParserBase<Cylinder> and provides the functionality to pa...
Definition cylinder_parser.h:16
bool empty() const override
Definition cylinder_parser.h:51
CylinderParser()
Definition cylinder_parser.h:18
bool isA(const char *name) override
Definition cylinder_parser.h:37
void print(std::ostream &os) override
Definition cylinder_parser.h:45
std::shared_ptr< Cylinder > get() override
Definition cylinder_parser.h:59
void clear() override
Definition cylinder_parser.h:55
void parse(const tinyxml2::XMLElement *xml) override
Definition cylinder_parser.h:22
~CylinderParser()=default
const char * getTypename() override
Definition cylinder_parser.h:41
Definition parser_base.h:16
virtual void parse(const tinyxml2::XMLElement *xml)
Definition parser_base.h:27
void str2double(const char *in, double &num_)
a locale-safe version of string-to-double
Definition utils.cc:14