TinyURDF 1.0.0
A Modern C++ Library for Parsing and Visualizing URDF Model Files
Loading...
Searching...
No Matches
inertia_parser.h
Go to the documentation of this file.
1#ifndef INCLUDE_TINYURDF_INERTIA_INERTIA_PARSER_H_
2#define INCLUDE_TINYURDF_INERTIA_INERTIA_PARSER_H_
3
4// Copyright 2025 Wissem CHIHA
5
6#include <string>
7#include <memory>
8#include "inertia.h"
9#include "pose_parser.h"
10#include "property_parser.h"
11
27class InertiaParser : public ParserBase<Inertia> {
28 public:
30 void print(std::ostream& os) override;
31 bool empty() const override;
32 void clear() override;
33 const char* getTypename() override;
34 bool isA(const char* name) override;
35 void parse(const tinyxml2::XMLElement* xml) override;
36 std::shared_ptr<Inertia> get() override;
37 ~InertiaParser() override = default;
38
39private:
40 std::shared_ptr<Inertia> p_;
41};
42#endif // INCLUDE_TINYURDF_INERTIA_INERTIA_PARSER_H_
Parses the link inertia and fills the member variables.
Definition inertia_parser.h:27
std::shared_ptr< Inertia > get() override
Definition inertia_parser.cc:57
~InertiaParser() override=default
InertiaParser()
Definition inertia_parser.cc:3
void parse(const tinyxml2::XMLElement *xml) override
Definition inertia_parser.cc:29
bool isA(const char *name) override
Definition inertia_parser.cc:25
bool empty() const override
Definition inertia_parser.cc:13
const char * getTypename() override
Definition inertia_parser.cc:21
void clear() override
Definition inertia_parser.cc:17
void print(std::ostream &os) override
Definition inertia_parser.cc:7
Definition parser_base.h:16