-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There’s no discussion of domain-level operations. #10
Comments
I'm trying to use a domain init operation to set up initial instances ... I'm getting the following report.
On examination of Air_Traffic_Controller.Initialize, I noticed that the procedure was called but not withed. --------------------------------------------
-- Automatically generated: do not edit --
--------------------------------------------
pragma Style_Checks (Off);
-- Domain revision: unspecified
-- Extraction date: 13 03 2021, 06:39
-- Extractor: normalize_xmi
-- Normalizer: normalize_xmi
-- Generator: cf-DATE
with Ada.Exceptions;
with ColdFrame.Project.Log_Error;
with Air_Traffic_Controller.Events;
with Air_Traffic_Controller.Control_Zone.CF_Initialize;
with Air_Traffic_Controller.Duty_Station.CF_Initialize;
with Air_Traffic_Controller.On_Duty_Controller.CF_Initialize;
procedure Air_Traffic_Controller.Initialize
(Dispatcher : ColdFrame.Project.Events.Event_Queue_P := null) is
use type ColdFrame.Project.Events.Event_Queue_P;
begin
if not Domain_Initialized then
Domain_Initializing := True;
if Dispatcher /= null then
Events.Dispatcher := Dispatcher;
else
Events.Initialize;
end if;
if Events.Dispatcher /= null then
ColdFrame.Project.Events.Add_Reference (Events.Dispatcher);
end if;
Air_Traffic_Controller_Custom_Initialize;
Control_Zone.CF_Initialize;
Duty_Station.CF_Initialize;
On_Duty_Controller.CF_Initialize;
Domain_Initialized := True;
Domain_Initializing := False;
end if;
exception
when E : others =>
ColdFrame.Project.Log_Error
(Ada.Exceptions.Exception_Information (E));
raise;
end Air_Traffic_Controller.Initialize; Have I omitted part of the setup? |
No, that’s the problem. If you have One workround would be as in the attached: create a private null type and declare the initialization procedure in it. That way the type will be invisible to your users, and the procedure will be likewise invisible but will be spec’d in the domain. |
OK. That worked well. Thanks for the suggestion. |
At this point, it seems like a good idea to check how this looks in the html documentation. |
Thinking about doing a proper writeup in the Initialization page, I realise that it’s very confusing to have domain initialization ( Proposal:
There’s no loss (aside from backward-compatibility) in removing class initialization operations, since the usual usage was to delegate domain setup to one class anyway. |
Sounds good. Anything that removes implementation/setup clutter from the class diagrams has my vote. IMO, another culprit in this regard is defined <<accessor>> operations. Right now, I’m getting ColdFrame to generate them but I realise that this sacrifices the ability to have private attributes. Maybe we could allow the access type (+/-) of the attribute to control the generation of accessors? |
Also for the ArgoUML move to Github from tigris.org.
Hey Simon. I'm thinking that a domain shutdown procedure, analogous to the domain setup procedure would be useful in some cases. In particular, I'm working on an application which saves the contents of all instances and relationships to a file at shutdown and reloads them at startup as a basic demonstration of persistence. Is this something you could get ColdFrame to provide? |
You might need domain-level operations for at least two possible reasons:
The text was updated successfully, but these errors were encountered: