MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
[MUD-Dev] Re: OO Design Question
On Wed, 11 Nov 1998 11:24:05 +1100
Brad Leach<c9608122#alinga,newcastle.edu.au> wrote:
> My question is this: Should the "Server" object be started (via a
> public "startup" function) and look after everything (Method "A")
> or should the main() function look after the specific's of calling
> AServer::Init(), AServer::MainLoop(), etc (Method "B").
What I do:
main.c:
1) Is very very non-OO, and mostly does environmental checks
(gross error checking) for the upcoming server.
2) Instantiates a "State" object which loads and configures the
server for the task it is about to do (also does some error handling
configs/instantiation, memory pool configs, singleton setups etc)
3) Instantiates a "Server" object which takes the State object
as an argument (the State object is done first to simplify error
handling in constructors).
4) The instantiated Server object gets the server all up and
ready to run.
5) Call Server.Run().
6) Handle exceptions arising from Server.Run() as applicable.
--
J C Lawrence Internet: claw#kanga,nu
(Contractor) Internet: coder#kanga,nu
---------(*) Internet: claw#under,engr.sgi.com
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...
- Thread context:
- [MUD-Dev] MUD clients, testing,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Thu 12 Nov 1998, 17:00 GMT
- [MUD-Dev] Re: Chemistry [Warning, scientific content],
Peck, Matthew x96724c1 x96724#exmail,usma.army.mil, Thu 12 Nov 1998, 07:47 GMT
- [MUD-Dev] AMIN: Unsubscriptions,
J C Lawrence claw#under,engr.sgi.com, Wed 11 Nov 1998, 18:40 GMT
- [MUD-Dev] OO Design Question,
Brad Leach c9608122#alinga,newcastle.edu.au, Wed 11 Nov 1998, 00:26 GMT
- [MUD-Dev] ADMIN: Attributions,
J C Lawrence claw#under,engr.sgi.com, Wed 11 Nov 1998, 00:21 GMT
- [MUD-Dev] Re: Spell components, chemistry, and the like...,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Tue 10 Nov 1998, 07:12 GMT
- <Possible follow-up(s)>
- [MUD-Dev] Re: Spell components, chemistry, and the like...,
JavaAl JavaAl#aol,com, Tue 10 Nov 1998, 07:16 GMT
- [MUD-Dev] Re: Spell components, chemistry, and the like...,
quzah [sotfhome] quzah#softhome,net, Tue 10 Nov 1998, 13:02 GMT
[ Other Periods
| Other mailing lists
| Search
]