RE: [sv-bc] Information hiding in packages

From: Warmke, Doug <doug_warmke_at_.....>
Date: Thu May 25 2006 - 22:34:09 PDT
I don't think packages offer any data hiding or encapsulation
functionality; at least not by design.
 
Somehow the "class" construct comes to mind here.
You could model the struct data as class properties,
then use public member functions for the API and
local/protected member functions for the implementation.
 
You could declare such a class in a package, if needed.
 
Other variations are possible.
 
I think class is the best bet due to data hiding and
encapsulation features.
 
Regards,
Doug
 


________________________________

	From: owner-sv-bc@server.eda.org
[mailto:owner-sv-bc@server.eda.org] On Behalf Of Brad Pierce
	Sent: Thursday, May 25, 2006 4:40 PM
	To: sv-bc@server.eda.org
	Subject: [sv-bc] Information hiding in packages
	
	

	If I want to declare a package containing

	 

	1)       a "typedef struct"

	2)       several API functions that operate on that struct type

	3)       many lower-level functions from which the API functions
are built

	 

	what's the right way to hide the lower-level functions so that
they can't be imported? 

	 

	-- Brad

	 

	 
Received on Thu May 25 22:33:55 2006

This archive was generated by hypermail 2.1.8 : Thu May 25 2006 - 22:34:11 PDT