swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: enum types, probe maps


From: Marcus G. Daniels
Subject: Re: enum types, probe maps
Date: 05 Apr 2000 19:01:49 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "PJ" == Paul Johnson <address@hidden> writes:

PJ> Quickly after writing it this way, I realized I was screwed
PJ> because var probes don't like this. THe probe for "model" does not
PJ> let you type in "axelrod," as far as I can tell, and further, I
PJ> realized I don't know what to do with command line parameter
PJ> processing to turn the string "axelrod" into the right format so I
PJ> can set model equal to it.

You'd have to subclass VarProbe to get this capability.  As for the
conversion itself, a routine that does if/else if/else if on different
strings, assigning the appropriate enumerated value would work.
`gperf' is a tool that can be used to create perfect hash functions if you
don't like that idea.



                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]