comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Object-Oriented Programming Question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Object-Oriented Programming Question [message #10535] Wed, 17 December 1997 00:00 Go to previous message
Peter Stoltz is currently offline  Peter Stoltz
Messages: 3
Registered: December 1997
Junior Member
> Hi everyone-

I have finally gotten around to trying out object-oriented programming
with IDL, and I have a question about data encapsulation.

I define an object structure A that has as one of its data members
another object B (A has a B). So far as I can tell, when one creates an

instance of A, one cannot invoke the methods of class B through the
syntax

IDL> a=obj_new('A')
IDL> a.b->some_method

% Object instance data is not visible outside class methods
% Execution halted

I got around this in the way one would with any other piece of member
data, by defining a method function in A that accesses the private data,
b.
Writing access methods is fine for most types of data, but I find it
pretty clumsy
when the member data happens to be another object. What I would like is
to have the
member data, b, defined as public. Before I write tons of code,
I wanted to
see if someone else had a better way of mocking up access to member data
class
methods as though that member class were public.

Thanks for any help. Also, is there a mailing list or anything
specifically about
object-oriented programming in IDL?

Peter
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL 5.0 - Educational Version
Next Topic: Vim 5 language sytax file for IDL wanted

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 00:12:15 PDT 2025

Total time taken to generate the page: 1.12075 seconds