Skip to content

Commit

Permalink
added changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aagrawal05 committed May 19, 2024
1 parent 6d3672c commit 2a1d038
Show file tree
Hide file tree
Showing 63 changed files with 407 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/sdf/Actor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ namespace sdf
/// \brief Default constructor
public: Actor();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the actor based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/AirPressure.hh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ namespace sdf
/// \brief Default constructor
public: AirPressure();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the airPressure based on an element pointer.
/// This is *not* the usual entry point. Typical usage of the SDF DOM is
/// through the Root object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/AirSpeed.hh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ namespace sdf
/// \brief Default constructor
public: AirSpeed();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the air speed based on an element pointer.
/// This is *not* the usual entry point. Typical usage of the SDF DOM is
/// through the Root object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Altimeter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ namespace sdf
/// \brief Default constructor
public: Altimeter();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the altimeter based on an element pointer. This is *not*
/// the usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Atmosphere.hh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ namespace sdf
/// \brief Default constructor
public: Atmosphere();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the atmosphere based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Camera.hh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ namespace sdf
/// \brief Constructor
public: Camera();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Return true if both Camera objects contain the same values.
/// \param[_in] _alt Camera value to compare.
/// \returen True if 'this' == _alt.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Collision.hh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ namespace sdf
/// \brief Default constructor
public: Collision();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the collision based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
2 changes: 2 additions & 0 deletions include/sdf/ForceTorque.hh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ namespace sdf
/// \brief Default constructor
public: ForceTorque();

public: static inline std::string_view SchemaFile();

/// \brief Load the force torque sensor based on an element pointer. This is
/// *not* the usual entry point. Typical usage of the SDF DOM is through the
/// Root object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Frame.hh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ namespace sdf
/// \brief Default constructor
public: Frame();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the frame based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Geometry.hh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ namespace sdf
/// \brief Default constructor
public: Geometry();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the geometry based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Gui.hh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ namespace sdf
/// \brief Default constructor
public: Gui();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the gui based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Imu.hh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ namespace sdf
/// \brief Default constructor
public: Imu();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the IMU based on an element pointer. This is *not*
/// the usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Joint.hh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ namespace sdf
/// \brief Default constructor
public: Joint();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the joint based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Lidar.hh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ namespace sdf
/// \brief Default constructor
public: Lidar();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the lidar based on an element pointer. This is *not*
/// the usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Light.hh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ namespace sdf
/// \brief Default constructor
public: Light();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the light based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Link.hh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ namespace sdf
/// \brief Default constructor
public: Link();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the link based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Magnetometer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ namespace sdf
/// \brief Default constructor
public: Magnetometer();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the magnetometer based on an element pointer. This is *not*
/// the usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Material.hh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ namespace sdf
/// \brief Default constructor
public: Material();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the material based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Model.hh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ namespace sdf
/// \brief Default constructor
public: Model();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the model based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/NavSat.hh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ namespace sdf
/// \param[in] _sdf The SDF Element pointer
/// \return Errors, which is a vector of Error objects. Each Error includes
/// an error code and message. An empty vector indicates no error.

public: static inline std::string_view SchemaFile();

public: Errors Load(ElementPtr _sdf);

/// \brief Get a pointer to the SDF element that was used during
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Noise.hh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ namespace sdf
/// \brief Default constructor
public: Noise();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Return true if both Noise objects contain the same values.
/// \param[_in] _noise Noise value to compare.
/// \return True if 'this' == _noise.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/ParticleEmitter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ namespace sdf
/// \brief Default constructor
public: ParticleEmitter();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the particle emitter based on an element pointer. This is
/// *not* the usual entry point. Typical usage of the SDF DOM is through
/// the Root object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Physics.hh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ namespace sdf
/// \brief Default constructor
public: Physics();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the physics based on an element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Plugin.hh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ namespace sdf
/// \brief Default constructor
public: Plugin();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Default destructor
public: ~Plugin();

Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Projector.hh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ namespace sdf
/// \brief Default constructor
public: Projector();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the projector based on an element pointer. This is
/// *not* the usual entry point. Typical usage of the SDF DOM is through
/// the Root object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Root.hh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ namespace sdf
/// \brief Default constructor
public: Root();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Get the name of the world without loading the entire world
/// Users shouldn't normally need to use this API.
/// This doesn't load the world, it might return the world name even if the
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Scene.hh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ namespace sdf
/// \brief Default constructor
public: Scene();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the scene based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Sensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ namespace sdf
/// \brief Default constructor
public: Sensor();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the sensor based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Surface.hh
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ namespace sdf
/// \brief Default constructor
public: Surface();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the surface based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/Visual.hh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ namespace sdf
/// \brief Default constructor
public: Visual();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the visual based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
3 changes: 3 additions & 0 deletions include/sdf/World.hh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ namespace sdf
/// \brief Default constructor
public: World();

/// \brief Get the schema file name accessor
public: static inline std::string_view SchemaFile();

/// \brief Load the world based on a element pointer. This is *not* the
/// usual entry point. Typical usage of the SDF DOM is through the Root
/// object.
Expand Down
8 changes: 8 additions & 0 deletions src/Actor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -819,3 +819,11 @@ void Actor::AddPlugin(const Plugin &_plugin)
{
this->dataPtr->plugins.push_back(_plugin);
}

/////////////////////////////////////////////////
inline std::string_view Actor::SchemaFile()
{
static char kSchemaFile[] = "actor.sdf";
return kSchemaFile;
}

8 changes: 8 additions & 0 deletions src/AirPressure.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,11 @@ sdf::ElementPtr AirPressure::ToElement(sdf::Errors &_errors) const

return elem;
}

/////////////////////////////////////////////////
inline std::string_view AirPressure::SchemaFile()
{
static char kSchemaFile[] = "air_pressure.sdf";
return kSchemaFile;
}

8 changes: 8 additions & 0 deletions src/AirSpeed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,11 @@ sdf::ElementPtr AirSpeed::ToElement() const

return elem;
}

/////////////////////////////////////////////////
inline std::string_view AirSpeed::SchemaFile()
{
static char kSchemaFile[] = "air_speed.sdf";
return kSchemaFile;
}

8 changes: 8 additions & 0 deletions src/Altimeter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,11 @@ sdf::ElementPtr Altimeter::ToElement(sdf::Errors &_errors) const

return elem;
}

/////////////////////////////////////////////////
inline std::string_view Altimeter::SchemaFile()
{
static char kSchemaFile[] = "altimeter.sdf";
return kSchemaFile;
}

8 changes: 8 additions & 0 deletions src/Atmosphere.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,11 @@ sdf::ElementPtr Atmosphere::ToElement(sdf::Errors &_errors) const

return elem;
}

/////////////////////////////////////////////////
inline std::string_view Atmosphere::SchemaFile()
{
static char kSchemaFile[] = "atmosphere.sdf";
return kSchemaFile;
}

8 changes: 8 additions & 0 deletions src/Camera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1337,3 +1337,11 @@ sdf::ElementPtr Camera::ToElement() const

return elem;
}

/////////////////////////////////////////////////
inline std::string_view Camera::SchemaFile()
{
static char kSchemaFile[] = "camera.sdf";
return kSchemaFile;
}

8 changes: 8 additions & 0 deletions src/Collision.cc
Original file line number Diff line number Diff line change
Expand Up @@ -392,3 +392,11 @@ sdf::ElementPtr Collision::ToElement(sdf::Errors &_errors) const

return elem;
}

/////////////////////////////////////////////////
inline std::string_view Collision::SchemaFile()
{
static char kSchemaFile[] = "collision.sdf";
return kSchemaFile;
}

Loading

0 comments on commit 2a1d038

Please sign in to comment.