text stringlengths 0 234 |
|---|
if Argument_Stack.Is_Empty then goto Fail; end if; |
declare |
Action : constant String := Argument_Stack.Pop; |
begin |
if To_Upper(Action) /= "FUNC" and To_Upper(Action) /= "FUNCTION" then |
goto Fail; |
end if; |
Function Definition: procedure Help is |
Function Body: begin |
Put_Line(" (new|init)"); |
Put_Line(" project <name> - create a project from a basic template"); |
Put_Line(" gpr <name> - create a GPR from a basic template"); |
end Help; |
function Try_Act return Boolean is |
begin |
if Argument_Stack.Is_Empty then goto Fail; end if; |
declare |
Action : constant String := Argument_Stack.Pop; |
begin |
if To_Upper(Action) /= "NEW" and To_Upper(Action) /= "INIT" then |
goto Fail; |
end if; |
Function Definition: procedure Help is |
Function Body: begin |
Put_Line(" (cmm|comment)"); |
Put_Line(" (desc|description) <message> - Print a description doc comment"); |
Put_Line(" (ex|exception) <name> <mesage> - Print an exception doc comment"); |
Put_Line(" field <name> <message> - Print a field doc comment"); |
Put_Line(" param <name> <message> - Print a param doc comment"); |
Put_Line(" (ret|return) <message> - Prints a return doc comment"); |
Put_Line(" (summ|summary) <message> - Print a summary doc comment"); |
Put_Line(" value <name> <message> - Print a value doc comment"); |
end Help; |
function Try_Act return Boolean is |
begin |
if Argument_Stack.Is_Empty then goto Fail; end if; |
declare |
Action : constant String := Argument_Stack.Pop; |
begin |
if To_Upper(Action) /= "CMM" and To_Upper(Action) /= "COMMENT" then |
goto Fail; |
end if; |
Function Definition: procedure Help is |
Function Body: begin |
Put_Line(" (proc|procedure) [parameter:type]* - Print the generated procedure"); |
end Help; |
function Try_Act return Boolean is |
begin |
if Argument_Stack.Is_Empty then goto Fail; end if; |
declare |
Action : constant String := Argument_Stack.Pop; |
begin |
if To_Upper(Action) /= "PROC" and To_Upper(Action) /= "PROCEDURE" then |
goto Fail; |
end if; |
Function Definition: procedure Unchecked_Free is new Ada.Unchecked_Deallocation |
Function Body: (Index_Impl, Index_Impl_Ptr); |
pragma Warnings (Off, "*redundant conversion*"); |
Ptr : Index_Impl_Ptr := Index_Impl (Object.all)'Access; |
pragma Warnings (On, "*redundant conversion*"); |
begin |
Unchecked_Free (Ptr); |
end Destroy; |
overriding |
procedure Find (Object : in out Index_Impl; |
Session : in out ADO.Sessions.Session'Class; |
Query : in ADO.SQL.Query'Class; |
Found : out Boolean) is |
Stmt : ADO.Statements.Query_Statement |
:= Session.Create_Statement (Query, INDEX_DEF'Access); |
begin |
Stmt.Execute; |
if Stmt.Has_Elements then |
Object.Load (Stmt, Session); |
Stmt.Next; |
Found := not Stmt.Has_Elements; |
else |
Found := False; |
end if; |
end Find; |
overriding |
procedure Load (Object : in out Index_Impl; |
Session : in out ADO.Sessions.Session'Class) is |
Found : Boolean; |
Query : ADO.SQL.Query; |
Id : constant ADO.Identifier := Object.Get_Key_Value; |
begin |
Query.Bind_Param (Position => 1, Value => Id); |
Query.Set_Filter ("id = ?"); |
Object.Find (Session, Query, Found); |
if not Found then |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.