comp.lang.ada
 help / color / mirror / Atom feed
  • [parent not found: <kduY5.4872$M5.273278@news1.frmt1.sfba.home.com>]
  • * Re: Ada OOP question
           [not found] <20001209101904.07653.00004016@ng-fy1.aol.com>
           [not found] ` <wvtY5.11680$Ei1.812152@bgtnsc05-news.ops.worldnet.att.net>
           [not found] ` <kduY5.4872$M5.273278@news1.frmt1.sfba.home.com>
    @ 2000-12-12 21:57 ` Stephen Leake
      2 siblings, 0 replies; 5+ messages in thread
    From: Stephen Leake @ 2000-12-12 21:57 UTC (permalink / raw)
    
    
    hdhil@aol.com (HDhil) writes:
    
    > Simple question re Ada OOP: Does Ada 95 allow
    > the specification of public components? 
    
    One solution is:
    
    package My_Package is
    
        type My_Object_Private is private;
    
        type My_Object is record
            public_1 : foo;
            public_2 : bar;
            private_1 : My_Object_Private;
        end type;
    
    private
        type My_Object_Private is record
            private_stuff : foo_bar;
        end record;
    end My_Package;
    
    Clients of this package can copy private_1, but can't examine inside
    it. If copying is bad, use a limited private type.
    
    -- 
    -- Stephe
    
    
    
    ^ permalink raw reply	[flat|nested] 5+ messages in thread

  • end of thread, other threads:[~2000-12-14 23:05 UTC | newest]
    
    Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
    -- links below jump to the message on this page --
         [not found] <20001209101904.07653.00004016@ng-fy1.aol.com>
         [not found] ` <wvtY5.11680$Ei1.812152@bgtnsc05-news.ops.worldnet.att.net>
    2000-12-11 21:52   ` Ada OOP question Randy Brukardt
         [not found] ` <kduY5.4872$M5.273278@news1.frmt1.sfba.home.com>
         [not found]   ` <3A32A182.54E3D857@acm.org>
         [not found]     ` <91382k$nq1$1@nnrp1.deja.com>
    2000-12-12  5:14       ` Jeff Carter
    2000-12-14 19:00         ` mark_lundquist
    2000-12-14 23:05           ` Jeff Carter
    2000-12-12 21:57 ` Stephen Leake
    

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