------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- This Ada package was automatically generated by the software engineering tool Platypus
-- see http://dossen.univ-brest.fr/apl
--
-- Any modification of this file will be lost.
-- Please see the "platypus" directory instead : it contains the Cheddar's
-- model and its meta-model.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Cheddar is a free real time scheduling tool.
-- This program provides services to automatically check temporal constraints
-- of real time tasks.
--
-- Copyright (C) 2002-2009 Frank Singhoff
-- Cheddar is developed by the LAB-STICC Team, University of Brest
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
--
-- Contact : cheddar@listes.univ-brest.fr
-- To post to this mailing list, you must be subscribed
-- (see http//beru.univ-brest.fr/~singhoff/cheddar for details)
--
------------------------------------------------------------------------------
------------------------------------------------------------------------------
with Text_io;
use Text_io;
with unbounded_strings;
use unbounded_strings;
with primitive_xml_strings;
use primitive_xml_strings;
with Laws;
use Laws.Laws_Type_io;
Package Body Statements is
function XML_String(obj : in Statements_Type; level : in natural := 0) return Unbounded_String is
begin
return to_unbounded_string(Statements_Type'image (obj) );
end XML_String;
function XML_Ref_String (obj : in Statements_Type; level : in natural := 0) return Unbounded_String is
begin
raise xml_ref_string_error;
return to_unbounded_string("");
end XML_Ref_String;
function XML_String(obj : in Table_Types; level : in natural := 0) return Unbounded_String is
begin
return to_unbounded_string(Table_Types'image (obj) );
end XML_String;
function XML_Ref_String (obj : in Table_Types; level : in natural := 0) return Unbounded_String is
begin
raise xml_ref_string_error;
return to_unbounded_string("");
end XML_Ref_String;
-- --------= Generic_Statement =--------
procedure Initialize(obj : in out Generic_Statement) is
begin
initialize(Generic_Object(obj));
obj.statement_type := Put_Statement_Type;
obj.line_number := 0;
obj.file_name := empty_string;
obj.object_type := Statement_Object_Type;
end Initialize;
function Copy ( obj : in Generic_Statement ) return Generic_Statement_Ptr is
New_Generic_Statement : Generic_Statement_Ptr;
begin
New_Generic_Statement := new Generic_Statement'(obj);
return (New_Generic_Statement);
end Copy;
function Copy ( obj : in Generic_Statement_Ptr ) return Generic_Statement_Ptr is
begin
return copy(obj.all);
end Copy;
procedure Put(obj : in Generic_Statement) is
begin
put(Generic_Object(obj));
put("statement_type: "); put(obj.statement_type); put ( "; " );
put("line_number: "); standards_io.natural_io.put(obj.line_number); put ( "; " );
put("file_name: "); put(obj.file_name); put ( "; " );
put("next_statement: "); if obj.next_statement /= null then put(obj.next_statement.all); else put("null"); end if;put ( "; " );
end Put;
procedure Put(obj : in Generic_Statement_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Put_Name ( obj : in Generic_Statement_Ptr) is
begin
Put ( To_String ( Obj.cheddar_private_id ) );
end Put_Name;
function type_of ( obj : in Generic_Statement ) return unbounded_string_list is
list : unbounded_string_list;
s : unbounded_string_ptr;
begin
Initialize(list);
s := new unbounded_string;
s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.GENERIC_STATEMENT");
Add (list, s);
return list;
end type_of;
function type_of ( obj : in Generic_Statement_Ptr ) return unbounded_string_list is
begin
return type_of(obj.all);
end type_of;
procedure Build_Attributes_XML_String(obj : in Generic_Statement; level : in natural := 0; result : in out Unbounded_String) is
begin
Build_Attributes_XML_String(Generic_Object(obj), level, result);
if (XML_String(obj.statement_type, level + 1) /= Empty_String) then
result := result & unbounded_ht(level + 1) & "" & XML_String(obj.statement_type, level + 1) & "" & Unbounded_Lf;
end if;
if (XML_String(obj.line_number, level + 1) /= Empty_String) then
result := result & unbounded_ht(level + 1) & "" & XML_String(obj.line_number, level + 1) & "" & Unbounded_Lf;
end if;
if (XML_String(obj.file_name, level + 1) /= Empty_String) then
result := result & unbounded_ht(level + 1) & "" & XML_String(obj.file_name, level + 1) & "" & Unbounded_Lf;
end if;
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
end Build_Attributes_XML_String;
function XML_String(obj : in Generic_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
Build_Attributes_XML_String(obj, level, result);
result := result & "" & Unbounded_Lf;
return (result);
end XML_String;
function XML_String(obj : in Generic_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in Generic_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
return (result);
end XML_Ref_String;
function XML_Ref_String(obj : in Generic_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
return XML_Ref_String(obj.all);
end XML_Ref_String;
-- --------= Nop_Statement =--------
procedure Initialize(obj : in out Nop_Statement) is
begin
initialize(Generic_Statement(obj));
obj.statement_type := Nop_Statement_Type;
end Initialize;
function Copy ( obj : in Nop_Statement ) return Generic_Statement_Ptr is
New_Nop_Statement : Nop_Statement_Ptr;
begin
New_Nop_Statement := new Nop_Statement'(obj);
return Generic_Statement_Ptr(New_Nop_Statement);
end Copy;
function Copy ( obj : in Nop_Statement_Ptr ) return Generic_Statement_Ptr is
begin
return copy(obj.all);
end Copy;
procedure Put(obj : in Nop_Statement) is
begin
put(Generic_Statement(obj));
end Put;
procedure Put(obj : in Nop_Statement_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Put_Name ( obj : in Nop_Statement_Ptr) is
begin
Put ( To_String ( Obj.cheddar_private_id ) );
end Put_Name;
function type_of ( obj : in Nop_Statement ) return unbounded_string_list is
list : unbounded_string_list;
s : unbounded_string_ptr;
begin
Initialize(list);
s := new unbounded_string;
s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.GENERIC_STATEMENT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.NOP_STATEMENT");
Add (list, s);
return list;
end type_of;
function type_of ( obj : in Nop_Statement_Ptr ) return unbounded_string_list is
begin
return type_of(obj.all);
end type_of;
procedure Build_Attributes_XML_String(obj : in Nop_Statement; level : in natural := 0; result : in out Unbounded_String) is
begin
Build_Attributes_XML_String(Generic_Statement(obj), level, result);
end Build_Attributes_XML_String;
function XML_String(obj : in Nop_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
Build_Attributes_XML_String(obj, level, result);
result := result & "" & Unbounded_Lf;
return (result);
end XML_String;
function XML_String(obj : in Nop_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in Nop_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
return (result);
end XML_Ref_String;
function XML_Ref_String(obj : in Nop_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
return XML_Ref_String(obj.all);
end XML_Ref_String;
-- --------= Exit_Statement =--------
procedure Initialize(obj : in out Exit_Statement) is
begin
initialize(Generic_Statement(obj));
obj.statement_type := Exit_Statement_Type;
end Initialize;
function Copy ( obj : in Exit_Statement ) return Generic_Statement_Ptr is
New_Exit_Statement : Exit_Statement_Ptr;
begin
New_Exit_Statement := new Exit_Statement'(obj);
return Generic_Statement_Ptr(New_Exit_Statement);
end Copy;
function Copy ( obj : in Exit_Statement_Ptr ) return Generic_Statement_Ptr is
begin
return copy(obj.all);
end Copy;
procedure Put(obj : in Exit_Statement) is
begin
put(Generic_Statement(obj));
end Put;
procedure Put(obj : in Exit_Statement_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Put_Name ( obj : in Exit_Statement_Ptr) is
begin
Put ( To_String ( Obj.cheddar_private_id ) );
end Put_Name;
function type_of ( obj : in Exit_Statement ) return unbounded_string_list is
list : unbounded_string_list;
s : unbounded_string_ptr;
begin
Initialize(list);
s := new unbounded_string;
s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.GENERIC_STATEMENT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.EXIT_STATEMENT");
Add (list, s);
return list;
end type_of;
function type_of ( obj : in Exit_Statement_Ptr ) return unbounded_string_list is
begin
return type_of(obj.all);
end type_of;
procedure Build_Attributes_XML_String(obj : in Exit_Statement; level : in natural := 0; result : in out Unbounded_String) is
begin
Build_Attributes_XML_String(Generic_Statement(obj), level, result);
end Build_Attributes_XML_String;
function XML_String(obj : in Exit_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
Build_Attributes_XML_String(obj, level, result);
result := result & "" & Unbounded_Lf;
return (result);
end XML_String;
function XML_String(obj : in Exit_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in Exit_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
return (result);
end XML_Ref_String;
function XML_Ref_String(obj : in Exit_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
return XML_Ref_String(obj.all);
end XML_Ref_String;
-- --------= Put_Statement =--------
procedure Initialize(obj : in out Put_Statement) is
begin
initialize(Generic_Statement(obj));
obj.statement_type := Put_Statement_Type;
end Initialize;
function Copy ( obj : in Put_Statement ) return Generic_Statement_Ptr is
New_Put_Statement : Put_Statement_Ptr;
begin
New_Put_Statement := new Put_Statement'(obj);
return Generic_Statement_Ptr(New_Put_Statement);
end Copy;
function Copy ( obj : in Put_Statement_Ptr ) return Generic_Statement_Ptr is
begin
return copy(obj.all);
end Copy;
procedure Put(obj : in Put_Statement) is
begin
put(Generic_Statement(obj));
put("put_from: "); if obj.put_from /= null then put(obj.put_from.all); else put("null"); end if;put ( "; " );
put("put_to: "); if obj.put_to /= null then put(obj.put_to.all); else put("null"); end if;put ( "; " );
put("expression_to_be_displayed: "); if obj.expression_to_be_displayed /= null then put(obj.expression_to_be_displayed.all); else put("null"); end if;put ( "; " );
end Put;
procedure Put(obj : in Put_Statement_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Put_Name ( obj : in Put_Statement_Ptr) is
begin
Put ( To_String ( Obj.cheddar_private_id ) );
end Put_Name;
function type_of ( obj : in Put_Statement ) return unbounded_string_list is
list : unbounded_string_list;
s : unbounded_string_ptr;
begin
Initialize(list);
s := new unbounded_string;
s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.GENERIC_STATEMENT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.PUT_STATEMENT");
Add (list, s);
return list;
end type_of;
function type_of ( obj : in Put_Statement_Ptr ) return unbounded_string_list is
begin
return type_of(obj.all);
end type_of;
procedure Build_Attributes_XML_String(obj : in Put_Statement; level : in natural := 0; result : in out Unbounded_String) is
begin
Build_Attributes_XML_String(Generic_Statement(obj), level, result);
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
end Build_Attributes_XML_String;
function XML_String(obj : in Put_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
Build_Attributes_XML_String(obj, level, result);
result := result & "" & Unbounded_Lf;
return (result);
end XML_String;
function XML_String(obj : in Put_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in Put_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
return (result);
end XML_Ref_String;
function XML_Ref_String(obj : in Put_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
return XML_Ref_String(obj.all);
end XML_Ref_String;
-- --------= If_Statement =--------
procedure Initialize(obj : in out If_Statement) is
begin
initialize(Generic_Statement(obj));
obj.statement_type := If_Statement_Type;
end Initialize;
function Copy ( obj : in If_Statement ) return Generic_Statement_Ptr is
New_If_Statement : If_Statement_Ptr;
begin
New_If_Statement := new If_Statement'(obj);
return Generic_Statement_Ptr(New_If_Statement);
end Copy;
function Copy ( obj : in If_Statement_Ptr ) return Generic_Statement_Ptr is
begin
return copy(obj.all);
end Copy;
procedure Put(obj : in If_Statement) is
begin
put(Generic_Statement(obj));
put("bool_expression: "); if obj.bool_expression /= null then put(obj.bool_expression.all); else put("null"); end if;put ( "; " );
put("else_statement: "); if obj.else_statement /= null then put(obj.else_statement.all); else put("null"); end if;put ( "; " );
put("then_statement: "); if obj.then_statement /= null then put(obj.then_statement.all); else put("null"); end if;put ( "; " );
end Put;
procedure Put(obj : in If_Statement_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Put_Name ( obj : in If_Statement_Ptr) is
begin
Put ( To_String ( Obj.cheddar_private_id ) );
end Put_Name;
function type_of ( obj : in If_Statement ) return unbounded_string_list is
list : unbounded_string_list;
s : unbounded_string_ptr;
begin
Initialize(list);
s := new unbounded_string;
s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.GENERIC_STATEMENT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.IF_STATEMENT");
Add (list, s);
return list;
end type_of;
function type_of ( obj : in If_Statement_Ptr ) return unbounded_string_list is
begin
return type_of(obj.all);
end type_of;
procedure Build_Attributes_XML_String(obj : in If_Statement; level : in natural := 0; result : in out Unbounded_String) is
begin
Build_Attributes_XML_String(Generic_Statement(obj), level, result);
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
end Build_Attributes_XML_String;
function XML_String(obj : in If_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
Build_Attributes_XML_String(obj, level, result);
result := result & "" & Unbounded_Lf;
return (result);
end XML_String;
function XML_String(obj : in If_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in If_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
return (result);
end XML_Ref_String;
function XML_Ref_String(obj : in If_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
return XML_Ref_String(obj.all);
end XML_Ref_String;
-- --------= Assign_Statement =--------
procedure Initialize(obj : in out Assign_Statement) is
begin
initialize(Generic_Statement(obj));
obj.statement_type := Assign_Statement_Type;
end Initialize;
function Copy ( obj : in Assign_Statement ) return Generic_Statement_Ptr is
New_Assign_Statement : Assign_Statement_Ptr;
begin
New_Assign_Statement := new Assign_Statement'(obj);
return Generic_Statement_Ptr(New_Assign_Statement);
end Copy;
function Copy ( obj : in Assign_Statement_Ptr ) return Generic_Statement_Ptr is
begin
return copy(obj.all);
end Copy;
procedure Put(obj : in Assign_Statement) is
begin
put(Generic_Statement(obj));
put("lvalue: "); if obj.lvalue /= null then put(obj.lvalue.all); else put("null"); end if;put ( "; " );
put("rvalue: "); if obj.rvalue /= null then put(obj.rvalue.all); else put("null"); end if;put ( "; " );
end Put;
procedure Put(obj : in Assign_Statement_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Put_Name ( obj : in Assign_Statement_Ptr) is
begin
Put ( To_String ( Obj.cheddar_private_id ) );
end Put_Name;
function type_of ( obj : in Assign_Statement ) return unbounded_string_list is
list : unbounded_string_list;
s : unbounded_string_ptr;
begin
Initialize(list);
s := new unbounded_string;
s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.GENERIC_STATEMENT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.ASSIGN_STATEMENT");
Add (list, s);
return list;
end type_of;
function type_of ( obj : in Assign_Statement_Ptr ) return unbounded_string_list is
begin
return type_of(obj.all);
end type_of;
procedure Build_Attributes_XML_String(obj : in Assign_Statement; level : in natural := 0; result : in out Unbounded_String) is
begin
Build_Attributes_XML_String(Generic_Statement(obj), level, result);
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
end Build_Attributes_XML_String;
function XML_String(obj : in Assign_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
Build_Attributes_XML_String(obj, level, result);
result := result & "" & Unbounded_Lf;
return (result);
end XML_String;
function XML_String(obj : in Assign_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in Assign_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
return (result);
end XML_Ref_String;
function XML_Ref_String(obj : in Assign_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
return XML_Ref_String(obj.all);
end XML_Ref_String;
-- --------= Clock_Statement =--------
procedure Initialize(obj : in out Clock_Statement) is
begin
initialize(Assign_Statement(obj));
obj.statement_type := Clock_Statement_Type;
end Initialize;
function Copy ( obj : in Clock_Statement ) return Generic_Statement_Ptr is
New_Clock_Statement : Clock_Statement_Ptr;
begin
New_Clock_Statement := new Clock_Statement'(obj);
return Generic_Statement_Ptr(New_Clock_Statement);
end Copy;
function Copy ( obj : in Clock_Statement_Ptr ) return Generic_Statement_Ptr is
begin
return copy(obj.all);
end Copy;
procedure Put(obj : in Clock_Statement) is
begin
put(Assign_Statement(obj));
end Put;
procedure Put(obj : in Clock_Statement_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Put_Name ( obj : in Clock_Statement_Ptr) is
begin
Put ( To_String ( Obj.cheddar_private_id ) );
end Put_Name;
function type_of ( obj : in Clock_Statement ) return unbounded_string_list is
list : unbounded_string_list;
s : unbounded_string_ptr;
begin
Initialize(list);
s := new unbounded_string;
s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.GENERIC_STATEMENT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.ASSIGN_STATEMENT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.CLOCK_STATEMENT");
Add (list, s);
return list;
end type_of;
function type_of ( obj : in Clock_Statement_Ptr ) return unbounded_string_list is
begin
return type_of(obj.all);
end type_of;
procedure Build_Attributes_XML_String(obj : in Clock_Statement; level : in natural := 0; result : in out Unbounded_String) is
begin
Build_Attributes_XML_String(Assign_Statement(obj), level, result);
end Build_Attributes_XML_String;
function XML_String(obj : in Clock_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
Build_Attributes_XML_String(obj, level, result);
result := result & "" & Unbounded_Lf;
return (result);
end XML_String;
function XML_String(obj : in Clock_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in Clock_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
return (result);
end XML_Ref_String;
function XML_Ref_String(obj : in Clock_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
return XML_Ref_String(obj.all);
end XML_Ref_String;
-- --------= For_Statement =--------
procedure Initialize(obj : in out For_Statement) is
begin
initialize(Generic_Statement(obj));
obj.for_type := Task_Table_Type;
obj.statement_type := For_Statement_Type;
end Initialize;
function Copy ( obj : in For_Statement ) return Generic_Statement_Ptr is
New_For_Statement : For_Statement_Ptr;
begin
New_For_Statement := new For_Statement'(obj);
return Generic_Statement_Ptr(New_For_Statement);
end Copy;
function Copy ( obj : in For_Statement_Ptr ) return Generic_Statement_Ptr is
begin
return copy(obj.all);
end Copy;
procedure Put(obj : in For_Statement) is
begin
put(Generic_Statement(obj));
put("for_type: "); put(obj.for_type); put ( "; " );
put("included_statement: "); if obj.included_statement /= null then put(obj.included_statement.all); else put("null"); end if;put ( "; " );
put("for_index: "); if obj.for_index /= null then put(obj.for_index.all); else put("null"); end if;put ( "; " );
end Put;
procedure Put(obj : in For_Statement_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Put_Name ( obj : in For_Statement_Ptr) is
begin
Put ( To_String ( Obj.cheddar_private_id ) );
end Put_Name;
function type_of ( obj : in For_Statement ) return unbounded_string_list is
list : unbounded_string_list;
s : unbounded_string_ptr;
begin
Initialize(list);
s := new unbounded_string;
s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.GENERIC_STATEMENT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.FOR_STATEMENT");
Add (list, s);
return list;
end type_of;
function type_of ( obj : in For_Statement_Ptr ) return unbounded_string_list is
begin
return type_of(obj.all);
end type_of;
procedure Build_Attributes_XML_String(obj : in For_Statement; level : in natural := 0; result : in out Unbounded_String) is
begin
Build_Attributes_XML_String(Generic_Statement(obj), level, result);
if (XML_String(obj.for_type, level + 1) /= Empty_String) then
result := result & unbounded_ht(level + 1) & "" & XML_String(obj.for_type, level + 1) & "" & Unbounded_Lf;
end if;
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
end Build_Attributes_XML_String;
function XML_String(obj : in For_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
Build_Attributes_XML_String(obj, level, result);
result := result & "" & Unbounded_Lf;
return (result);
end XML_String;
function XML_String(obj : in For_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in For_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
return (result);
end XML_Ref_String;
function XML_Ref_String(obj : in For_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
return XML_Ref_String(obj.all);
end XML_Ref_String;
-- --------= Return_Statement =--------
procedure Initialize(obj : in out Return_Statement) is
begin
initialize(Generic_Statement(obj));
obj.statement_type := Return_Statement_Type;
end Initialize;
function Copy ( obj : in Return_Statement ) return Generic_Statement_Ptr is
New_Return_Statement : Return_Statement_Ptr;
begin
New_Return_Statement := new Return_Statement'(obj);
return Generic_Statement_Ptr(New_Return_Statement);
end Copy;
function Copy ( obj : in Return_Statement_Ptr ) return Generic_Statement_Ptr is
begin
return copy(obj.all);
end Copy;
procedure Put(obj : in Return_Statement) is
begin
put(Generic_Statement(obj));
put("return_value: "); if obj.return_value /= null then put(obj.return_value.all); else put("null"); end if;put ( "; " );
end Put;
procedure Put(obj : in Return_Statement_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Put_Name ( obj : in Return_Statement_Ptr) is
begin
Put ( To_String ( Obj.cheddar_private_id ) );
end Put_Name;
function type_of ( obj : in Return_Statement ) return unbounded_string_list is
list : unbounded_string_list;
s : unbounded_string_ptr;
begin
Initialize(list);
s := new unbounded_string;
s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.GENERIC_STATEMENT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.RETURN_STATEMENT");
Add (list, s);
return list;
end type_of;
function type_of ( obj : in Return_Statement_Ptr ) return unbounded_string_list is
begin
return type_of(obj.all);
end type_of;
procedure Build_Attributes_XML_String(obj : in Return_Statement; level : in natural := 0; result : in out Unbounded_String) is
begin
Build_Attributes_XML_String(Generic_Statement(obj), level, result);
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
end Build_Attributes_XML_String;
function XML_String(obj : in Return_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
Build_Attributes_XML_String(obj, level, result);
result := result & "" & Unbounded_Lf;
return (result);
end XML_String;
function XML_String(obj : in Return_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in Return_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
return (result);
end XML_Ref_String;
function XML_Ref_String(obj : in Return_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
return XML_Ref_String(obj.all);
end XML_Ref_String;
-- --------= While_Statement =--------
procedure Initialize(obj : in out While_Statement) is
begin
initialize(Generic_Statement(obj));
obj.statement_type := While_Statement_Type;
end Initialize;
function Copy ( obj : in While_Statement ) return Generic_Statement_Ptr is
New_While_Statement : While_Statement_Ptr;
begin
New_While_Statement := new While_Statement'(obj);
return Generic_Statement_Ptr(New_While_Statement);
end Copy;
function Copy ( obj : in While_Statement_Ptr ) return Generic_Statement_Ptr is
begin
return copy(obj.all);
end Copy;
procedure Put(obj : in While_Statement) is
begin
put(Generic_Statement(obj));
put("included_statement: "); if obj.included_statement /= null then put(obj.included_statement.all); else put("null"); end if;put ( "; " );
put("condition: "); if obj.condition /= null then put(obj.condition.all); else put("null"); end if;put ( "; " );
end Put;
procedure Put(obj : in While_Statement_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Put_Name ( obj : in While_Statement_Ptr) is
begin
Put ( To_String ( Obj.cheddar_private_id ) );
end Put_Name;
function type_of ( obj : in While_Statement ) return unbounded_string_list is
list : unbounded_string_list;
s : unbounded_string_ptr;
begin
Initialize(list);
s := new unbounded_string;
s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.GENERIC_STATEMENT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.WHILE_STATEMENT");
Add (list, s);
return list;
end type_of;
function type_of ( obj : in While_Statement_Ptr ) return unbounded_string_list is
begin
return type_of(obj.all);
end type_of;
procedure Build_Attributes_XML_String(obj : in While_Statement; level : in natural := 0; result : in out Unbounded_String) is
begin
Build_Attributes_XML_String(Generic_Statement(obj), level, result);
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
end Build_Attributes_XML_String;
function XML_String(obj : in While_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
Build_Attributes_XML_String(obj, level, result);
result := result & "" & Unbounded_Lf;
return (result);
end XML_String;
function XML_String(obj : in While_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in While_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
return (result);
end XML_Ref_String;
function XML_Ref_String(obj : in While_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
return XML_Ref_String(obj.all);
end XML_Ref_String;
-- --------= Random_Initialize_Statement =--------
procedure Initialize(obj : in out Random_Initialize_Statement) is
begin
initialize(Generic_Statement(obj));
obj.lvalue := empty_string;
obj.law := Uniform_Law_Type;
obj.statement_type := Random_Initialize_Statement_Type;
end Initialize;
function Copy ( obj : in Random_Initialize_Statement ) return Generic_Statement_Ptr is
New_Random_Initialize_Statement : Random_Initialize_Statement_Ptr;
begin
New_Random_Initialize_Statement := new Random_Initialize_Statement'(obj);
return Generic_Statement_Ptr(New_Random_Initialize_Statement);
end Copy;
function Copy ( obj : in Random_Initialize_Statement_Ptr ) return Generic_Statement_Ptr is
begin
return copy(obj.all);
end Copy;
procedure Put(obj : in Random_Initialize_Statement) is
begin
put(Generic_Statement(obj));
put("lvalue: "); put(obj.lvalue); put ( "; " );
put("law: "); put(obj.law); put ( "; " );
put("parameter1: "); if obj.parameter1 /= null then put(obj.parameter1.all); else put("null"); end if;put ( "; " );
put("parameter2: "); if obj.parameter2 /= null then put(obj.parameter2.all); else put("null"); end if;put ( "; " );
end Put;
procedure Put(obj : in Random_Initialize_Statement_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Put_Name ( obj : in Random_Initialize_Statement_Ptr) is
begin
Put ( To_String ( Obj.cheddar_private_id ) );
end Put_Name;
function type_of ( obj : in Random_Initialize_Statement ) return unbounded_string_list is
list : unbounded_string_list;
s : unbounded_string_ptr;
begin
Initialize(list);
s := new unbounded_string;
s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.GENERIC_STATEMENT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.RANDOM_INITIALIZE_STATEMENT");
Add (list, s);
return list;
end type_of;
function type_of ( obj : in Random_Initialize_Statement_Ptr ) return unbounded_string_list is
begin
return type_of(obj.all);
end type_of;
procedure Build_Attributes_XML_String(obj : in Random_Initialize_Statement; level : in natural := 0; result : in out Unbounded_String) is
begin
Build_Attributes_XML_String(Generic_Statement(obj), level, result);
if (XML_String(obj.lvalue, level + 1) /= Empty_String) then
result := result & unbounded_ht(level + 1) & "" & XML_String(obj.lvalue, level + 1) & "" & Unbounded_Lf;
end if;
if (XML_String(obj.law, level + 1) /= Empty_String) then
result := result & unbounded_ht(level + 1) & "" & XML_String(obj.law, level + 1) & "" & Unbounded_Lf;
end if;
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
end Build_Attributes_XML_String;
function XML_String(obj : in Random_Initialize_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
Build_Attributes_XML_String(obj, level, result);
result := result & "" & Unbounded_Lf;
return (result);
end XML_String;
function XML_String(obj : in Random_Initialize_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in Random_Initialize_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
return (result);
end XML_Ref_String;
function XML_Ref_String(obj : in Random_Initialize_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
return XML_Ref_String(obj.all);
end XML_Ref_String;
-- --------= Set_Statement =--------
procedure Initialize(obj : in out Set_Statement) is
begin
initialize(Generic_Statement(obj));
obj.set_id := empty_string;
obj.statement_type := Set_Statement_Type;
end Initialize;
function Copy ( obj : in Set_Statement ) return Generic_Statement_Ptr is
New_Set_Statement : Set_Statement_Ptr;
begin
New_Set_Statement := new Set_Statement'(obj);
return Generic_Statement_Ptr(New_Set_Statement);
end Copy;
function Copy ( obj : in Set_Statement_Ptr ) return Generic_Statement_Ptr is
begin
return copy(obj.all);
end Copy;
procedure Put(obj : in Set_Statement) is
begin
put(Generic_Statement(obj));
put("set_id: "); put(obj.set_id); put ( "; " );
put("set_value: "); if obj.set_value /= null then put(obj.set_value.all); else put("null"); end if;put ( "; " );
end Put;
procedure Put(obj : in Set_Statement_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Put_Name ( obj : in Set_Statement_Ptr) is
begin
Put ( To_String ( Obj.cheddar_private_id ) );
end Put_Name;
function type_of ( obj : in Set_Statement ) return unbounded_string_list is
list : unbounded_string_list;
s : unbounded_string_ptr;
begin
Initialize(list);
s := new unbounded_string;
s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.GENERIC_STATEMENT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.SET_STATEMENT");
Add (list, s);
return list;
end type_of;
function type_of ( obj : in Set_Statement_Ptr ) return unbounded_string_list is
begin
return type_of(obj.all);
end type_of;
procedure Build_Attributes_XML_String(obj : in Set_Statement; level : in natural := 0; result : in out Unbounded_String) is
begin
Build_Attributes_XML_String(Generic_Statement(obj), level, result);
if (XML_String(obj.set_id, level + 1) /= Empty_String) then
result := result & unbounded_ht(level + 1) & "" & XML_String(obj.set_id, level + 1) & "" & Unbounded_Lf;
end if;
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
end Build_Attributes_XML_String;
function XML_String(obj : in Set_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
Build_Attributes_XML_String(obj, level, result);
result := result & "" & Unbounded_Lf;
return (result);
end XML_String;
function XML_String(obj : in Set_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in Set_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
return (result);
end XML_Ref_String;
function XML_Ref_String(obj : in Set_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
return XML_Ref_String(obj.all);
end XML_Ref_String;
-- --------= Subprogram_Statement =--------
procedure Initialize(obj : in out Subprogram_Statement) is
begin
initialize(Generic_Statement(obj));
obj.is_a_function := false;
obj.subprogram_name := empty_string;
obj.statement_type := Subprogram_Statement_Type;
end Initialize;
function Copy ( obj : in Subprogram_Statement ) return Generic_Statement_Ptr is
New_Subprogram_Statement : Subprogram_Statement_Ptr;
begin
New_Subprogram_Statement := new Subprogram_Statement'(obj);
return Generic_Statement_Ptr(New_Subprogram_Statement);
end Copy;
function Copy ( obj : in Subprogram_Statement_Ptr ) return Generic_Statement_Ptr is
begin
return copy(obj.all);
end Copy;
procedure Put(obj : in Subprogram_Statement) is
begin
put(Generic_Statement(obj));
put("included_statement: "); if obj.included_statement /= null then put(obj.included_statement.all); else put("null"); end if;put ( "; " );
put("is_a_function: "); standards_io.boolean_io.put(obj.is_a_function); put ( "; " );
put("subprogram_name: "); put(obj.subprogram_name); put ( "; " );
end Put;
procedure Put(obj : in Subprogram_Statement_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Put_Name ( obj : in Subprogram_Statement_Ptr) is
begin
Put ( To_String ( Obj.cheddar_private_id ) );
end Put_Name;
function type_of ( obj : in Subprogram_Statement ) return unbounded_string_list is
list : unbounded_string_list;
s : unbounded_string_ptr;
begin
Initialize(list);
s := new unbounded_string;
s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.GENERIC_STATEMENT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.SUBPROGRAM_STATEMENT");
Add (list, s);
return list;
end type_of;
function type_of ( obj : in Subprogram_Statement_Ptr ) return unbounded_string_list is
begin
return type_of(obj.all);
end type_of;
procedure Build_Attributes_XML_String(obj : in Subprogram_Statement; level : in natural := 0; result : in out Unbounded_String) is
begin
Build_Attributes_XML_String(Generic_Statement(obj), level, result);
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
if (XML_String(obj.is_a_function, level + 1) /= Empty_String) then
result := result & unbounded_ht(level + 1) & "" & XML_String(obj.is_a_function, level + 1) & "" & Unbounded_Lf;
end if;
if (XML_String(obj.subprogram_name, level + 1) /= Empty_String) then
result := result & unbounded_ht(level + 1) & "" & XML_String(obj.subprogram_name, level + 1) & "" & Unbounded_Lf;
end if;
end Build_Attributes_XML_String;
function XML_String(obj : in Subprogram_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
Build_Attributes_XML_String(obj, level, result);
result := result & "" & Unbounded_Lf;
return (result);
end XML_String;
function XML_String(obj : in Subprogram_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in Subprogram_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
return (result);
end XML_Ref_String;
function XML_Ref_String(obj : in Subprogram_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
return XML_Ref_String(obj.all);
end XML_Ref_String;
-- --------= Subprogram_Call_Statement =--------
procedure Initialize(obj : in out Subprogram_Call_Statement) is
begin
initialize(Generic_Statement(obj));
obj.is_a_function := false;
obj.statement_type := Subprogram_Call_Statement_Type;
end Initialize;
function Copy ( obj : in Subprogram_Call_Statement ) return Generic_Statement_Ptr is
New_Subprogram_Call_Statement : Subprogram_Call_Statement_Ptr;
begin
New_Subprogram_Call_Statement := new Subprogram_Call_Statement'(obj);
return Generic_Statement_Ptr(New_Subprogram_Call_Statement);
end Copy;
function Copy ( obj : in Subprogram_Call_Statement_Ptr ) return Generic_Statement_Ptr is
begin
return copy(obj.all);
end Copy;
procedure Put(obj : in Subprogram_Call_Statement) is
begin
put(Generic_Statement(obj));
put("is_a_function: "); standards_io.boolean_io.put(obj.is_a_function); put ( "; " );
put("called_subprogram: "); if obj.called_subprogram /= null then put(obj.called_subprogram.all); else put("null"); end if;put ( "; " );
put("return_value: "); if obj.return_value /= null then put(obj.return_value.all); else put("null"); end if;put ( "; " );
end Put;
procedure Put(obj : in Subprogram_Call_Statement_Ptr) is
begin
Put(Obj.All);
end Put;
procedure Put_Name ( obj : in Subprogram_Call_Statement_Ptr) is
begin
Put ( To_String ( Obj.cheddar_private_id ) );
end Put_Name;
function type_of ( obj : in Subprogram_Call_Statement ) return unbounded_string_list is
list : unbounded_string_list;
s : unbounded_string_ptr;
begin
Initialize(list);
s := new unbounded_string;
s.all := to_unbounded_string("OBJECTS.GENERIC_OBJECT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.GENERIC_STATEMENT");
Add (list, s);
s := new unbounded_string;
s.all := to_unbounded_string("STATEMENTS.SUBPROGRAM_CALL_STATEMENT");
Add (list, s);
return list;
end type_of;
function type_of ( obj : in Subprogram_Call_Statement_Ptr ) return unbounded_string_list is
begin
return type_of(obj.all);
end type_of;
procedure Build_Attributes_XML_String(obj : in Subprogram_Call_Statement; level : in natural := 0; result : in out Unbounded_String) is
begin
Build_Attributes_XML_String(Generic_Statement(obj), level, result);
if (XML_String(obj.is_a_function, level + 1) /= Empty_String) then
result := result & unbounded_ht(level + 1) & "" & XML_String(obj.is_a_function, level + 1) & "" & Unbounded_Lf;
end if;
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
result := result & unbounded_ht ( level + 1 ) & "" & Unbounded_Lf;
end Build_Attributes_XML_String;
function XML_String(obj : in Subprogram_Call_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
Build_Attributes_XML_String(obj, level, result);
result := result & "" & Unbounded_Lf;
return (result);
end XML_String;
function XML_String(obj : in Subprogram_Call_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
if obj /= null then
return XML_String(obj.all);
else
return Empty_String;
end if;
end XML_String;
function XML_Ref_String(obj : in Subprogram_Call_Statement; level : in natural := 0) return Unbounded_String is
result : Unbounded_String;
begin
result := "" & Unbounded_Lf;
return (result);
end XML_Ref_String;
function XML_Ref_String(obj : in Subprogram_Call_Statement_Ptr; level : in natural := 0) return Unbounded_String is
begin
return XML_Ref_String(obj.all);
end XML_Ref_String;
End Statements;