LCOV - code coverage report
Current view: top level - DCPS/XTypes - DynamicDataFactory.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 4 17 23.5 %
Date: 2023-04-30 01:32:43 Functions: 2 7 28.6 %

          Line data    Source code
       1             : /*
       2             :  * Distributed under the OpenDDS License.
       3             :  * See: http://www.opendds.org/license.html
       4             :  */
       5             : 
       6             : #include <DCPS/DdsDcps_pch.h>
       7             : 
       8             : #ifndef OPENDDS_SAFETY_PROFILE
       9             : #  include "DynamicDataFactory.h"
      10             : 
      11             : #  include "DynamicDataImpl.h"
      12             : 
      13             : #include <ace/Singleton.h>
      14             : 
      15             : using namespace OpenDDS::DCPS;
      16             : 
      17             : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
      18             : namespace DDS {
      19             : 
      20           9 : DynamicDataFactory_ptr DynamicDataFactory::get_instance()
      21             : {
      22           9 :   return ACE_Singleton<DynamicDataFactory, ACE_SYNCH_MUTEX>::instance();
      23             : }
      24             : 
      25           9 : DynamicData_ptr DynamicDataFactory::create_data(DynamicType_ptr type)
      26             : {
      27           9 :   return new OpenDDS::XTypes::DynamicDataImpl(type);
      28             : }
      29             : 
      30           0 : DynamicDataFactory_ptr DynamicDataFactory::_duplicate(DynamicDataFactory_ptr obj)
      31             : {
      32           0 :   if (obj) {
      33           0 :     obj->_add_ref();
      34             :   }
      35           0 :   return obj;
      36             : }
      37             : 
      38             : } // namespace DDS
      39             : OPENDDS_END_VERSIONED_NAMESPACE_DECL
      40             : 
      41             : TAO_BEGIN_VERSIONED_NAMESPACE_DECL
      42             : namespace TAO {
      43             : 
      44           0 : DDS::DynamicDataFactory_ptr Objref_Traits<DDS::DynamicDataFactory>::duplicate(DDS::DynamicDataFactory_ptr p)
      45             : {
      46           0 :   return DDS::DynamicDataFactory::_duplicate(p);
      47             : }
      48             : 
      49           0 : void Objref_Traits<DDS::DynamicDataFactory>::release(DDS::DynamicDataFactory_ptr p)
      50             : {
      51           0 :   CORBA::release(p);
      52           0 : }
      53             : 
      54           0 : DDS::DynamicDataFactory_ptr Objref_Traits<DDS::DynamicDataFactory>::nil()
      55             : {
      56           0 :   return static_cast<DDS::DynamicDataFactory_ptr>(0);
      57             : }
      58             : 
      59           0 : CORBA::Boolean Objref_Traits<DDS::DynamicDataFactory>::marshal(
      60             :   const DDS::DynamicDataFactory_ptr, TAO_OutputCDR&)
      61             : {
      62           0 :   return false;
      63             : }
      64             : 
      65             : } // namespace TAO
      66             : TAO_END_VERSIONED_NAMESPACE_DECL
      67             : 
      68             : #endif // OPENDDS_SAFETY_PROFILE

Generated by: LCOV version 1.16