home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!decwrl!csus.edu!ucdavis!othello.ucdavis.edu!fzjaffe
- From: fzjaffe@othello.ucdavis.edu (Rory Jaffe)
- Newsgroups: comp.lang.c++
- Subject: establishing a registration/database class for program defaults
- Message-ID: <15705@ucdavis.ucdavis.edu>
- Date: 31 Jul 92 20:34:30 GMT
- Sender: usenet@ucdavis.ucdavis.edu
- Organization: University of California, Davis
- Lines: 32
-
- I want to have a class that maintains a defaults file for a program.
- This class would also have a database with class tags and default
- information read from the file. Objects that wanted to read/write
- defaults would refer to this class. Each class that used defaults would
- have their own methods to send defaults to, and extract them from, the
- database field that contained the default information. The acquired
- default info would be in static data members so that changing it would
- propagate amongst all class instances.
-
- This is not quite like persistent objects, where the database class
- would create objects corresponding to the stored information.
-
- My questions:
-
- 1. How do you avoid collisions between class tags in the database? (2
- classes with the same tag).
-
- 2. How do you ensure that classes wanting to access the defaults class
- find it?
-
- 3. How should classes that use the database and thus read/write to the
- default field develop their read/write functions? --e.g. overload a
- function, or inherit and modify something from the database class?
-
-
-
-
-
-
-
- I expect that this is a common enough need that someone has good
- experience with the issues involved.
-