On Tue, 11 Jan 2005 16:28:21 +0000 Dave wrote:
DS> RS> That's fine. But what I don't want to lose is the example code in
DS> RS> container_load, which shows how to allocate the rowreq, set indexes
DS> RS> and insert the rows.
DS> 
DS> Well you wouldn't need to lose that - it's just that I'd expect to
DS> see that within ${context}_container_init.
DS> 
DS> I'm not totally convinced that it's worth splitting the initialisation
DS> in two like that - it feels like the same basic task to me.

DS> Though there does seem to something of a proliferation of initialisation
DS> routines:
DS> 
DS>     init_${context}
DS>     initialize_table_${context}
DS>     ${context}_init_data
DS>     ${context}_container_init
DS>     ${context}_container_load
DS> 
DS> (plus whatever is going on in the interface.c file, which
DS> I'm not worrying my pretty little head about).

Keep in mind that the whole idea here is to spit things into small, easy to
understand pieces (at least in the default mode).

And some of this is an artifact of having the separation of the interface file.
There could have been one big init function for the user to deal with, but then
they'd have to insert their code in the right place and not get distracted by
all the interesting stuff going on around them.

DS> RS> Besides, the separation will make the cache code easier. Reuse.
DS> 
DS> OK - now you've lost me again.
DS> What cache code?  We're talking about a *non*-caching version ?

Yes, but we are essentially taking code from one mib2c file to another. If
there is a separate load routine, if the user is using caching then the
caching conf file can just call the function defined by the container code,
instead of having to regenerate it.

-- 
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to