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.DataReaderListener; 
  13. with DDS.DataReader; 
  14. with DDS.Entity_Impl; 
  15. with DDS.TypeSupport_Impl; 
  16. with DDS.TopicDescription; use DDS.TopicDescription; 
  17. limited with DDS.DomainParticipant; 
  18. with RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h; use RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h; 
  19. with Ada.Unchecked_Deallocation; 
  20. package DDS.TopicDescription_Impl is 
  21.  
  22.    type Ref is limited new DDS.Entity_Impl.Ref and DDS.TopicDescription.Ref with private; 
  23.    type Ref_Access is access all Ref'Class; 
  24.  
  25.  
  26.    function Get_Type_Name 
  27.      (Self : not null access Ref) 
  28.       return DDS.String; 
  29.  
  30.    function Get_Name 
  31.      (Self : not null access Ref) 
  32.       return DDS.String; 
  33.  
  34.    function Get_Participant 
  35.      (Self : not null access Ref) 
  36.      return access DDS.DomainParticipant.Ref'Class; 
  37.  
  38.    function CreateI (Wrapper : not null access RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h.DDS_Topic) 
  39.                      return DDS.TopicDescription_Impl.Ref_Access; 
  40.  
  41.    function create_datareaderI 
  42.      (self               : not null access Ref; 
  43.       l                  : Integer; 
  44.       datareaderlistener : DDS.DataReaderListener.Ref_Access; 
  45.       i                  : Integer) return DDS.DataReader.Ref_Access; 
  46.  
  47.    function get_data_type (self : not null access Ref) return DDS.TypeSupport_Impl.Ref_Access; 
  48.  
  49.    function Get_Native_Topic_Wrapper (Self : not null access Ref) return access RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h.DDS_Topic; 
  50.  
  51.    procedure Set_Native_ContentFilteredTopic_Wrapper (Self : not null access Ref; CFTopic_W : access RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h.DDS_ContentFilteredTopic); 
  52.  
  53.    function Get_Native_ContentFilteredTopic_Wrapper (Self : not null access Ref) return access RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h.DDS_ContentFilteredTopic; 
  54.  
  55.    procedure Free (This : in out Ref_Access); 
  56.  
  57.    type DDS_TopicDescription_Access is access all DDS_TopicDescription with Storage_Size => 0; 
  58.  
  59.  
  60.    function GetInterface 
  61.      (Self : not null access Ref) 
  62.       return DDS_TopicDescription_Access; 
  63.    procedure SetInterface (Self : not null access Ref; To : DDS_TopicDescription_Access); 
  64.  
  65.    function GetInterface 
  66.      (Self : not null access constant Ref) 
  67.       return System.Address; 
  68.    procedure SetInterface (Self : not null access Ref; To : System.Address); 
  69.  
  70. private 
  71.    type Ref is limited new DDS.Entity_Impl.Ref and DDS.TopicDescription.Ref  with record 
  72.       Native_Topic_Wrapper : access RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h.DDS_Topic; 
  73.       Native_ContentFilteredTopic_Wrapper : access RTIDDS.Low_Level.ndds_dds_c_dds_c_topic_h.DDS_ContentFilteredTopic; 
  74.    end record; 
  75.  
  76.    procedure Free_Impl is new Ada.Unchecked_Deallocation (Ref'Class, Ref_Access); 
  77.    procedure Free (This : in out Ref_Access) renames Free_Impl; 
  78. end DDS.TopicDescription_Impl;