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 Header Migration : gz-launch #162

Merged
merged 4 commits into from
May 16, 2022
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ set(IGN_CMAKE_VER ${ignition-cmake3_VERSION_MAJOR})
#============================================================================
# Configure the project
#============================================================================
ign_configure_project(VERSION_SUFFIX)
ign_configure_project(
REPLACE_IGNITION_INCLUDE_PATH gz/launch
VERSION_SUFFIX)

#============================================================================
# Set project-specific options
Expand Down
3 changes: 2 additions & 1 deletion include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
add_subdirectory(ignition)
add_subdirectory(gz)
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})
File renamed without changes.
46 changes: 46 additions & 0 deletions include/gz/launch/Plugin.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright (C) 2019 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GZ_LAUNCH_PLUGIN_HH_
#define GZ_LAUNCH_PLUGIN_HH_

#include <tinyxml2.h>
#include <gz/plugin/SpecializedPluginPtr.hh>
#include <gz/launch/Export.hh>

namespace ignition
{
namespace launch
{
// Inline bracket to help doxygen filtering.
inline namespace IGNITION_LAUNCH_VERSION_NAMESPACE {
/// \brief Base class for launch plugins.
class Plugin
{
/// \brief Load function that each launch plugin must implement.
/// \param[in] _elem Pointer to the XML for this plugin.
/// \return True to keep the plugin alive. Return false to have the
/// plugin unloaded immediately.
public: virtual bool Load(const tinyxml2::XMLElement *_elem) = 0;
};

/// \brief Pointer to a launch plugin.
using PluginPtr = ignition::plugin::SpecializedPluginPtr<
ignition::launch::Plugin>;
}
}
}
#endif
File renamed without changes.
18 changes: 18 additions & 0 deletions include/ignition/launch.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

#include <gz/launch.hh>
18 changes: 18 additions & 0 deletions include/ignition/launch/Export.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

#include <gz/launch/Export.hh>
30 changes: 1 addition & 29 deletions include/ignition/launch/Plugin.hh
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,5 @@
* limitations under the License.
*
*/
#ifndef IGNITION_LAUNCH_PLUGIN_HH_
#define IGNITION_LAUNCH_PLUGIN_HH_

#include <tinyxml2.h>
#include <ignition/plugin/SpecializedPluginPtr.hh>
#include <ignition/launch/Export.hh>

namespace ignition
{
namespace launch
{
// Inline bracket to help doxygen filtering.
inline namespace IGNITION_LAUNCH_VERSION_NAMESPACE {
/// \brief Base class for launch plugins.
class Plugin
{
/// \brief Load function that each launch plugin must implement.
/// \param[in] _elem Pointer to the XML for this plugin.
/// \return True to keep the plugin alive. Return false to have the
/// plugin unloaded immediately.
public: virtual bool Load(const tinyxml2::XMLElement *_elem) = 0;
};

/// \brief Pointer to a launch plugin.
using PluginPtr = ignition::plugin::SpecializedPluginPtr<
ignition::launch::Plugin>;
}
}
}
#endif
#include <gz/launch/Plugin.hh>
18 changes: 18 additions & 0 deletions include/ignition/launch/config.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

#include <gz/launch/config.hh>
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ include_directories (
${PROJECT_BINARY_DIR}/include/
)

configure_file (test_config.hh.in ${PROJECT_BINARY_DIR}/include/gz/launch/test_config.hh)
configure_file (test_config.hh.in ${PROJECT_BINARY_DIR}/include/ignition/launch/test_config.hh)

# Build gtest
Expand Down