1. pragma Ada_2012; 
  2. --  (c) Copyright, Real-Time Innovations, $Date:: 2012-02-16 #$ 
  3. --  All rights reserved. 
  4. -- 
  5. --  No duplications, whole or partial, manual or electronic, may be made 
  6. --  without express written permission.  Any such copies, or 
  7. --  revisions thereof, must display this notice unaltered. 
  8. --  This code contains trade secrets of Real-Time Innovations, Inc. 
  9.  
  10.  
  11.  
  12. with DDS.Domain_Entity_Impl; 
  13. with DDS.TypeSupport_Impl; 
  14. with DDS.DataReader; 
  15. with DDS.DataReaderListener; 
  16.  
  17. with DDS.Topic; 
  18. with DDS.TopicListener; 
  19. with DDS.TopicDescription; 
  20. with DDS.TopicDescription_Impl; 
  21.  
  22. with DDS.DomainParticipant; 
  23.  
  24. with Ada.Unchecked_Deallocation; 
  25. with RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h; use RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h; 
  26. with DDS.StatusCondition; 
  27. with RTIDDS.Low_Level.ndds_reda_reda_worker_impl_h; 
  28.  
  29. package DDS.Topic_Impl is 
  30.  
  31.    type Ref is limited new DDS.TopicDescription_Impl.Ref and DDS.Topic.Ref with private; 
  32.    type Ref_Access is access all Ref'Class; 
  33.  
  34.    procedure Set_Qos 
  35.      (Self : not null access Ref; 
  36.       Qos  : in DDS.TopicQos); 
  37.  
  38.    procedure Set_Qos_With_Profile 
  39.      (Self : not null access Ref; 
  40.       library_name  : in String; 
  41.       profile_name  : in String); 
  42.    procedure Set_Qos_With_Profile 
  43.      (Self : not null access Ref; 
  44.       library_name  : in Standard.String; 
  45.       profile_name  : in Standard.String); 
  46.  
  47.    procedure Get_Qos 
  48.      (Self : not null access Ref; 
  49.       Qos  : in out DDS.TopicQos); 
  50.  
  51.    procedure Set_Listener 
  52.      (Self       : not null access Ref; 
  53.       A_Listener : in DDS.TopicListener.Ref_Access; 
  54.       Mask       : in DDS.StatusMask); 
  55.  
  56.    function Get_Listener 
  57.      (Self : not null access Ref) 
  58.       return DDS.TopicListener.Ref_Access; 
  59.  
  60.    procedure Get_Inconsistent_Topic_Status 
  61.      (Self   : not null access Ref; 
  62.       Status : in out DDS.InconsistentTopicStatus); 
  63.  
  64.    function Get_Type_Name 
  65.      (Self : not null access Ref) 
  66.       return DDS.String; 
  67.  
  68.    function Get_Name 
  69.      (Self : not null access Ref) 
  70.       return DDS.String; 
  71.  
  72.    function Get_Participant 
  73.      (Self : not null access Ref) 
  74.      return access DDS.DomainParticipant.Ref'Class; 
  75.  
  76.    --  ----------------------------------------------------------------------- 
  77.    -- 
  78.    --  ----------------------------------------------------------------------- 
  79.    function As_TopicDescription_Impl_I 
  80.      (Self : not null access Ref) 
  81.       return access DDS.TopicDescription_Impl.Ref; 
  82.  
  83.    function As_TopicDescription_I 
  84.      (Self : not null access Ref) 
  85.       return DDS.TopicDescription.Ref_Access; 
  86.  
  87.  
  88.    function Get_FacadeI (C_TopicW : access RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h.DDS_Topic) 
  89.                          return Ref_Access; 
  90.  
  91.    function CreateI 
  92.      (Participant   : DDS.DomainParticipant.Ref_Access; 
  93.       Topic_Name    : in DDS.String; 
  94.       Type_Name     : in DDS.String; 
  95.       Qos           : in DDS.TopicQos; 
  96.       A_Listener    : in DDS.TopicListener.Ref_Access; 
  97.       Mask          : in DDS.StatusMask) 
  98.       return DDS.Topic.Ref_Access; 
  99.  
  100.    function Create_WrapperI 
  101.      (C_TopicW : access RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h.DDS_Topic) 
  102.       return DDS.Topic_Impl.Ref_Access; 
  103.  
  104.    function Create_ReferenceI (C_TopicW : access RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h.DDS_Topic) 
  105.                                return Ref_Access; 
  106.  
  107.    function TW_As_TopicDescription_I (Self : not null access Ref) 
  108.                                       return access DDS_TopicDescription; 
  109.  
  110.    function TW_As_Entity_I (Self : not null access Ref) 
  111.                             return access RTIDDS.Low_Level.ndds_dds_c_dds_c_infrastructure_h.DDS_Entity; 
  112.  
  113.    function TW_As_Impl_I (Self : not null access Ref) 
  114.                           return access DDS_TopicImpl; 
  115.  
  116.    function As_TopicWrapper_I (Self : not null access Ref) 
  117.                                return  access RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h.DDS_Topic; 
  118.  
  119.    function Get_StatusCondition (Self : not null access Ref) return 
  120.      DDS.StatusCondition.Ref_Access; 
  121.  
  122.    function Get_Status_Changes (Self : not null access Ref) return 
  123.      DDS.StatusMask; 
  124.  
  125.    function Get_Instance_Handle (Self : not null access Ref) return 
  126.      DDS.InstanceHandle_T; 
  127.  
  128.    function create_datareaderI 
  129.      (self               : not null access Ref; 
  130.       l                  : Integer; 
  131.       datareaderlistener : DDS.DataReaderListener.Ref_Access; 
  132.       i                  : Integer) return DDS.DataReader.Ref_Access; 
  133.  
  134.    function get_data_type (self : not null access Ref) return DDS.TypeSupport_Impl.Ref_Access; 
  135.  
  136.    procedure Free (This : in out Ref_Access); 
  137.  
  138.    procedure Finalize_Callback 
  139.      (arg1 : System.Address; 
  140.       arg2 : System.Address; 
  141.       arg3 : access RTIDDS.Low_Level.ndds_reda_reda_worker_impl_h.REDAWorker); 
  142.    pragma Convention (C, Finalize_Callback); 
  143.    function As_TopicDescription 
  144.      (Self : not null access Ref) 
  145.       return DDS.TopicDescription.Ref_Access; 
  146.  
  147. private 
  148.    type Ref is limited new DDS.TopicDescription_Impl.Ref and DDS.Topic.Ref with record 
  149.       C_Topic : access RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h.DDS_Topic; 
  150.       TD_Impl : DDS.TopicDescription_Impl.Ref_Access; 
  151.       Available_References : Standard.Integer; 
  152.    end record; 
  153.  
  154.    procedure Free_Impl is new Ada.Unchecked_Deallocation (Ref'Class, Ref_Access); 
  155.    procedure Free_Mem (This : in out Ref_Access) renames Free_Impl; 
  156. end DDS.Topic_Impl;