comp.lang.ada
 help / color / mirror / Atom feed
* Constructors with multiple inheritance
@ 2011-09-29 19:40 Rego, P.
  2011-09-29 20:20 ` Dmitry A. Kazakov
  2011-10-07  0:08 ` Shark8
  0 siblings, 2 replies; 28+ messages in thread
From: Rego, P. @ 2011-09-29 19:40 UTC (permalink / raw)


Hi people

I have a package which implements a class with two items which actually are classes which builds different kind of queues. One of them is a queue whose items are of the kind of the parent class. I need to implement a constructor to the parent class, then I need to implement the constructors for the two queues. For me, it`s more intuitive from OO point of view that the three constructors are implemented as methods (not just independent calls), and that was just the point where I got stuck.

So, the packages are declared as 

------------------------
-- parent_package.ads --
------------------------
limited with Parent_Package.Child_Package;
package Parent_Package is
   type Parent_Class is tagged
      record
         Child : access Child_Package.Parent_Queue_Class;
         Modes : access Child_Package.Modes_Queue_Class;
      end record;
   type Parent_Class_Ptr is access all Parent_Class;
   function Construct (Sender : in Parent_Class) return Parent_Class_Ptr;
end Parent_Package;

------------------------
-- parent_package.adb --
------------------------
with Parent_Package.Child_Package;
package body Parent_Package is
   function Construct (Sender : in Parent_Class) return Parent_Class_Ptr is
      New_Parent : constant Parent_Class_Ptr := new Parent_Class;
   begin
      New_Parent.Child := Sender.Child.Construct;
      New_Parent.Modes := Sender.Modes.Construct;
      return New_Parent;
   end Construct;
end Parent_Package;

--------------------------------------
-- parent_package-child_package.ads --
--------------------------------------
package Parent_Package.Child_Package is
   type Parent_Queue_Class is tagged
      record
         Next   : access Parent_Queue_Class;
         Parent : access Parent_Class;
      end record;
   type Parent_Queue_Class_Ptr is access all Parent_Queue_Class;
   function Construct (Sender : in Parent_Queue_Class) return Parent_Queue_Class_Ptr;

   type Modes_Queue_Class is tagged
      record
         Next : access Modes_Queue_Class;
         Mode : Integer;
      end record;
   type Modes_Queue_Class_Ptr is access Modes_Queue_Class;
   function Construct (Sender : in Modes_Queue_Class) return Modes_Queue_Class_Ptr;
end Parent_Package.Child_Package;

--------------------------------------
-- parent_package-child_package.ads --
--------------------------------------
package body Parent_Package.Child_Package is
   function Construct
     (Sender : in Parent_Queue_Class) return Parent_Queue_Class_Ptr is
      pragma Unreferenced (Sender);
      New_Queue : constant Parent_Queue_Class_Ptr := new Parent_Queue_Class;
   begin
      return New_Queue;
   end Construct;

   function Construct
     (Sender : in Modes_Queue_Class) return Modes_Queue_Class_Ptr is
      pragma Unreferenced (Sender);
      New_Queue : constant Modes_Queue_Class_Ptr := new Modes_Queue_Class;
   begin
      New_Queue.Mode := 0;
      return New_Queue;
   end Construct;
end Parent_Package.Child_Package;

---------------------
-- parent_main.adb --
---------------------
with Parent_Package;
procedure Parent_Main is
   Obj : Parent_Package.Parent_Class_Ptr;
begin
   Obj := Obj.Construct;
end Parent_Main;

---------------------------
when I build the code, I get the messages:
	warning: useless assignment to "Obj", value never referenced (ok, I agree sure)
	warning: null value not allowed here
	warning: "Constraint_Error" will be raised at run time
	
and sure when I execute the code I get 
	raised CONSTRAINT_ERROR : parent_main.adb:5 access check failed

	(BTW, if I implement the constructors independent from the class - i.e. without referencing the parent class as the argument -, they return no error message and the results after that are according to expected, but sure it breaks the oo design.)

So, how can I fix this?
Thanks!



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-09-29 19:40 Constructors with multiple inheritance Rego, P.
@ 2011-09-29 20:20 ` Dmitry A. Kazakov
  2011-09-30  3:11   ` Rego, P.
  2011-10-07  0:08 ` Shark8
  1 sibling, 1 reply; 28+ messages in thread
From: Dmitry A. Kazakov @ 2011-09-29 20:20 UTC (permalink / raw)


On Thu, 29 Sep 2011 12:40:28 -0700 (PDT), Rego, P. wrote:

> So, the packages are declared as 
>
[...] 
> with Parent_Package;
> procedure Parent_Main is
>    Obj : Parent_Package.Parent_Class_Ptr;
> begin
>    Obj := Obj.Construct;

This is equivalent to:

    Obj := Construct (Obj.all);

But Obj is null.

> So, how can I fix this?

I don't understand your design, but a constructing function of a
non-limited type is just:

   function Construct return Parent_Class;

And you don't need it because it has no parameters. Derive Parent_Class
from Ada.Finalization.Controlled and override Initialize.

P.S. I also see no MI in your design.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-09-29 20:20 ` Dmitry A. Kazakov
@ 2011-09-30  3:11   ` Rego, P.
  2011-09-30  7:36     ` Dmitry A. Kazakov
  0 siblings, 1 reply; 28+ messages in thread
From: Rego, P. @ 2011-09-30  3:11 UTC (permalink / raw)
  Cc: mailbox

> This is equivalent to:
> 
>     Obj := Construct (Obj.all);
> 
> But Obj is null.
Yes, I agree. But that's the point. I want to reserve the address (so I can build my queues from there).

> > So, how can I fix this?
> 
> I don't understand your design, but a constructing function of a
> non-limited type is just:
> 
>    function Construct return Parent_Class;
It works (and the current code utilizes this approach), but I cannot name it a method, since I cannot call the funtion from inside the class, using something like Object.Method. So I need to fix the package.function_constructor call and use a call of type object.method_constructor.

> And you don't need it because it has no parameters. Derive Parent_Class
> from Ada.Finalization.Controlled and override Initialize.

Yes and no. The real code is far more complex than this. I only took the several other parameters out from (from the three classes) because the text would be very long :-)

> P.S. I also see no MI in your design.
Sorry, lacking code. I cut the MI code but still got thinking on it when I wrote the title. At this point there is no mi really.

I will take a look in Ada.Finalization.Controlled anyway, maybe it gives me some idea.
thanks.



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-09-30  3:11   ` Rego, P.
@ 2011-09-30  7:36     ` Dmitry A. Kazakov
  2011-09-30 14:04       ` Rego, P.
  0 siblings, 1 reply; 28+ messages in thread
From: Dmitry A. Kazakov @ 2011-09-30  7:36 UTC (permalink / raw)


On Thu, 29 Sep 2011 20:11:53 -0700 (PDT), Rego, P. wrote:

>> This is equivalent to:
>> 
>>     Obj := Construct (Obj.all);
>> 
>> But Obj is null.

> Yes, I agree. But that's the point. I want to reserve the address (so I
> can build my queues from there).

The problem is not the result, but the argument of Construct.

>>> So, how can I fix this?
>> 
>> I don't understand your design, but a constructing function of a
>> non-limited type is just:
>> 
>>    function Construct return Parent_Class;

> It works (and the current code utilizes this approach), but I cannot name
> it a method,

"method" is not an Ada term, but from the OO point of view Construct is a
method, because it is covariant in the result.

> since I cannot call the funtion from inside the class, using
> something like Object.Method.

X.Op is just a syntactic sugar for Op (X). It has nothing to do with an
operation being a method or not, except that in Ada the sugar is allowed
only for certain types of methods, rather than universally.

(The operation Op is a method of the type T in one of its arguments or the
result, when the type of that argument or result is T and Op is covariant
in it.)

> So I need to fix the
> package.function_constructor call and use a call of type
> object.method_constructor.

Why?

What is wrong with the abstract factory pattern?

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-09-30  7:36     ` Dmitry A. Kazakov
@ 2011-09-30 14:04       ` Rego, P.
  2011-09-30 16:29         ` Robert A Duff
  2011-09-30 16:42         ` Dmitry A. Kazakov
  0 siblings, 2 replies; 28+ messages in thread
From: Rego, P. @ 2011-09-30 14:04 UTC (permalink / raw)
  Cc: mailbox

> > Yes, I agree. But that's the point. I want to reserve the address (so I
> > can build my queues from there).
> 
> The problem is not the result, but the argument of Construct.

Ok. But did not understand the problem if the argument is null.
 
> > It works (and the current code utilizes this approach), but I cannot name
> > it a method,
> 
> "method" is not an Ada term, but from the OO point of view Construct is a
> method, because it is covariant in the result.

I don't think "method" is a term owned by any language, the concept is outside of the language implementation. But, whatever. So if I inherit a class which have a method defined in the "function Construct return Parent_Class_Ptr" form instead of the "function Construct (Obj : Parent_Class) return Parent_Class_Ptr" it behaves the same manner? I.e., the childs have full access to the methods and can even override them? 

> > since I cannot call the funtion from inside the class, using
> > something like Object.Method.
> 
> X.Op is just a syntactic sugar for Op (X). It has nothing to do with an
> operation being a method or not, except that in Ada the sugar is allowed
> only for certain types of methods, rather than universally.
> 
> (The operation Op is a method of the type T in one of its arguments or the
> result, when the type of that argument or result is T and Op is covariant
> in it.)
> > So I need to fix the
> > package.function_constructor call and use a call of type
> > object.method_constructor.
> 
> Why?

Well, the prefixed notation if I understood well was made exactly for filling this. For me it's not just sugar, since I use it frequently. I can even cite the Rationale for Ada 2005 pg. 33, "the Ada 95 object oriented model has been criticized for not being really OO since the notation for applying a subprogram (method) to an object emphasizes the subprogram and not the object.". So that's why I try not to use the package.function approach, and one of the premisses of using the prefixed notation is "Y is the first parameter of Op".
 
> What is wrong with the abstract factory pattern?

Nothing wrong. I'm not questioning this.



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-09-30 14:04       ` Rego, P.
@ 2011-09-30 16:29         ` Robert A Duff
  2011-09-30 19:14           ` Rego, P.
  2011-09-30 16:42         ` Dmitry A. Kazakov
  1 sibling, 1 reply; 28+ messages in thread
From: Robert A Duff @ 2011-09-30 16:29 UTC (permalink / raw)


"Rego, P." <pvrego@gmail.com> writes:

> Well, the prefixed notation if I understood well was made exactly for
> filling this. For me it's not just sugar, since I use it frequently.

Heh?  "Sugar" doesn't mean "infrequently used".

> I can even cite the Rationale for Ada 2005 pg. 33, "the Ada 95 object
> oriented model has been criticized for not being really OO since the
> notation for applying a subprogram (method) to an object emphasizes
> the subprogram and not the object.".

Yes, it's true that Ada 95 was criticized in that way.
However, I think such criticism was complete nonsense.
Whatever "object oriented" means, surely it doesn't have
anything to do with notation.

It's fine to use the prefix notation if you think it's more readable,
but you shouldn't attach any semantic significance to it -- it really is
just syntactic sugar.

> ...So that's why I try not to use the package.function approach, and
> one of the premisses of using the prefixed notation is "Y is the first
> parameter of Op".

You can't use an operation of an object to create that same object,
because it doesn't exist yet.

- Bob



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-09-30 14:04       ` Rego, P.
  2011-09-30 16:29         ` Robert A Duff
@ 2011-09-30 16:42         ` Dmitry A. Kazakov
  2011-09-30 19:42           ` Rego, P.
  2011-11-09  2:24           ` Rego, P.
  1 sibling, 2 replies; 28+ messages in thread
From: Dmitry A. Kazakov @ 2011-09-30 16:42 UTC (permalink / raw)


On Fri, 30 Sep 2011 07:04:24 -0700 (PDT), in comp.lang.ada you wrote:

>>> Yes, I agree. But that's the point. I want to reserve the address (so I
>>> can build my queues from there).
>> 
>> The problem is not the result, but the argument of Construct.
> 
> Ok. But did not understand the problem if the argument is null.

Because null cannot be dereferenced. If you want null allowed you have to
declare it as:

   function Construct (Object_Reference : access Parent_Class)
      return Parent_Class_Ptr;

or

   function Construct (Object_Reference : Parent_Class_Ptr)
      return Parent_Class_Ptr;

The first variant is a "method" of Parent_Class in the first argument. The
second variant is not.

> So if I inherit a class

Technically you cannot inherit class. Class is a set of types closed upon
derivation. When you derive type S from type T, then S and T are members of
the class rooted in the type T. S inherits operations etc from T.

What in C++ is called class is in Ada a tagged type and/or a class-wide
type, because C++ fails to distinguish them.

> which have a method defined in the "function Construct return
> Parent_Class_Ptr"

Construct is not a "method" of Parent_Class because there is no covariant
argument/result of that type.

> form instead of the "function Construct (Obj :
>  Parent_Class) return Parent_Class_Ptr"

This one is a "method" (primitive operation in Ada terms) in the argument
Obj. It is still not a "method" in the result.

> it behaves the same manner? I.e.,
> the childs have full access to the methods and can even override them? 

This is confused.

1. In Ada access is based on visibility, which in turn rely on the packages
structure, not types.

2. Inheritance and overriding is related to tagged types. You can always
derive from a type which view is tagged. (A type can be privately tagged,
but publicly not, from this type you cannot derive)

>>> So I need to fix the
>>> package.function_constructor call and use a call of type
>>> object.method_constructor.
>> 
>> Why?
> 
> Well, the prefixed notation if I understood well was made exactly for
> filling this.

Prefix notation works only if you have the first argument of tagged type.
The questions are why do you need an argument which is null? Why do you
need access types at all. It does not look how things are usually done in
Ada.

>> What is wrong with the abstract factory pattern?
> 
> Nothing wrong. I'm not questioning this.

So why don't you use it?

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-09-30 16:29         ` Robert A Duff
@ 2011-09-30 19:14           ` Rego, P.
  0 siblings, 0 replies; 28+ messages in thread
From: Rego, P. @ 2011-09-30 19:14 UTC (permalink / raw)


> It's fine to use the prefix notation if you think it's more readable,
> but you shouldn't attach any semantic significance to it -- it really is
> just syntactic sugar.
Ok. I will not (attach extra significance).
 
> You can't use an operation of an object to create that same object,
> because it doesn't exist yet.
I agree, with this declaration. But maybe Dmitry has given me a good idea if I declare the method for an access parameter (so the null problem would not exist anymore, right?). 



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-09-30 16:42         ` Dmitry A. Kazakov
@ 2011-09-30 19:42           ` Rego, P.
  2011-10-06 12:46             ` Julian Leyh
  2011-11-09  2:24           ` Rego, P.
  1 sibling, 1 reply; 28+ messages in thread
From: Rego, P. @ 2011-09-30 19:42 UTC (permalink / raw)
  Cc: mailbox

> Because null cannot be dereferenced. If you want null allowed you have to
> declare it as:
>    function Construct (Object_Reference : access Parent_Class)
>       return Parent_Class_Ptr;
> or
>    function Construct (Object_Reference : Parent_Class_Ptr)
>       return Parent_Class_Ptr;
> The first variant is a "method" of Parent_Class in the first argument. The
> second variant is not.

Maybe it's a good idea :-) . The first variant I guess could fit me very well, and I did not think about it before.
 
> Technically you cannot inherit class. Class is a set of types closed upon
> derivation. When you derive type S from type T, then S and T are members of
> the class rooted in the type T. S inherits operations etc from T.
> What in C++ is called class is in Ada a tagged type and/or a class-wide
> type, because C++ fails to distinguish them.
> 1. In Ada access is based on visibility, which in turn rely on the packages
> structure, not types.
> 2. Inheritance and overriding is related to tagged types. You can always
> derive from a type which view is tagged. (A type can be privately tagged,
> but publicly not, from this type you cannot derive)

Ok. I follow you.

> Prefix notation works only if you have the first argument of tagged type.
> The questions are why do you need an argument which is null? Why do you
> need access types at all. It does not look how things are usually done in
> Ada.

Well, I'm trying to implement a kind of finite group for using with an AI algorithm. So I need to construct an empty queue (filled when the system starts) which points to other types of empty queues but which are been filled when the system learns.
 
> >> What is wrong with the abstract factory pattern?
> > 
> > Nothing wrong. I'm not questioning this.
> 
> So why don't you use it?
A good point. No reason at all. Maybe it can simplify some things.
--
Dmitry and Bob, thank you for always helping me in my Ada learning. I'm very grateful (for you and others I did not cite here or the list would be very long).



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-09-30 19:42           ` Rego, P.
@ 2011-10-06 12:46             ` Julian Leyh
  0 siblings, 0 replies; 28+ messages in thread
From: Julian Leyh @ 2011-10-06 12:46 UTC (permalink / raw)


On 30 Sep., 21:42, "Rego, P." <pvr...@gmail.com> wrote:
> > Because null cannot be dereferenced. If you want null allowed you have to
> > declare it as:
> >    function Construct (Object_Reference : access Parent_Class)
> >       return Parent_Class_Ptr;
> > or
> >    function Construct (Object_Reference : Parent_Class_Ptr)
> >       return Parent_Class_Ptr;
> > The first variant is a "method" of Parent_Class in the first argument. The
> > second variant is not.
>
> Maybe it's a good idea :-) . The first variant I guess could fit me very well, and I did not think about it before.

In this Case, you could turn it into a procedure with Object_Reference
being an out parameter:

    procedure Construct (Object_Reference : out Parent_Class_Ptr);

and then call it like you wanted:

    procedure Main is
       Obj : Parent_Class_Ptr;
    begin
       Obj.Construct;
    end Main;



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-09-29 19:40 Constructors with multiple inheritance Rego, P.
  2011-09-29 20:20 ` Dmitry A. Kazakov
@ 2011-10-07  0:08 ` Shark8
  1 sibling, 0 replies; 28+ messages in thread
From: Shark8 @ 2011-10-07  0:08 UTC (permalink / raw)


On Sep 29, 2:40 pm, "Rego, P." <pvr...@gmail.com> wrote:
> Hi people
>
> I have a package which implements a class with two items which actually are classes which builds different kind of queues. One of them is a queue whose items are of the kind of the parent class. I need to implement a constructor to the parent class, then I need to implement the constructors for the two queues. For me, it`s more intuitive from OO point of view that the three constructors are implemented as methods (not just independent calls), and that was just the point where I got stuck.
>
> So, the packages are declared as
>
> ------------------------
> -- parent_package.ads --
> ------------------------
> limited with Parent_Package.Child_Package;
> package Parent_Package is
>    type Parent_Class is tagged
>       record
>          Child : access Child_Package.Parent_Queue_Class;
>          Modes : access Child_Package.Modes_Queue_Class;
>       end record;
>    type Parent_Class_Ptr is access all Parent_Class;
>    function Construct (Sender : in Parent_Class) return Parent_Class_Ptr;
> end Parent_Package;
>
> ------------------------
> -- parent_package.adb --
> ------------------------
> with Parent_Package.Child_Package;
> package body Parent_Package is
>    function Construct (Sender : in Parent_Class) return Parent_Class_Ptr is
>       New_Parent : constant Parent_Class_Ptr := new Parent_Class;
>    begin
>       New_Parent.Child := Sender.Child.Construct;
>       New_Parent.Modes := Sender.Modes.Construct;
>       return New_Parent;
>    end Construct;
> end Parent_Package;
>
> --------------------------------------
> -- parent_package-child_package.ads --
> --------------------------------------
> package Parent_Package.Child_Package is
>    type Parent_Queue_Class is tagged
>       record
>          Next   : access Parent_Queue_Class;
>          Parent : access Parent_Class;
>       end record;
>    type Parent_Queue_Class_Ptr is access all Parent_Queue_Class;
>    function Construct (Sender : in Parent_Queue_Class) return Parent_Queue_Class_Ptr;
>
>    type Modes_Queue_Class is tagged
>       record
>          Next : access Modes_Queue_Class;
>          Mode : Integer;
>       end record;
>    type Modes_Queue_Class_Ptr is access Modes_Queue_Class;
>    function Construct (Sender : in Modes_Queue_Class) return Modes_Queue_Class_Ptr;
> end Parent_Package.Child_Package;
>
> --------------------------------------
> -- parent_package-child_package.ads --
> --------------------------------------
> package body Parent_Package.Child_Package is
>    function Construct
>      (Sender : in Parent_Queue_Class) return Parent_Queue_Class_Ptr is
>       pragma Unreferenced (Sender);
>       New_Queue : constant Parent_Queue_Class_Ptr := new Parent_Queue_Class;
>    begin
>       return New_Queue;
>    end Construct;
>
>    function Construct
>      (Sender : in Modes_Queue_Class) return Modes_Queue_Class_Ptr is
>       pragma Unreferenced (Sender);
>       New_Queue : constant Modes_Queue_Class_Ptr := new Modes_Queue_Class;
>    begin
>       New_Queue.Mode := 0;
>       return New_Queue;
>    end Construct;
> end Parent_Package.Child_Package;
>
> ---------------------
> -- parent_main.adb --
> ---------------------
> with Parent_Package;
> procedure Parent_Main is
>    Obj : Parent_Package.Parent_Class_Ptr;
> begin
>    Obj := Obj.Construct;
> end Parent_Main;
>
> ---------------------------
> when I build the code, I get the messages:
>         warning: useless assignment to "Obj", value never referenced (ok, I agree sure)
>         warning: null value not allowed here
>         warning: "Constraint_Error" will be raised at run time
>
> and sure when I execute the code I get
>         raised CONSTRAINT_ERROR : parent_main.adb:5 access check failed
>
>         (BTW, if I implement the constructors independent from the class - i.e. without referencing the parent class as the argument -, they return no error message and the results after that are according to expected, but sure it breaks the oo design.)
>
> So, how can I fix this?
> Thanks!

Easiest way?
Probably to change "function Construct (Sender : in Parent_Class)
return Parent_Class_Ptr" to something like:
"procedure (Item : out Parent_Class_Ptr)"



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-09-30 16:42         ` Dmitry A. Kazakov
  2011-09-30 19:42           ` Rego, P.
@ 2011-11-09  2:24           ` Rego, P.
  2011-11-09  8:39             ` Dmitry A. Kazakov
  2011-11-09  9:00             ` Simon Wright
  1 sibling, 2 replies; 28+ messages in thread
From: Rego, P. @ 2011-11-09  2:24 UTC (permalink / raw)
  Cc: mailbox

>    function Construct (Object_Reference : access Parent_Class)
>       return Parent_Class_Ptr;

I tried this approach in the following code, but it still complains about the null object. 

    -- test_pkg.ads
    package Test_Pkg is
       type Test_Class is tagged;
       type Test_Class_Ptr is access all Test_Class;

       function Construct (T : access Test_Class) return Test_Class_Ptr;

       task type Primary_Task (This : not null access Test_Class);

       type Test_Class is tagged limited
          record
             Info    : Integer := 0;
             Value   : Float;
             Primary : Primary_Task (Test_Class'Access);
          end record;
    end Test_Pkg;

    -- test_pkg.adb
    with Text_IO; use Text_IO;
    package body Test_Pkg is
       task body Primary_Task is
       begin
          loop
             Put_Line (Integer'Image (This.Info) & "__");
             delay 0.2;
          end loop;
       end Primary_Task;

       function Construct (T : access Test_Class) return Test_Class_Ptr is
          T_Ptr : constant Test_Class_Ptr := new Test_Class;
       begin
          T_Ptr.Info := T.Info + 1;
          T_Ptr.Value := 0.0;
          return T_Ptr;
       end Construct;
    end Test_Pkg;

    -- test_pkg_user.adb
    with Test_Pkg;
    with Text_IO; use Text_IO;

    procedure Test_Pkg_User is
       Test_Obj : Test_Pkg.Test_Class_Ptr;
    begin
       Test_Obj := Test_Obj.Construct;
       Put_Line ("Value = "&Integer'Image (Test_Obj.Info));
    end Test_Pkg_User;

The message I get is the following:
    c:\tst>gnatmake test_pkg_user.adb
    gcc -c test_pkg_rev623_user.adb
    test_pkg_user.adb:12:16: warning: null value not allowed here
    test_pkg_user.adb:12:16: warning: "Constraint_Error" will be raised at run time
    gcc -c test_pkg.adb
    gnatbind -x test_pkg_user.ali
    gnatlink test_pkg_user.ali

What am I still doing wrong? Thanks again.

Note: Sure if I put in test_pkg_user.adb
    Test_Obj : Test_Pkg.Test_Class_Ptr := new Test_Pkg.Test_Class; 
it returns me a build with no warning, but I think this way I allocate memory twice to the pointer (one in the call new Test_Pkg.Test_Class and the other in the construct method execution), right?



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-09  2:24           ` Rego, P.
@ 2011-11-09  8:39             ` Dmitry A. Kazakov
  2011-11-10  3:47               ` Rego, P.
  2011-11-09  9:00             ` Simon Wright
  1 sibling, 1 reply; 28+ messages in thread
From: Dmitry A. Kazakov @ 2011-11-09  8:39 UTC (permalink / raw)


On Tue, 8 Nov 2011 18:24:53 -0800 (PST), Rego, P. wrote:

> What am I still doing wrong? Thanks again.

1. Test_Obj is null pointer.
2- Objects are not constructed that way.
3. Memory leak
4. Tasks component does not terminate, which will block finalization of the
object

P.S. I absolutely fail to comprehend what are you trying to do. Virtually
every second line of the sample you posted looks wrong. May I suggest you
to formulate what do you actually want? People here might show you right
patterns to achieve that goal.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-09  2:24           ` Rego, P.
  2011-11-09  8:39             ` Dmitry A. Kazakov
@ 2011-11-09  9:00             ` Simon Wright
  2011-11-10  3:54               ` Rego, P.
  1 sibling, 1 reply; 28+ messages in thread
From: Simon Wright @ 2011-11-09  9:00 UTC (permalink / raw)


"Rego, P." <pvrego@gmail.com> writes:

>     procedure Test_Pkg_User is
>        Test_Obj : Test_Pkg.Test_Class_Ptr;
>     begin
>        Test_Obj := Test_Obj.Construct;
>        Put_Line ("Value = "&Integer'Image (Test_Obj.Info));
>     end Test_Pkg_User;
>
> The message I get is the following:
>     c:\tst>gnatmake test_pkg_user.adb
>     gcc -c test_pkg_rev623_user.adb
>     test_pkg_user.adb:12:16: warning: null value not allowed here
>     test_pkg_user.adb:12:16: warning: "Constraint_Error" will be raised at run time
>     gcc -c test_pkg.adb
>     gnatbind -x test_pkg_user.ali
>     gnatlink test_pkg_user.ali
>
> What am I still doing wrong? Thanks again.
>
> Note: Sure if I put in test_pkg_user.adb
>     Test_Obj : Test_Pkg.Test_Class_Ptr := new Test_Pkg.Test_Class;
> it returns me a build with no warning, but I think this way I allocate
> memory twice to the pointer (one in the call new Test_Pkg.Test_Class
> and the other in the construct method execution), right?

The declaration

   function Construct (T : access Test_Class) return Test_Class_Ptr;

requires T not to be null because of ARM2005 3.10(13.1/2) [1]

   "In addition, the anonymous access subtype defined by the
   access_definition for a controlling access parameter (see 3.9.2)
   excludes null."

Of course, as your code stands, even if you changed Construct to

   function Construct (T : Test_Class_Ptr) return Test_Class_Ptr;

the call would fail anyway because you don't check for T being null
before saying

      T_Ptr.Info := T.Info + 1;

[1] http://www.adaic.org/resources/add_content/standards/05rm/html/RM-3-10.html



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-09  8:39             ` Dmitry A. Kazakov
@ 2011-11-10  3:47               ` Rego, P.
  2011-11-10  7:09                 ` AdaMagica
                                   ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: Rego, P. @ 2011-11-10  3:47 UTC (permalink / raw)
  Cc: mailbox

> 1. Test_Obj is null pointer.
> 2- Objects are not constructed that way.
> 3. Memory leak
> 4. Tasks component does not terminate, which will block finalization of the
> object
> 
> P.S. I absolutely fail to comprehend what are you trying to do. Virtually
> every second line of the sample you posted looks wrong. May I suggest you
> to formulate what do you actually want? People here might show you right
> patterns to achieve that goal.

I'm having a big difficult in simplifying the problem, but I will try. Initially forget about the task termination, I plan to implement it as other services to run from inside other tasks which are going to communicate with each other, but for now it's just future. I also know that there's memory leak, and that the object is null.

Maybe I can explain this easier trying to use C++. Let's suppose I have a class Par_Class with an integer and a pointer to a string. I could code, for example, (please correct me if I'm doing wrong)

class Par_Class {
public:
  Par_Class (int aValue, const char *aName);

private:
  int theValue;
  char *theName;
};

the constructor could be implemented as

Par_Class::Par_Class (int aValue, const char *aName){
  theValue = aValue;
  strcpy (theName, aName);
};

and finally we could instantiate this class with

Par_Class Par_Obj (23, "My object is this");

and sure this constructor method belongs to the class Par_Class and not to any other class.

In Ada 2005, this class could be coded, for example, as

--par_pkg.ads
package Par_Pkg is
   type Par_Class is tagged private;
   type Par_Class_Ptr is access all Par_Class;
   type Integer_Ptr is access Integer;

   function Construct 
     (P : access Par_Class; aValue : Integer; aName : Integer_Ptr)
      return Par_Class_Ptr;

private
   type Par_Class is tagged
      record
         theValue : Integer;
         theName  : Integer_Ptr;
      end record;
end Par_Pkg;

-- par_pkg.adb
package body Par_Pkg is
   function Construct 
     (P : access Par_Class; aValue : Integer; aName : Integer_Ptr)
      return Par_Class_Ptr is
      pragma Unreferenced (P);
      P_Ptr : constant Par_Class_Ptr := new Par_Class;
   begin
      P_Ptr.theValue := aValue;
      P_Ptr.theName := aName;
      return P_Ptr;
   end Construct;

end Par_Pkg;

and the user could call

with Par_Pkg; use Par_Pkg;
procedure Par_Main is
   Par_Obj : Par_Class_Ptr;
   Int_Obj : Integer_Ptr;
begin
   Int_Obj := new Integer;
   Int_Obj.all := 12; -- don't worry about been string or integer
   Par_Obj := Par_Obj.Construct 
     (aValue => 23,
      aName => Int_Obj);
end Par_Main;

The compiler says me that Par_Obj is null when I use Par_Obj := Par_Obj.Construct, and I know it, and agree with it, because exactly what I want to do is to initialize my object (and so the object is not null anymore), so I can access other stuffs which are not shown here. I don't want to have a Constructor without class parameter (so according to Ada 2005 Rationale it would not be a method of the class Par_Class), because it runs away from my system architecture. 

So, I would like to now if there is a way, in Ada 2005, on how I can use a method-like function (using this definition of the class from AR2005, even though exist other definitions). If there's no solution for this, no problem, I use the pure Construct implementation, it's already running ok, but I prefer to use this (possibly) other implementation scheme, if I can use.

Thank you again.



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-09  9:00             ` Simon Wright
@ 2011-11-10  3:54               ` Rego, P.
  0 siblings, 0 replies; 28+ messages in thread
From: Rego, P. @ 2011-11-10  3:54 UTC (permalink / raw)


Thanks Simon, this RM link can be a good reading for me. Thanks also for the comments.



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-10  3:47               ` Rego, P.
@ 2011-11-10  7:09                 ` AdaMagica
  2011-11-10  7:20                   ` AdaMagica
                                     ` (2 more replies)
  2011-11-10  8:33                 ` Simon Wright
                                   ` (2 subsequent siblings)
  3 siblings, 3 replies; 28+ messages in thread
From: AdaMagica @ 2011-11-10  7:09 UTC (permalink / raw)


package Par_Pkg is

  type Par_Class is tagged private;

  function Construct (aValue: Integer; aName: Integer)
    return Par_Class;

private

  type Par_Class is tagged record
    theValue: Integer;
    theName : Integer;
  end record;

end Par_Pkg;
package body Par_Pkg is

  function Construct (aValue: Integer; aName: Integer)
                      return Par_Class is
  begin
    return (theValue => aValue,
            theName  => aName);
  end Construct;

end Par_Pkg;
with Par_Pkg;
use  Par_Pkg;

procedure Par_Main is

  Par_Obj: Par_Class := Construct (aValue => 12, aName => 23);

begin

  null;

end Par_Main;



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-10  7:09                 ` AdaMagica
@ 2011-11-10  7:20                   ` AdaMagica
  2011-11-10  8:35                   ` Dmitry A. Kazakov
  2011-11-12 15:30                   ` Rego, P.
  2 siblings, 0 replies; 28+ messages in thread
From: AdaMagica @ 2011-11-10  7:20 UTC (permalink / raw)


What I have to add: Construct is a primitive operation of Par_Class (a
method) because it has a return value of this type.

However, upon derivation, is becomes abstract and must be overridden,
but most probably will be useless, since new parameters will be
needed. So constructor functions should perhaps preferably not be
primitive. You can do this be declaring Construct in a nested package.

Note that you don't need access parameters. As Randy Brukard repeats
to say: Do not use access parameters and do not use access types. The
new container library can help avoid access types.



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-10  3:47               ` Rego, P.
  2011-11-10  7:09                 ` AdaMagica
@ 2011-11-10  8:33                 ` Simon Wright
  2011-11-10  9:01                 ` Georg Bauhaus
  2011-11-10 18:16                 ` Jeffrey Carter
  3 siblings, 0 replies; 28+ messages in thread
From: Simon Wright @ 2011-11-10  8:33 UTC (permalink / raw)


"Rego, P." <pvrego@gmail.com> writes:

> Maybe I can explain this easier trying to use C++. Let's suppose I
> have a class Par_Class with an integer and a pointer to a string. I
> could code, for example, (please correct me if I'm doing wrong)
>
> class Par_Class {
> public:
>   Par_Class (int aValue, const char *aName);
>
> private:
>   int theValue;
>   char *theName;
> };
>
> the constructor could be implemented as
>
> Par_Class::Par_Class (int aValue, const char *aName){
>   theValue = aValue;
>   strcpy (theName, aName);
> };
>
> and finally we could instantiate this class with
>
> Par_Class Par_Obj (23, "My object is this");
>
> and sure this constructor method belongs to the class Par_Class and
> not to any other class.

Par_Class (int aValue, const char *aName) is the very special C++
constructor syntax; when used the compiler generates a new blank area of
memory and the constructor gets to fill it in.

This is *not* the same as 

   function Construct 
     (P : access Par_Class; aValue : Integer; aName : Integer_Ptr)
      return Par_Class_Ptr;

which requires there to be a previous Par_Class instance; the nearest
(Ada 2012) equivalent is I think

   function Construct 
     (aValue : Integer; aName : Integer_Ptr)
      return Par_Class is
   begin
      return Result : Par_Class do
         Result.theValue := aValue;
         Result.theName := aName;
      end return;
   end Construct;

or, OK for Ada 95 and nearest to your present scheme:

   function Construct 
     (aValue : Integer; aName : Integer_Ptr)
      return Par_Class_Ptr is
      P_Ptr : constant Par_Class_Ptr := new Par_Class;
   begin
      P_Ptr.theValue := aValue;
      P_Ptr.theName := aName;
      return P_Ptr;
   end Construct;



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-10  7:09                 ` AdaMagica
  2011-11-10  7:20                   ` AdaMagica
@ 2011-11-10  8:35                   ` Dmitry A. Kazakov
  2011-11-12 15:16                     ` Rego, P.
  2011-11-12 15:30                   ` Rego, P.
  2 siblings, 1 reply; 28+ messages in thread
From: Dmitry A. Kazakov @ 2011-11-10  8:35 UTC (permalink / raw)


On Wed, 9 Nov 2011 23:09:51 -0800 (PST), AdaMagica wrote:

> package Par_Pkg is
> 
>   type Par_Class is tagged private;
> 
>   function Construct (aValue: Integer; aName: Integer)
>     return Par_Class;

If the object is not copyable, contains a task component, will likely
require finalization, then

   type Par_Class (<>) is
      new Ada.Finalization.Limited_Controlled with private;

<> prevents uninitialized objects.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-10  3:47               ` Rego, P.
  2011-11-10  7:09                 ` AdaMagica
  2011-11-10  8:33                 ` Simon Wright
@ 2011-11-10  9:01                 ` Georg Bauhaus
  2011-11-10  9:09                   ` Georg Bauhaus
  2011-11-10 18:16                 ` Jeffrey Carter
  3 siblings, 1 reply; 28+ messages in thread
From: Georg Bauhaus @ 2011-11-10  9:01 UTC (permalink / raw)


On 11/10/11 4:47 AM, Rego, P. wrote:

> The compiler says me that Par_Obj is null when I use Par_Obj := Par_Obj.Construct, and I know it, and agree with it, because exactly what I want to do is to initialize my object (and so the object is not null anymore), so I can access other stuffs which are not shown here. I don't want to have a Constructor without class parameter (so according to Ada 2005 Rationale it would not be a method of the class Par_Class), because it runs away from my system architecture.

Ada, not exactly like C++, defines a function Construct returning
a type Par_Class object such that

(1) result type Par_Class belongs to the parameter profile of
     function  Construct just  like any other parameter

(2) function Construct is a member of the set of primitive subprograms
     of the type Par_Class (a "method"), agreeing with (1)

Your diagnosis seems influenced by a (mis-)understanding that
stems from C++. The diagnosis does not apply to Ada functions,
for two reasons.

First, Ada functions' results can and will take part in dispatching
by result type. Just like other parameters. There is no need
to pass a ***_Ptr to this effect (that it will not have).

Therefore, if you just write a function whose result type is Par_Class,
then the function is a "method" of type Par_Class.  Christoph has show
how to do this, see the package in AdaMagica's latest posting.

Second, note that even in C++, the constructor is *not* a method
of the class.  It does not return a pointer. Even when there is
the "this" pointer within the definitions of the class. (So
when I declare an object of a C++ class like

    Par_Class x = Par_Class(6, "foo"); // C++

then this is just fine without pointers.)

To be more like C++ then, function Construct would simply return an
object of type Par_Class, like Christoph has show.

Is it required in your case that every component of Par_Class should
be a pointer to an object, even those of some integer type?
You could write (later, not in the package defining type Par_Class)
declare

    X : Par_Class :=  Par_Class'(Construct(6, "foo"));

or

    type All_Those_Par_Classes_Ref is access Par_Class'Class;

    X : All_Those_Par_Classes_Ref := new Some_Par_Class'(Construct(a, b, c));

where the first Construct function is the primitive subprogram
of type Par_Class; and the seconds Construct function is overriding
it for a type Some_Par_Class that itself is derived from Par_Class.


As a final remark, mentioning "class" when discussing Ada can be confusing
unless "class" should mean class-wide, a type that only T'Class will denote.



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-10  9:01                 ` Georg Bauhaus
@ 2011-11-10  9:09                   ` Georg Bauhaus
  0 siblings, 0 replies; 28+ messages in thread
From: Georg Bauhaus @ 2011-11-10  9:09 UTC (permalink / raw)


On 11/10/11 10:01 AM, Georg Bauhaus wrote:

> type All_Those_Par_Classes_Ref is access Par_Class'Class;
>
> X : All_Those_Par_Classes_Ref := new Some_Par_Class'(Construct(a, b, c));

  ... Construct(a, b);

because overriding cannot add parameters. See AdaMagica's response.
Indeed, a function that is not a primitive subprogram of Par_Class
will be more flexible.




^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-10  3:47               ` Rego, P.
                                   ` (2 preceding siblings ...)
  2011-11-10  9:01                 ` Georg Bauhaus
@ 2011-11-10 18:16                 ` Jeffrey Carter
  2011-11-10 19:39                   ` Dmitry A. Kazakov
  3 siblings, 1 reply; 28+ messages in thread
From: Jeffrey Carter @ 2011-11-10 18:16 UTC (permalink / raw)


On 11/09/2011 08:47 PM, Rego, P. wrote:
>
> class Par_Class {
> public:
>    Par_Class (int aValue, const char *aName);
>
> private:
>    int theValue;
>    char *theName;
> };

private with Ada.Strings.Unbounded;

package Par is
    type Class is private;

    function Create (Value : in Integer; Name : in String);
private -- Par
    type Class is record
       Value : Integer := Integer'First;
       Name  : Ada.Strings.Unbounded.Unbounded_String;
    end record;
end Par;

package body Par is
    function Create (Value : in Integer; Name : in String) is
       -- null;
    begin -- Create
       return Class'(Value => Value,
                     Name  => Ada.Strings.Unbounded.To_Unbounded_String (Name) );
    end Create;
end Par;

No need for tagged types or access types for this example.

-- 
Jeff Carter
"Well, a gala day is enough for me. I don't think
I can handle any more."
Duck Soup
93



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-10 18:16                 ` Jeffrey Carter
@ 2011-11-10 19:39                   ` Dmitry A. Kazakov
  0 siblings, 0 replies; 28+ messages in thread
From: Dmitry A. Kazakov @ 2011-11-10 19:39 UTC (permalink / raw)


On Thu, 10 Nov 2011 11:16:24 -0700, Jeffrey Carter wrote:

> On 11/09/2011 08:47 PM, Rego, P. wrote:
>>
>> class Par_Class {
>> public:
>>    Par_Class (int aValue, const char *aName);
>>
>> private:
>>    int theValue;
>>    char *theName;
>> };
> 
> private with Ada.Strings.Unbounded;
> 
> package Par is
>     type Class is private;
> 
>     function Create (Value : in Integer; Name : in String);
> private -- Par
>     type Class is record
>        Value : Integer := Integer'First;
>        Name  : Ada.Strings.Unbounded.Unbounded_String;
>     end record;
> end Par;
> 
> package body Par is
>     function Create (Value : in Integer; Name : in String) is
>        -- null;
>     begin -- Create
>        return Class'(Value => Value,
>                      Name  => Ada.Strings.Unbounded.To_Unbounded_String (Name) );
>     end Create;
> end Par;
> 
> No need for tagged types or access types for this example.

No need in unbounded strings either:

   type Class (<>) is private;
   function Create (Value : in Integer; Name : in String) return Class;
private
   type Class (Length : Natural) is record
       Value : Integer := Integer'First;
       Name : String (1..Length);
    end record;

   function Create (Value : in Integer; Name : in String) return Class is
   begin
       return (Length => Name'Length, Value => Value, Name => Name);
   end Create;

IMO, unbounded strings should be used only in two cases:

1. The container type must be constrained (e.g. to place its objects into
arrays etc)

2. The component is varying during object's life.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-10  8:35                   ` Dmitry A. Kazakov
@ 2011-11-12 15:16                     ` Rego, P.
  0 siblings, 0 replies; 28+ messages in thread
From: Rego, P. @ 2011-11-12 15:16 UTC (permalink / raw)
  Cc: mailbox

> If the object is not copyable, contains a task component, will likely
> require finalization, then
> 
>    type Par_Class (<>) is
>       new Ada.Finalization.Limited_Controlled with private;
> 
> <> prevents uninitialized objects.

This will help me very much in the next step (soon) :-)



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-10  7:09                 ` AdaMagica
  2011-11-10  7:20                   ` AdaMagica
  2011-11-10  8:35                   ` Dmitry A. Kazakov
@ 2011-11-12 15:30                   ` Rego, P.
  2011-11-12 16:28                     ` Dmitry A. Kazakov
  2 siblings, 1 reply; 28+ messages in thread
From: Rego, P. @ 2011-11-12 15:30 UTC (permalink / raw)


>   function Construct (aValue: Integer; aName: Integer)
>                       return Par_Class is
>   begin
>     return (theValue => aValue,
>             theName  => aName);
>   end Construct;

In this case function Construct would behave as a C++ static function (or maybe a friend one?)?



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-12 15:30                   ` Rego, P.
@ 2011-11-12 16:28                     ` Dmitry A. Kazakov
  2011-11-12 17:41                       ` Rego, P.
  0 siblings, 1 reply; 28+ messages in thread
From: Dmitry A. Kazakov @ 2011-11-12 16:28 UTC (permalink / raw)


On Sat, 12 Nov 2011 07:30:29 -0800 (PST), Rego, P. wrote:

>>   function Construct (aValue: Integer; aName: Integer)
>>                       return Par_Class is
>>   begin
>>     return (theValue => aValue,
>>             theName  => aName);
>>   end Construct;
> 
> In this case function Construct would behave as a C++ static function (or maybe a friend one?)?

That depends on what you mean. In Ada:

1. there is no hidden parameters

2. an operation can be dispatching (virtual) in any combination of
parameters and/or result. But an operation cannot be dispatching in more
than one type (no multiple dispatch). All tags of dispatching parameters
must be same (no multi-methods).

3. there is no static or friend operations as the visibility rules are
based on packages.

The function Construct above is a primitive operation, it is not a
constructor.

Constructors in Ada are implicit, they consist of

1. construction of the components (in an unspecified order, recursively);

2. a call to Initialize if the type is a descendant of
Ada.Finalization.[Limited_]Controlled. (Overridden bodies of Initialize are
not called! I.e. Ada constructors do not traverse derivation path. In
short, aggregation is safe, derivation is not;

3. starting all task components. (Note, tasks are not running when
Initialize is called!)

Destructors act in the reverse order: tasks - Finalize - components.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Constructors with multiple inheritance
  2011-11-12 16:28                     ` Dmitry A. Kazakov
@ 2011-11-12 17:41                       ` Rego, P.
  0 siblings, 0 replies; 28+ messages in thread
From: Rego, P. @ 2011-11-12 17:41 UTC (permalink / raw)
  Cc: mailbox

Got it. 



^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2011-11-12 17:42 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-29 19:40 Constructors with multiple inheritance Rego, P.
2011-09-29 20:20 ` Dmitry A. Kazakov
2011-09-30  3:11   ` Rego, P.
2011-09-30  7:36     ` Dmitry A. Kazakov
2011-09-30 14:04       ` Rego, P.
2011-09-30 16:29         ` Robert A Duff
2011-09-30 19:14           ` Rego, P.
2011-09-30 16:42         ` Dmitry A. Kazakov
2011-09-30 19:42           ` Rego, P.
2011-10-06 12:46             ` Julian Leyh
2011-11-09  2:24           ` Rego, P.
2011-11-09  8:39             ` Dmitry A. Kazakov
2011-11-10  3:47               ` Rego, P.
2011-11-10  7:09                 ` AdaMagica
2011-11-10  7:20                   ` AdaMagica
2011-11-10  8:35                   ` Dmitry A. Kazakov
2011-11-12 15:16                     ` Rego, P.
2011-11-12 15:30                   ` Rego, P.
2011-11-12 16:28                     ` Dmitry A. Kazakov
2011-11-12 17:41                       ` Rego, P.
2011-11-10  8:33                 ` Simon Wright
2011-11-10  9:01                 ` Georg Bauhaus
2011-11-10  9:09                   ` Georg Bauhaus
2011-11-10 18:16                 ` Jeffrey Carter
2011-11-10 19:39                   ` Dmitry A. Kazakov
2011-11-09  9:00             ` Simon Wright
2011-11-10  3:54               ` Rego, P.
2011-10-07  0:08 ` Shark8

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox