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