.. _program_listing_file__tmp_ws_src_ros2_planning_system_plansys2_core_include_plansys2_core_Types.hpp: Program Listing for File Types.hpp ================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/ros2_planning_system/plansys2_core/include/plansys2_core/Types.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // Copyright 2019 Intelligent Robotics Lab // // 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 PLANSYS2_CORE__TYPES_HPP_ #define PLANSYS2_CORE__TYPES_HPP_ #include #include #include "plansys2_msgs/msg/node.hpp" #include "plansys2_msgs/msg/param.hpp" #include "plansys2_msgs/msg/tree.hpp" #include "plansys2_pddl_parser/Utils.h" namespace plansys2 { class Instance : public plansys2_msgs::msg::Param { public: Instance() : plansys2_msgs::msg::Param() {} explicit Instance(const std::string & name, const std::string & type = {}) : plansys2_msgs::msg::Param(parser::pddl::fromStringParam(name, type)) {} Instance(const plansys2_msgs::msg::Param & instance) // NOLINT(runtime/explicit) : plansys2_msgs::msg::Param(instance) {} }; class Predicate : public plansys2_msgs::msg::Node { public: Predicate() : plansys2_msgs::msg::Node() {} explicit Predicate(const std::string & pred) : plansys2_msgs::msg::Node(parser::pddl::fromStringPredicate(pred)) {} Predicate(const plansys2_msgs::msg::Node & pred) // NOLINT(runtime/explicit) : plansys2_msgs::msg::Node(pred) {} }; class Function : public plansys2_msgs::msg::Node { public: Function() : plansys2_msgs::msg::Node() {} explicit Function(const std::string & func) : plansys2_msgs::msg::Node(parser::pddl::fromStringFunction(func)) {} Function(const plansys2_msgs::msg::Node & func) // NOLINT(runtime/explicit) : plansys2_msgs::msg::Node(func) {} }; class Goal : public plansys2_msgs::msg::Tree { public: Goal() : plansys2_msgs::msg::Tree() {} explicit Goal(const std::string & goal) : plansys2_msgs::msg::Tree(parser::pddl::fromString(goal)) {} Goal(const plansys2_msgs::msg::Tree & goal) // NOLINT(runtime/explicit) : plansys2_msgs::msg::Tree(goal) {} }; template std::vector convertVector(const std::vector & in_vector) { std::vector ret; for (const auto & item : in_vector) { ret.push_back(item); } return ret; } } // namespace plansys2 #endif // PLANSYS2_CORE__TYPES_HPP_