.. _program_listing_file__tmp_ws_src_fastrtps_include_fastdds_dds_core_status_StatusMask.hpp: Program Listing for File StatusMask.hpp ======================================= |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/fastrtps/include/fastdds/dds/core/status/StatusMask.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* * Copyright 2010, Object Management Group, Inc. * Copyright 2010, PrismTech, Corp. * Copyright 2010, Real-Time Innovations, Inc. * Copyright 2019, Proyectos y Sistemas de Mantenimiento SL (eProsima). * All rights reserved. * * 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 _FASTDDS_STATUSMASK_HPP_ #define _FASTDDS_STATUSMASK_HPP_ #include #include #include #define FASTDDS_STATUS_COUNT size_t(16) namespace eprosima { namespace fastdds { namespace dds { class RTPS_DllAPI StatusMask : public std::bitset { public: typedef std::bitset MaskType; StatusMask() : std::bitset() { } explicit StatusMask( uint32_t mask) : std::bitset(mask) { } inline StatusMask& operator <<( const StatusMask& mask) { *this |= mask; return *this; } inline StatusMask& operator >>( const StatusMask& mask) { *this &= ~mask; return *this; } inline static StatusMask all() { return StatusMask(0x80007fe7u); } inline static StatusMask none() { return StatusMask(0u); } public: inline static StatusMask inconsistent_topic() { return StatusMask(0x00000001 << 0u); } inline static StatusMask offered_deadline_missed() { return StatusMask(0x00000001 << 1u); } inline static StatusMask requested_deadline_missed() { return StatusMask(0x00000001 << 2u); } inline static StatusMask offered_incompatible_qos() { return StatusMask(0x00000001 << 5u); } inline static StatusMask requested_incompatible_qos() { return StatusMask(0x00000001 << 6u); } inline static StatusMask sample_lost() { return StatusMask(0x00000001 << 7u); } inline static StatusMask sample_rejected() { return StatusMask(0x00000001 << 8u); } inline static StatusMask data_on_readers() { return StatusMask(0x00000001 << 9u); } inline static StatusMask data_available() { return StatusMask(0x00000001 << 10u); } inline static StatusMask liveliness_lost() { return StatusMask(0x00000001 << 11u); } inline static StatusMask liveliness_changed() { return StatusMask(0x00000001 << 12u); } inline static StatusMask publication_matched() { return StatusMask(0x00000001 << 13u); } inline static StatusMask subscription_matched() { return StatusMask(0x00000001 << 14u); } bool is_active( StatusMask status) const { MaskType r = *this & status; return r == status; } }; } //namespace dds } //namespace fastdds } //namespace eprosima #endif //_FASTDDS_STATUSMASK_HPP_