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.Condition; 
  12. with DDS.GuardCondition_Impl; 
  13.  
  14. --  <dref>GuardCondition</dref> 
  15. package DDS.GuardCondition is 
  16.  
  17.    --  Detailed Description 
  18.    --  A specific DDSCondition whose trigger_value is completely under the control of the application. 
  19.    --  The DDS.GuardCondition provides a way for an application to manually wake up a DDS.WaitSet. 
  20.    --  This is accomplished by attaching the DDS.GuardCondition to the DDS.SWaitSet and then 
  21.    --  setting the trigger_value by means of the DDS.GuardCondition.set_trigger_value operation. 
  22.    -- 
  23.    --  See also: 
  24.    --      DDS.WaitSet 
  25.  
  26.    type Ref is limited new Ada.Finalization.Limited_Controlled and DDS.Condition.Ref with private; 
  27.    --  <dref>GuardCondition_new</dref> 
  28.  
  29.    type Ref_Access is access all Ref'Class; 
  30.  
  31.    procedure Initialize 
  32.      (Self : in out Ref); 
  33.  
  34.    procedure Adjust 
  35.      (Self : in out Ref); 
  36.  
  37.    procedure Finalize 
  38.      (Self : in out Ref); 
  39.  
  40.    procedure Set_Trigger_Value 
  41.      (Self  : access Ref; 
  42.       Value : DDS.Boolean); 
  43.    --  <dref>GuardCondition_set_trigger_value</dref> 
  44.    --  <internal> 
  45.    --  Set the guard condition trigger value. 
  46.    --  </internal> 
  47.  
  48.    function Get_Trigger_Value 
  49.      (Self : access Ref) return DDS.Boolean; 
  50.    --  <internal> 
  51.    --  Returns the trigger value. 
  52.    --  </internal> 
  53.  
  54.    function Get_Impl_ConditionI 
  55.      (Self : access Ref) return DDS.GuardCondition_Impl.Ref_Access; 
  56.  
  57.    procedure Free (This : in out Ref_Access); 
  58.    --  <dref>GuardCondition_delete</dref> 
  59.  
  60.    function "=" (L : GuardCondition.Ref_Access; 
  61.                  R : Condition.Ref_Access) return Boolean; 
  62.  
  63.    function "=" (L : Condition.Ref_Access; 
  64.                  R : GuardCondition.Ref_Access) return Boolean; 
  65.  
  66. private 
  67.    type Ref is limited new Ada.Finalization.Limited_Controlled and DDS.Condition.Ref with record 
  68.       m_impl : DDS.GuardCondition_Impl.Ref_Access; 
  69.    end record; 
  70.  
  71.    procedure Free_Impl is new Ada.Unchecked_Deallocation (Ref'Class, Ref_Access); 
  72.    procedure Free (This : in out Ref_Access) renames Free_Impl; 
  73.  
  74. end DDS.GuardCondition; 
  75.