.. _program_listing_file__tmp_ws_src_ros2_planning_system_plansys2_pddl_parser_include_plansys2_pddl_parser_EitherType.h: Program Listing for File EitherType.h ===================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/ros2_planning_system/plansys2_pddl_parser/include/plansys2_pddl_parser/EitherType.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include "plansys2_pddl_parser/Type.h" namespace parser { namespace pddl { class EitherType : public Type { public: EitherType( const std::string & s ) : Type( s ) {} EitherType( const EitherType * t ) : Type( t ) {} std::string getName() const { std::string out = "either"; for ( unsigned i = 0; i < subtypes.size(); ++i ) out += "_" + subtypes[i]->getName(); return out; } void PDDLPrint( std::ostream & s ) const override {} Type * copy() { return new EitherType( this ); } }; } } // namespaces