1. pragma Ada_2012; 
  2. --  (c) Copyright, Real-Time Innovations 2018 
  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. --  <internal> 
  12. --  The default implementation for these methods does almost nothing and 
  13. --  returns the ref error code by default, signaling the type does not 
  14. --  support zero copy operations. 
  15. -- 
  16. --  For actual zero copy types, the generated type support code will define 
  17. --  and implement a subclass of DDS.MetpTypeSupport.Ref overriding 
  18. --  these methods and using the real METP routines from the C library. This 
  19. --  subclass will be used as part of the type traits. 
  20. --  </internal> 
  21.  
  22. pragma Ada_2012; 
  23.  
  24. with System; 
  25. limited with dds.DataReader; 
  26. limited with dds.DataWriter; 
  27. package DDS.MetpTypeSupport is 
  28.  
  29.    type Ref is limited interface; 
  30.    type Ref_Access is access all Ref'Class; 
  31.  
  32.    function Metp_Supported (This : Ref) return Standard.Boolean is abstract; 
  33.  
  34.    procedure DataWriter_Create_Metp_Data 
  35.      (This            : Ref; 
  36.       Writer          : access DDS.DataWriter.Ref'class; 
  37.       Sample          : out System.Address; 
  38.       Initialize_Data : out Standard.Boolean) is abstract; 
  39.  
  40.    procedure DataWriter_Delete_Metp_Data 
  41.      (This   : Ref; 
  42.       Writer : access DDS.DataWriter.Ref'class; 
  43.       Sample : System.Address)  is abstract; 
  44.  
  45.    function DataWriter_Is_Metp_Writer 
  46.      (This   : Ref; 
  47.       Writer : access DDS.DataWriter.Ref'class) return Standard.Boolean is abstract; 
  48.  
  49.    procedure DataWriter_Write_Metp_Data 
  50.      (This     : Ref; 
  51.       Writer   : access DDS.DataWriter.Ref'class; 
  52.       Sample   : System.Address; 
  53.       Handle   : DDS.InstanceHandle_T_Access; 
  54.       W_Params : DDS.WriteParams_T_Access) is abstract; 
  55.  
  56.    function DataReader_Is_Metp_Data_Consistent 
  57.      (This        : Ref; 
  58.       Reader      : access DDS.DataReader.Ref'Class; 
  59.       Sample      : System.Address; 
  60.       Sample_Info : DDS.SampleInfo_Access) return  Standard.Boolean is abstract; 
  61.  
  62. end DDS.MetpTypeSupport;