Re: Friend a good idea here?
From: Christopher Benson-Manica (ataru_at_nospam.cyberspace.org)
Date: 07/08/04
- Next message: Phlip: "Re: how to pass smart pointes to function."
- Previous message: John Harrison: "Re: how to pass smart pointes to function."
- In reply to: Victor Bazarov: "Re: Friend a good idea here?"
- Next in thread: Phlip: "Re: Friend a good idea here?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 8 Jul 2004 20:24:29 +0000 (UTC)
Victor Bazarov <v.Abazarov@comacast.net> spoke thus:
> This "record" class seems completely innocuous. Why do you want to
> prohibit others from being able to instantiate it? I know, I know,
> you just want to keep it as simple as possible, yes?
I'm trying to design it well, part of which is to keep it simple :)
> BTW, I still don't see the big picture. Yes, you have records, yes
> you have a file of them, yes, you have a cached version of that file
> in memory. Is (using your terminology) the sole purpose of your
> exercise to keep the cached version of that file in memory, or is
> there more to it than you let on? Again, I am not asking you to
> give out secrets (if they are secrets), just try to see the bigger
> picture here.
The main purpose is to keep a log of changes to the list as they
happen, so the system can recover from a crash should such an event
occur. The records are used to store information about users that
need to be notified about something when they log on next, so
preservation of the data is important.
> Why do you need the file mirror? Does your file mirror provide the
> rest of the system with some kind of interface to the file data? Is
> the format of that file kept from the rest of the system or is it
> known and used directly? If it's not known, then yes, a nested
> (proprietary, "private") type that implements the file record format
> would probably be better, following the usual "data hiding" principle.
Yes, this is the situation; this is the only module that will be
dealing with this file and the data contained therein. So perhaps
you're right... although won't it make the implementation look a
little messier?
> It seems that we've transcended C++ scope here. Your questions are
> more on the design side of things, and are better discussed in
> comp.object newsgroup. I don't read it, but there are many very
> smart people there who can help you decide. Just make sure you
> describe your problem in sufficient detail.
That's true... you've done such a good job so far though, I hate to
leave ;)
-- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
- Next message: Phlip: "Re: how to pass smart pointes to function."
- Previous message: John Harrison: "Re: how to pass smart pointes to function."
- In reply to: Victor Bazarov: "Re: Friend a good idea here?"
- Next in thread: Phlip: "Re: Friend a good idea here?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|