On Mon, 02 Jun 2008, Aaron Mavrinac wrote:
> Hi,
>
> As I explain on my most recent weekly report, my goal next week is to
> implement command management for the admin stuff in tpserver-cpp.
>
> Here are some points of my current plan, please comment:
>
> - Commands will be categorized (as currently) for namespacing, useful
> for modules such as rulesets which may add their own commands.

Is that actually needed? I know tpserver-cpp does this, mostly out of playing 
with readline's auto competition.

> - There will be a "category" field alongside the "name" field to
> command-related frames, and allow clients to use them as they wish.
>
> - I am planning to reuse libtprl/console code for the CLI client; it
> will handle commands/categories locally, but the action function will
> send a command frame.

Cool. It shouldn't be too hard.

> -  A single object somewhat analogous to OrderManager will maintain
> the list of commands and process command frames from AdminConnection.

Cool.

> - The commands themselves will be subclasses of a new Command class,
> each containing custom action functions and information accessible
> from the base class.
>
> - I'm thinking command type IDs would be dynamically allocated. A
> possible exception would be some basic important commands used in
> non-interactive situations like the single-player wizard, but even
> without that the client could find them by category/name.

Dynamically allocated is fine. 

You could have well defined ids, or well defined names. Either work, but I 
feel that well defined names would be better. As of TP04, there are no 
pre-allocated "type" numbers for orders or objects, though there are special 
numbers for ids for objects (0 gives the universe), players (0 gives the 
current player's player) and board (0 gives the personal board). For Players 
and boards, the actual returned item has a different ID (ie, normal ids start 
at 1). Perhaps you could use something similar if really required.

> All feedback is appreciated!
>
> Thanks.

Later
Lee

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
tp-devel mailing list
[email protected]
http://www.thousandparsec.net/tp/mailman.php/listinfo/tp-devel

Reply via email to