[Freeciv-Dev] Re: Path-finding in the presence of danger
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
The correct solution should either have one callback in which the
caller is required/free to deal with all effects relevant for this
particular invocation, or a mechanism for pushing individual callback
modules on a generic internally managed stack.
Note the second is basically an extension of the first to try and
standardize an interface to individual sub-elements so they can
more easily be arranged as a mix and match selection library.
The incorrect solution is to try and manage the second case by
hardcoding the flow inside the implementation to deal with a limited
selection of specifically ordered and always setup/checked cases.
This leads to both a maintenance nightmare and performance piggery.
Note Gregory's solution can always be implemented by pushing a single
module in which the caller assumes full responsibility. His solution
can also be extended to the second by pushing a module that has all
the extra logic to setup a generic module stack and iterate over it.
With such a stack-module, a single hardcoded callback is sufficient,
and thus Gregory is defining a completely generic solution which can
be extended trivially to handle future needs including anything
Raimar would like to do in his private code implementations.
Cheers,
RossW
=====
At 01:04 PM 02/10/04 +0100, Gregory Berkolaiko wrote:
>
>On Fri, 4 Oct 2002 rf13@xxxxxxxxxxxxxxxxx wrote:
[...]
>We have rather different attitudes to the subject. You seem to prefer to
>have many call-backs, while I would rather have one which does it all.
>For this particular proposal,
> int get_extra(int x, int y, int curent_extra, void *data)
>provides for the desired freedom.
>
>G.
- [Freeciv-Dev] Re: Path-finding in the presence of danger, (continued)
- [Freeciv-Dev] Re: Path-finding in the presence of danger, Raimar Falke, 2002/10/10
- [Freeciv-Dev] Re: Path-finding in the presence of danger, Gregory Berkolaiko, 2002/10/11
- [Freeciv-Dev] Re: Path-finding in the presence of danger, Raimar Falke, 2002/10/14
- [Freeciv-Dev] Re: Path-finding in the presence of danger, Gregory Berkolaiko, 2002/10/14
- [Freeciv-Dev] Re: Path-finding in the presence of danger, Raimar Falke, 2002/10/15
[Freeciv-Dev] Re: Path-finding in the presence of danger, rf13, 2002/10/04
Message not available
- [Freeciv-Dev] Re: Path-finding in the presence of danger,
Ross W. Wetmore <=
|
|