private with Ada.Strings.Unbounded;
package Tools.Entity_Spawners is
type Entity_Spawner is new Tool with private;
type A_Entity_Spawner is access all Entity_Spawner'Class;
function Create_Entity_Spawner( id : String; snap : Boolean := True ) return A_Tool;
pragma Precondition( id'Length > 0 );
pragma Postcondition( Create_Entity_Spawner'Result /= null );
function Get_ID( this : not null access Entity_Spawner'Class ) return String;
pragma Postcondition( Get_ID'Result'Length > 0 );
function In_Class( this : not null access Entity_Spawner'Class;
pattern : String ) return Boolean;
private
use Ada.Strings.Unbounded;
type Entity_Spawner is new Tool with
record
id : Unbounded_String;
snap : Boolean := False;
end record;
procedure Construct( this : access Entity_Spawner;
id : String;
snap : Boolean );
pragma Precondition( id'Length > 0 );
procedure Apply( this : access Entity_Spawner; context : Tool_Context );
function Get_Type( this : access Entity_Spawner ) return Tool_Type;
end Tools.Entity_Spawners;