LCOV - code coverage report
Current view: top level - DCPS/XTypes - MemberDescriptorImpl.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 12 12 100.0 %
Date: 2023-04-30 01:32:43 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #ifndef OPENDDS_DCPS_XTYPES_MEMBER_DESCRIPTOR_IMPL_H
       2             : #define OPENDDS_DCPS_XTYPES_MEMBER_DESCRIPTOR_IMPL_H
       3             : 
       4             : #ifndef OPENDDS_SAFETY_PROFILE
       5             : 
       6             : #include "TypeObject.h"
       7             : 
       8             : #include <dds/DCPS/RcObject.h>
       9             : #include <dds/DCPS/RcHandle_T.h>
      10             : #include <dds/DdsDynamicDataC.h>
      11             : 
      12             : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
      13             : namespace OpenDDS {
      14             : namespace XTypes {
      15             : 
      16             : class OpenDDS_Dcps_Export MemberDescriptorImpl
      17             :   : public virtual OBV_DDS::MemberDescriptor
      18             :   , public virtual CORBA::DefaultValueRefCountBase
      19             : {
      20             : public:
      21             :   MemberDescriptorImpl();
      22             :   ~MemberDescriptorImpl();
      23          10 :   MemberDescriptorImpl(const char* a_name, bool a_is_key)
      24          10 :   {
      25          10 :     name(a_name);
      26          10 :     id(0);
      27          10 :     index(0);
      28          10 :     try_construct_kind(DDS::USE_DEFAULT);
      29          10 :     is_key(a_is_key);
      30          10 :     is_optional(false);
      31          10 :     is_must_understand(false);
      32          10 :     is_shared(false);
      33          10 :     is_default_label(false);
      34          10 :   }
      35             : 
      36             :   bool equals(DDS::MemberDescriptor* other);
      37             :   DDS::ReturnCode_t copy_from(DDS::MemberDescriptor*);
      38             :   ::CORBA::Boolean is_consistent();
      39             : 
      40             :   CORBA::ValueBase* _copy_value();
      41             :   CORBA::TypeCode_ptr _tao_type() const;
      42             : 
      43             : private:
      44             :   ::CORBA::Boolean _tao_marshal__DDS_MemberDescriptor(TAO_OutputCDR &, TAO_ChunkInfo &) const;
      45             :   ::CORBA::Boolean _tao_unmarshal__DDS_MemberDescriptor(TAO_InputCDR &, TAO_ChunkInfo &);
      46             : };
      47             : 
      48             : typedef std::pair<const DDS::DynamicType*, const DDS::DynamicType*> DynamicTypePtrPair;
      49             : typedef OPENDDS_SET(DynamicTypePtrPair) DynamicTypePtrPairSeen;
      50             : 
      51             : bool test_equality(DDS::MemberDescriptor* lhs, DDS::MemberDescriptor* rhs, DynamicTypePtrPairSeen& dt_ptr_pair);
      52             : 
      53             : } // namespace XTypes
      54             : } // namespace OpenDDS
      55             : 
      56             : OPENDDS_END_VERSIONED_NAMESPACE_DECL
      57             : 
      58             : #else
      59             : 
      60             : namespace DDS {
      61             : 
      62             : class MemberDescriptor {
      63             : public:
      64             :   // a_name should be shallow-copyable, e.g., a string literal.
      65             :   MemberDescriptor(const char* a_name, bool a_is_key)
      66             :     : name_(a_name)
      67             :     , is_key_(a_is_key)
      68             :   { }
      69             : 
      70             :   const char* name() const { return name_; }
      71             :   bool is_key() const { return is_key_; }
      72             : 
      73             : private:
      74             :   const char* name_;
      75             :   bool is_key_;
      76             : };
      77             : 
      78             : }
      79             : 
      80             : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
      81             : 
      82             : namespace OpenDDS {
      83             : namespace XTypes {
      84             : 
      85             : typedef DDS::MemberDescriptor MemberDescriptorImpl;
      86             : 
      87             : } // namespace XTypes
      88             : } // namespace OpenDDS
      89             : 
      90             : OPENDDS_END_VERSIONED_NAMESPACE_DECL
      91             : 
      92             : #endif // OPENDDS_SAFETY_PROFILE
      93             : 
      94             : #endif  /* OPENDDS_DCPS_XTYPES_MEMBER_DESCRIPTOR_IMPL_H */

Generated by: LCOV version 1.16