Skip to content

Commit

Permalink
Versioned inline namespaces throughout
Browse files Browse the repository at this point in the history
  • Loading branch information
sloretz committed Aug 17, 2017
1 parent ea83d11 commit f002680
Show file tree
Hide file tree
Showing 40 changed files with 155 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/ignition/math/Angle.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#define IGNITION_MATH_ANGLE_HH_

#include <iostream>
#include <ignition/math/config.hh>
#include <ignition/math/Helpers.hh>
#include <ignition/math/config.hh>

/// \brief Macro that converts radians to degrees
/// \param[in] radians
Expand Down
4 changes: 4 additions & 0 deletions include/ignition/math/Box.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@
#include <ignition/math/Helpers.hh>
#include <ignition/math/Vector3.hh>
#include <ignition/math/Line3.hh>
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
// Forward declaration of private data
class BoxPrivate;

Expand Down Expand Up @@ -231,6 +234,7 @@ namespace ignition
/// \brief Private data pointer
private: BoxPrivate *dataPtr;
};
}
}
}
#endif
4 changes: 4 additions & 0 deletions include/ignition/math/BoxPrivate.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
#define IGNITION_MATH_BOXPRIVATE_HH_

#include <ignition/math/Vector3.hh>
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
/// \internal
/// \brief Private data for Box class
class BoxPrivate
Expand All @@ -33,6 +36,7 @@ namespace ignition
/// \brief Maximum corner of the box
public: Vector3d max = Vector3d(LOW_D, LOW_D, LOW_D);
};
}
}
}
#endif
4 changes: 4 additions & 0 deletions include/ignition/math/Color.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@

#include <ignition/math/Helpers.hh>
#include <ignition/math/Vector3.hh>
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
/// \class Color Color.hh ignition/math/Color.hh
/// \brief Defines a color using a red (R), green (G), blue (B), and alpha
/// (A) component. Each color component is in the range [0..1].
Expand Down Expand Up @@ -313,6 +316,7 @@ namespace ignition
/// \brief Alpha value
private: float a = 1;
};
}
}
}
#endif
4 changes: 4 additions & 0 deletions include/ignition/math/Filter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@
#include <ignition/math/Helpers.hh>
#include <ignition/math/Vector3.hh>
#include <ignition/math/Quaternion.hh>
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
/// \class Filter Filter.hh ignition/math/Filter.hh
/// \brief Filter base class
template <class T>
Expand Down Expand Up @@ -241,6 +244,7 @@ namespace ignition
this->Set(math::Vector3d(0, 0, 0));
}
};
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions include/ignition/math/Frustum.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@
#include <ignition/math/Plane.hh>
#include <ignition/math/Angle.hh>
#include <ignition/math/Pose3.hh>
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
// Forward declaration of private data
class FrustumPrivate;

Expand Down Expand Up @@ -176,6 +179,7 @@ namespace ignition
/// \brief Private data pointer
private: FrustumPrivate *dataPtr;
};
}
}
}
#endif
4 changes: 4 additions & 0 deletions include/ignition/math/FrustumPrivate.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@
#include <ignition/math/Pose3.hh>
#include <ignition/math/Angle.hh>
#include <ignition/math/Plane.hh>
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
/// \internal
/// \brief Private data for the Frustum class
class FrustumPrivate
Expand Down Expand Up @@ -73,6 +76,7 @@ namespace ignition
/// \sa Frustum::FrustumPlane
public: std::array<Planed, 6> planes;
};
}
}
}
#endif
4 changes: 4 additions & 0 deletions include/ignition/math/Helpers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <cstdint>

#include <ignition/math/System.hh>
#include <ignition/math/config.hh>

/// \brief Double maximum value. This value will be similar to 1.79769e+308
/// \deprecated Use static const value instead.
Expand Down Expand Up @@ -209,6 +210,8 @@ namespace ignition
/// \brief Math classes and function useful in robot applications.
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
/// \brief size_t type with a value of 0
static const size_t IGN_ZERO_SIZE_T = 0u;

Expand Down Expand Up @@ -763,6 +766,7 @@ namespace ignition
/// \sa Pair
std::tuple<PairInput, PairInput> IGNITION_VISIBLE Unpair(
const PairOutput _key);
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions include/ignition/math/Inertial.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@

#include "ignition/math/MassMatrix3.hh"
#include "ignition/math/Pose3.hh"
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
/// \class Inertial Inertial.hh ignition/math/Inertial.hh
/// \brief A class for inertial information about a rigid body
/// consisting of the scalar mass, a 3x3 symmetric moment
Expand Down Expand Up @@ -239,6 +242,7 @@ namespace ignition

typedef Inertial<double> Inertiald;
typedef Inertial<float> Inertialf;
}
}
}
#endif
4 changes: 4 additions & 0 deletions include/ignition/math/Kmeans.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@
#include <vector>
#include <ignition/math/Vector3.hh>
#include <ignition/math/Helpers.hh>
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
// Forward declare private data
class KmeansPrivate;

Expand Down Expand Up @@ -79,6 +82,7 @@ namespace ignition
/// \brief Private data pointer
private: KmeansPrivate *dataPtr;
};
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions include/ignition/math/KmeansPrivate.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@
#include <vector>
#include <ignition/math/Vector3.hh>
#include <ignition/math/Helpers.hh>
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
/// \internal
/// \brief Private data for Kmeans class
class KmeansPrivate
Expand All @@ -44,6 +47,7 @@ namespace ignition
/// \brief Counts the number of observations contained in each partition.
public: std::vector<unsigned int> counters;
};
}
}
}
#endif
Expand Down
4 changes: 4 additions & 0 deletions include/ignition/math/Line2.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@

#include <algorithm>
#include <ignition/math/Vector2.hh>
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
/// \class Line2 Line2.hh ignition/math/Line2.hh
/// \brief A two dimensional line segment. The line is defined by a
/// start and end point.
Expand Down Expand Up @@ -310,6 +313,7 @@ namespace ignition
typedef Line2<int> Line2i;
typedef Line2<double> Line2d;
typedef Line2<float> Line2f;
}
}
}
#endif
4 changes: 4 additions & 0 deletions include/ignition/math/Line3.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@

#include <algorithm>
#include <ignition/math/Vector3.hh>
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
/// \class Line3 Line3.hh ignition/math/Line3.hh
/// \brief A three dimensional line segment. The line is defined by a
/// start and end point.
Expand Down Expand Up @@ -383,6 +386,7 @@ namespace ignition
typedef Line3<int> Line3i;
typedef Line3<double> Line3d;
typedef Line3<float> Line3f;
}
}
}
#endif
4 changes: 4 additions & 0 deletions include/ignition/math/MassMatrix3.hh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@
#include "ignition/math/Vector2.hh"
#include "ignition/math/Vector3.hh"
#include "ignition/math/Matrix3.hh"
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
/// \class MassMatrix3 MassMatrix3.hh ignition/math/MassMatrix3.hh
/// \brief A class for inertial information about a rigid body
/// consisting of the scalar mass and a 3x3 symmetric moment
Expand Down Expand Up @@ -899,6 +902,7 @@ namespace ignition

typedef MassMatrix3<double> MassMatrix3d;
typedef MassMatrix3<float> MassMatrix3f;
}
}
}
#endif
4 changes: 4 additions & 0 deletions include/ignition/math/Matrix3.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@
#include <ignition/math/Helpers.hh>
#include <ignition/math/Vector3.hh>
#include <ignition/math/Quaternion.hh>
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
template <typename T> class Quaternion;

/// \class Matrix3 Matrix3.hh ignition/math/Matrix3.hh
Expand Down Expand Up @@ -538,6 +541,7 @@ namespace ignition
typedef Matrix3<int> Matrix3i;
typedef Matrix3<double> Matrix3d;
typedef Matrix3<float> Matrix3f;
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions include/ignition/math/Matrix4.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@
#include <ignition/math/Matrix3.hh>
#include <ignition/math/Vector3.hh>
#include <ignition/math/Pose3.hh>
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
/// \class Matrix4 Matrix4.hh ignition/math/Matrix4.hh
/// \brief A 4x4 matrix class
template<typename T>
Expand Down Expand Up @@ -885,6 +888,7 @@ namespace ignition
typedef Matrix4<int> Matrix4i;
typedef Matrix4<double> Matrix4d;
typedef Matrix4<float> Matrix4f;
}
}
}
#endif
4 changes: 4 additions & 0 deletions include/ignition/math/OrientedBox.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@
#include <ignition/math/Matrix4.hh>
#include <ignition/math/Pose3.hh>
#include <ignition/math/Vector3.hh>
#include <ignition/math/config.hh>

namespace ignition
{
namespace math
{
inline namespace IGNITION_MATH_VERSION_NAMESPACE
{
/// \brief Mathematical representation of a box which can be arbitrarily
/// positioned and rotated.
template<typename T>
Expand Down Expand Up @@ -182,6 +185,7 @@ namespace ignition
typedef OrientedBox<int> OrientedBoxi;
typedef OrientedBox<double> OrientedBoxd;
typedef OrientedBox<float> OrientedBoxf;
}
}
}
#endif
Loading

0 comments on commit f002680

Please sign in to comment.