[an error occurred while processing this directive]
[<a href="index.shtml">Package Index</a></code> | <a href="index_std.shtml">Mudlib Index</a></code> | <a href="index_eff.shtml">Effect Index</a></code>]<br><h2>File /secure/simul_efun/obj_parser.c</h2>
This is the object matching code.
It is based on some code by Scatter at Dawn Whispers, although this is
both cut down and extended from what scatter had written.<h2>Inherits</h2>
This class inherits the following classes <a href="secure.simul_efun.multiple_short.c.shtml">/secure/simul_efun/multiple_short.c</a><h2>Includes</h2>
This class includes the following files <a href="include.playtesters.h.shtml">/include/playtesters.h</a> and <a href="include.obj_parser.h.shtml">/include/obj_parser.h</a><h2>Method index</h2>
<dl><ul>
<li><a href="#match_object_in_array">match_object_in_array</a>(string, object *, int, object)<br/>
Find an object in the given array that matches the given words.
<li><a href="#match_objects_failed_mess">match_objects_failed_mess</a>(class obj_match)<br/>
This method returns the failed message for the specified
failed match string.
<li><a href="#match_objects_for_existence">match_objects_for_existence</a>(string, object *, object)<br/>
This method checks for existance of the specified objects.
<li><a href="#match_objects_in_environments">match_objects_in_environments</a>(string, mixed, int, object)<br/>
Find an object in the given environments that match the given words.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="match_object_in_array">
match_object_in_array</a><pre>
class obj_match match_object_in_array(string input,
                                      object * ob_list,
                                      int type,
                                      object player)
</pre></br>
Find an object in the given array that matches the given words.
This will only return a correct match if the entire string
matches.  If it gets a partial match then nothing will be
returned.  The return array is of the format:<br>
<pre>({ flag, class obj_match info })
</pre>
The flag can be one of:
<dd>
<dt>OBJ_PARSER_SUCCESS
<dd>Successfuly matched the objects.  the objects part of the class will
contain the matched objects.
<dt>OBJ_PARSER_NO_MATCH
<dd>No successful match.  The text bit of the omatch class will contain
the text that didn't match
<dt>OBJ_PARSER_AMBIGUOUS
<dd>An ambigous match is returned, this means 'frog' was referenced
when there was more than one frog.  The objects part of the class
has all the objects there were matched
<dt>OBJ_PARSER_BAD_FRACTION
<dd>The specified fracition was bad, the text bit of the class contains
the bad fraction.
<dt>OBJ_PARSER_FRACTION
<dd>Means that a fraction was attempted to be applied to multiple
objects.
<dt>OBJ_PARSER_TOO_DARK
<dd>Unable to match the specified object because it is too dark.
</dl>
<br/><ul>
<li><b>Parameters:</b>
<br/>input - the input string to match
<br/>ob_list - the object to list to match in
<br/>type - we restrict the matching to certain groups of objects
<br/>player - the person doing the lookup
<li><b>Returns:</b>
<br/>an array of the format ({ flag, class obj_match info })

</dl>

<ul><a name="match_objects_failed_mess">
match_objects_failed_mess</a><pre>
string match_objects_failed_mess(class obj_match failed_match)
</pre></br>
This method returns the failed message for the specified
failed match string.
<br/><ul>
<li><b>Parameters:</b>
<br/>failed_match - the return result from match_objects_*
<li><b>Returns:</b>
<br/>the message to print when it gets an error

</dl>

<ul><a name="match_objects_for_existence">
match_objects_for_existence</a><pre>
object * match_objects_for_existence(string input,
                                     object * env_list,
                                     object player)
</pre></br>
This method checks for existance of the specified objects.  It will
return any ambiguous matches as well as real matches.  This should only
be used in cases in the code where it is not nessessary to distinguish
between different objects of the same type.
<br/><ul>
<li><b>Parameters:</b>
<br/>input - the input string to check
<br/>env_list - the environments to check in
<br/>player - the player to check with
<li><b>Returns:</b>
<br/>the array of objects

</dl>

<ul><a name="match_objects_in_environments">
match_objects_in_environments</a><pre>
class obj_match match_objects_in_environments(string input,
                                              mixed env_list,
                                              int type,
                                              object player)
</pre></br>
Find an object in the given environments that match the given words.
This will only return a correct match if the entire string
matches.  If it gets a partial match then nothing will be
returned.  The return array is of the format:<br>
<pre>({ flag, class obj_match info })
</pre>
The flag can be one of:
<dd>
<dt>OBJ_PARSER_SUCCESS
<dd>Successfuly matched the objects.  the objects part of the class will
contain the matched objects.
<dt>OBJ_PARSER_NO_MATCH
<dd>No successful match.  The text bit of the omatch class will contain
the text that didn't match
<dt>OBJ_PARSER_AMBIGUOUS
<dd>An ambigous match is returned, this means 'frog' was referenced
when there was more than one frog.  The objects part of the class
has all the objects there were matched
<dt>OBJ_PARSER_BAD_FRACTION
<dd>The specified fracition was bad, the text bit of the class contains
the bad fraction.
<dt>OBJ_PARSER_FRACTION
<dd>Means that a fraction was attempted to be applied to multiple
objects.
<dt>OBJ_PARSER_TOO_DARK
<dd>Unable to match the specified object because it is too dark.
</dl>
<br/><ul>
<li><b>Parameters:</b>
<br/>input - the input string to match
<br/>env_list - the environments to get the objects from
<br/>singular - force a singular match
<br/>player - the person doing the lookup
<li><b>Returns:</b>
<br/>an array of the format ({ flag, class obj_match info })

</dl>


[an error occurred while processing this directive]

