Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ign -> gz Namespace migration (narrow) : gz-common #357

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ release will remove the deprecated code.
1. `Submesh::MaterialIndex` is deprecated. `SubMesh::GetMaterialIndex` should
be used instead, which properly handles submeshes having no material index
applied to them.
2. The `ignition` namespace is deprecated and will be removed in future versions. Use `gz` instead.
3. Header files under `ignition/...` are deprecated and will be removed in future versions.
Use `gz/...` instead.

### Additions

Expand Down Expand Up @@ -97,4 +100,3 @@ release will remove the deprecated code.
1. **ignition-cmake**
+ Ignition-math now has a build dependency on ignition-cmake, which
allows cmake scripts to be shared across all the ignition packages.

2 changes: 1 addition & 1 deletion av/include/gz/common/AudioDecoder.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <gz/common/av/Export.hh>
#include <gz/utils/ImplPtr.hh>

namespace ignition
namespace gz
{
namespace common
{
Expand Down
2 changes: 1 addition & 1 deletion av/include/gz/common/HWEncoder.hh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/// This is an internal-use only class encapsulating HW video encoding. All
/// symbols defined here are hidden from the public API.
namespace ignition::common
namespace gz::common
{
/// \brief Representation of a GPU video encoder and its configuration.
/// \note This class is intentionally hidden as it provides highly customized
Expand Down
2 changes: 1 addition & 1 deletion av/include/gz/common/HWVideo.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <gz/common/EnumIface.hh>

namespace ignition::common
namespace gz::common
{
enum class IGNITION_COMMON_AV_VISIBLE HWEncoderType
{
Expand Down
2 changes: 1 addition & 1 deletion av/include/gz/common/Video.hh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct AVFrame;
struct AVPicture;
struct SwsContext;

namespace ignition
namespace gz
{
namespace common
{
Expand Down
2 changes: 1 addition & 1 deletion av/include/gz/common/VideoEncoder.hh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#define VIDEO_ENCODER_FPS_DEFAULT 25
#define VIDEO_ENCODER_FORMAT_DEFAULT "mp4"

namespace ignition
namespace gz
{
namespace common
{
Expand Down
2 changes: 1 addition & 1 deletion av/include/gz/common/av/Util.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifndef GZ_COMMON_AV_UTIL_HH_
#define GZ_COMMON_AV_UTIL_HH_

namespace ignition
namespace gz
{
namespace common
{
Expand Down
2 changes: 1 addition & 1 deletion av/include/gz/common/ffmpeg_inc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extern "C" {

#include <gz/common/av/Export.hh>

namespace ignition
namespace gz
{
namespace common
{
Expand Down
1 change: 1 addition & 0 deletions av/include/ignition/common/AudioDecoder.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/common/AudioDecoder.hh>
#include <ignition/common/config.hh>
1 change: 1 addition & 0 deletions av/include/ignition/common/HWEncoder.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/common/HWEncoder.hh>
#include <ignition/common/config.hh>
1 change: 1 addition & 0 deletions av/include/ignition/common/HWVideo.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/common/HWVideo.hh>
#include <ignition/common/config.hh>
1 change: 1 addition & 0 deletions av/include/ignition/common/Video.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/common/Video.hh>
#include <ignition/common/config.hh>
1 change: 1 addition & 0 deletions av/include/ignition/common/VideoEncoder.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/common/VideoEncoder.hh>
#include <ignition/common/config.hh>
1 change: 1 addition & 0 deletions av/include/ignition/common/av.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/common/av.hh>
#include <ignition/common/config.hh>
1 change: 1 addition & 0 deletions av/include/ignition/common/av/Export.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/common/av/Export.hh>
#include <ignition/common/config.hh>
1 change: 1 addition & 0 deletions av/include/ignition/common/av/Util.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/common/av/Util.hh>
#include <ignition/common/config.hh>
1 change: 1 addition & 0 deletions av/include/ignition/common/av/detail/Export.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/common/av/detail/Export.hh>
#include <ignition/common/config.hh>
1 change: 1 addition & 0 deletions av/include/ignition/common/ffmpeg_inc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/common/ffmpeg_inc.hh>
#include <ignition/common/config.hh>
10 changes: 5 additions & 5 deletions av/src/AudioDecoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#define AUDIO_INBUF_SIZE (20480 * 2)
#define AUDIO_REFILL_THRESH 4096

using namespace ignition;
using namespace gz;
using namespace common;

class ignition::common::AudioDecoder::Implementation
class gz::common::AudioDecoder::Implementation
{
/// \brief Destructor
public: ~Implementation();
Expand All @@ -48,7 +48,7 @@ class ignition::common::AudioDecoder::Implementation
};

/////////////////////////////////////////////////
ignition::common::AudioDecoder::Implementation::~Implementation()
gz::common::AudioDecoder::Implementation::~Implementation()
{
// Close the codec
if (this->codecCtx)
Expand All @@ -61,9 +61,9 @@ ignition::common::AudioDecoder::Implementation::~Implementation()

/////////////////////////////////////////////////
AudioDecoder::AudioDecoder()
: dataPtr(ignition::utils::MakeUniqueImpl<Implementation>())
: dataPtr(gz::utils::MakeUniqueImpl<Implementation>())
{
ignition::common::load();
gz::common::load();
}

/////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion av/src/AudioDecoder_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <ignition/utils/ExtraTestMacros.hh>
#include <ignition/common/testing/TestPaths.hh>

using namespace ignition;
using namespace gz;

/////////////////////////////////////////////////
TEST(AudioDecoder, FileNotSet)
Expand Down
6 changes: 3 additions & 3 deletions av/src/HWEncoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
#include "ignition/common/StringUtils.hh"
#include "ignition/common/Console.hh"

using namespace ignition;
using namespace gz;
using namespace common;
using namespace std;

class ignition::common::HWEncoder::Implementation
class gz::common::HWEncoder::Implementation
{
/// \brief Device reference for HW-accelerated encoding.
public: AVBufferRef* hwDevice = nullptr;
Expand Down Expand Up @@ -679,7 +679,7 @@ AVFrame* HWEncoder::GetFrameForEncoder(AVFrame* _inFrame)
HWEncoder::HWEncoder(const FlagSet<HWEncoderType> _allowedHwEncoders,
const std::string& _hwAccelDevice,
std::optional<bool> _useHwSurface)
: dataPtr(ignition::utils::MakeUniqueImpl<Implementation>())
: dataPtr(gz::utils::MakeUniqueImpl<Implementation>())
{
this->dataPtr->initHwEncoders = _allowedHwEncoders;
this->dataPtr->initHwDevice = _hwAccelDevice;
Expand Down
2 changes: 1 addition & 1 deletion av/src/Util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void logCallback(void *_ptr, int _level, const char *_fmt, va_list _args)
}

/////////////////////////////////////////////////
void ignition::common::load()
void gz::common::load()
{
static bool first = true;
if (first)
Expand Down
8 changes: 4 additions & 4 deletions av/src/Video.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#include "ignition/common/Video.hh"
#include "ignition/common/av/Util.hh"

using namespace ignition;
using namespace gz;
using namespace common;

// Private data structure for the Video class
class ignition::common::Video::Implementation
class gz::common::Video::Implementation
{
/// \brief libav Format I/O context
public: AVFormatContext *formatCtx = nullptr;
Expand Down Expand Up @@ -61,10 +61,10 @@ class ignition::common::Video::Implementation

/////////////////////////////////////////////////
Video::Video()
: dataPtr(ignition::utils::MakeUniqueImpl<Implementation>())
: dataPtr(gz::utils::MakeUniqueImpl<Implementation>())
{
// Make sure libav is loaded.
ignition::common::load();
gz::common::load();
}

/////////////////////////////////////////////////
Expand Down
8 changes: 4 additions & 4 deletions av/src/VideoEncoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
#include "ignition/common/HWEncoder.hh"
#endif

using namespace ignition;
using namespace gz;
using namespace common;
using namespace std;

// Private data class
// hidden visibility specifier has to be explicitly set to silent a gcc warning
class IGNITION_COMMON_AV_HIDDEN ignition::common::VideoEncoder::Implementation
class IGNITION_COMMON_AV_HIDDEN gz::common::VideoEncoder::Implementation
{
/// \brief Name of the file which stores the video while it is being
/// recorded.
Expand Down Expand Up @@ -144,10 +144,10 @@ AVFrame* VideoEncoder::Implementation::GetFrameForEncoder(AVFrame* _inFrame)

/////////////////////////////////////////////////
VideoEncoder::VideoEncoder()
: dataPtr(ignition::utils::MakeUniqueImpl<Implementation>())
: dataPtr(gz::utils::MakeUniqueImpl<Implementation>())
{
// Make sure libav is loaded.
ignition::common::load();
gz::common::load();
}

/////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions av/src/VideoEncoder_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "ignition/common/testing/AutoLogFixture.hh"
#include "ignition/common/testing/TestPaths.hh"

using namespace ignition;
using namespace gz;
using namespace common;

class VideoEncoderTest : public common::testing::AutoLogFixture
Expand All @@ -34,7 +34,7 @@ class VideoEncoderTest : public common::testing::AutoLogFixture
ASSERT_TRUE(tempDir->Valid()) << tempDir->Path();
}

public: std::shared_ptr<ignition::common::TempDirectory> tempDir;
public: std::shared_ptr<gz::common::TempDirectory> tempDir;
};

/////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion av/src/ffmpeg_inc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
#include "ignition/common/ffmpeg_inc.hh"

using namespace ignition;
using namespace gz;

//////////////////////////////////////////////////
AVFrame *common::AVFrameAlloc(void)
Expand Down
2 changes: 1 addition & 1 deletion events/include/gz/common/Event.hh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <gz/common/events/Export.hh>
#include <gz/common/events/Types.hh>

namespace ignition
namespace gz
{
namespace common
{
Expand Down
2 changes: 1 addition & 1 deletion events/include/gz/common/KeyEvent.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <gz/common/events/Export.hh>
#include <gz/utils/SuppressWarning.hh>

namespace ignition
namespace gz
{
namespace common
{
Expand Down
18 changes: 9 additions & 9 deletions events/include/gz/common/MouseEvent.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <gz/common/events/Export.hh>
#include <gz/utils/SuppressWarning.hh>

namespace ignition
namespace gz
{
namespace common
{
Expand Down Expand Up @@ -81,11 +81,11 @@ namespace ignition

/// \brief Get mouse pointer position on the screen.
/// \return Mouse pointer position on the screen.
public: ignition::math::Vector2i Pos() const;
public: gz::math::Vector2i Pos() const;

/// \brief Set mouse pointer position on the screen.
/// \param[in] _pos Mouse pointer position on the screen.
public: void SetPos(const ignition::math::Vector2i &_pos);
public: void SetPos(const gz::math::Vector2i &_pos);

/// \brief Set mouse pointer position on the screen.
/// \param[in] _x Mouse pointer X position on the screen.
Expand All @@ -94,11 +94,11 @@ namespace ignition

/// \brief Get the previous position.
/// \return The previous mouse position.
public: ignition::math::Vector2i PrevPos() const;
public: gz::math::Vector2i PrevPos() const;

/// \brief Set the previous position.
/// \param[in] _pos Previous mouse pointer position on the screen.
public: void SetPrevPos(const ignition::math::Vector2i &_pos);
public: void SetPrevPos(const gz::math::Vector2i &_pos);

/// \brief Set the previous position.
/// \param[in] _x Previous mouse pointer X position on the screen.
Expand All @@ -107,11 +107,11 @@ namespace ignition

/// \brief Get the position of button press.
/// \return Screen position of a button press.
public: ignition::math::Vector2i PressPos() const;
public: gz::math::Vector2i PressPos() const;

/// \brief Set the position of button press.
/// \param[in] _pos Mouse pointer position on the screen.
public: void SetPressPos(const ignition::math::Vector2i &_pos);
public: void SetPressPos(const gz::math::Vector2i &_pos);

/// \brief Set the position of button press.
/// \param[in] _x Mouse pointer X position on the screen.
Expand All @@ -120,11 +120,11 @@ namespace ignition

/// \brief Get the scroll position.
/// \return The scroll position.
public: ignition::math::Vector2i Scroll() const;
public: gz::math::Vector2i Scroll() const;

/// \brief Set the scroll position.
/// \param[in] _scroll Scroll position.
public: void SetScroll(const ignition::math::Vector2i &_scroll);
public: void SetScroll(const gz::math::Vector2i &_scroll);

/// \brief Set the scroll position.
/// \param[in] _x Scroll X position.
Expand Down
2 changes: 1 addition & 1 deletion events/include/gz/common/events/Types.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <memory>

// This header contains forward declarations for some event types
namespace ignition
namespace gz
{
namespace common
{
Expand Down
1 change: 1 addition & 0 deletions events/include/ignition/common/Event.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/common/Event.hh>
#include <ignition/common/config.hh>
1 change: 1 addition & 0 deletions events/include/ignition/common/KeyEvent.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/common/KeyEvent.hh>
#include <ignition/common/config.hh>
1 change: 1 addition & 0 deletions events/include/ignition/common/MouseEvent.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/common/MouseEvent.hh>
#include <ignition/common/config.hh>
1 change: 1 addition & 0 deletions events/include/ignition/common/events.hh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
*/

#include <gz/common/events.hh>
#include <ignition/common/config.hh>
Loading