Package Body Tmp_Transaction is -- --------= Transaction =-------- procedure Initialize(obj : in out Transaction) is begin initialize(Generic_Task_Group(obj)); obj.period := 0; obj.task_group_type := Transaction_Type; end Initialize; function Copy ( obj : in Transaction ) return Generic_Task_Group_Ptr is New_Transaction : Transaction_Ptr; begin New_Transaction := new Transaction'(obj); return Generic_Task_Group_Ptr(New_Transaction); end Copy; function Copy ( obj : in Transaction_Ptr ) return Generic_Task_Group_Ptr is begin return copy(obj.all); end Copy; procedure Put(obj : in Transaction) is begin put(Generic_Task_Group(obj)); put("period: "); standards_io.natural_io.put(obj.period); put ( "; " ); end Put; procedure Put(obj : in Transaction_Ptr) is begin Put(Obj.All); end Put; procedure Put_Name ( obj : in Transaction_Ptr) is begin Put ( To_String ( Obj.Name ) ); end Put_Name; function Get_Name (obj : in Transaction) return Unbounded_String is begin return obj.name; end Get_Name; function Get_Name (obj : in Transaction_ptr) return Unbounded_String is begin return obj.name; end Get_Name; function type_of ( obj : in Transaction ) 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("OBJECTS.NAMED_OBJECT"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASK_GROUPS.GENERIC_TASK_GROUP"); Add (list, s); s := new unbounded_string; s.all := to_unbounded_string("TASK_GROUPS.Transaction"); Add (list, s); return list; end type_of; function type_of ( obj : in Transaction_Ptr ) return unbounded_string_list is begin return type_of(obj.all); end type_of; procedure Build_Attributes_XML_String(obj : in Transaction; level : in natural := 0; result : in out Unbounded_String) is begin Build_Attributes_XML_String(Generic_Task_Group(obj), level, result); if (XML_String(obj.period, level + 1) /= Empty_String) then result := result & unbounded_ht(level + 1) & "" & XML_String(obj.period, level + 1) & "" & Unbounded_Lf; end if; end Build_Attributes_XML_String; function XML_String(obj : in Transaction; 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 Transaction_Ptr; level : in natural := 0) return Unbounded_String is begin return XML_String(obj.all); end XML_String; function XML_Ref_String(obj : in Transaction; 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 Transaction_Ptr; level : in natural := 0) return Unbounded_String is begin return XML_Ref_String(obj.all); end XML_Ref_String; End Tmp_Transaction;