[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 /obj/handlers/inherit/nomic_rules.c</h2>
This handler deals with all the nomic rules for councils.<p>Written by Pinkfish<p>Started Fri Jun 23 19:51:04 PDT 2000
<h2>Includes</h2>
This class includes the following files /include/nomic_system.h<h2>Method index</h2>
<ul>
<li><a href="#add_nomic_rule">add_nomic_rule</a>(string, int, string, string)<br/>
This method adds a nomic rule into the system.
<li><a href="#add_nomic_rule_class">add_nomic_rule_class</a>(string, class nomic_rule, int)<br/>
This method adds a nomic rule into the system.
<li><a href="#change_nomic_rule">change_nomic_rule</a>(string, class nomic_rule)<br/>
This method moves a rule from one type to another.
<li><a href="#create_area">create_area</a>(string)<br/>
This method creates an new nomic area.
<li><a href="#find_nomic_rule">find_nomic_rule</a>(string, string, string)<br/>
This method searches through for the specified rule.
<li><a href="#int_remove_nomic_rule">int_remove_nomic_rule</a>(string, int)<br/>
This method by passes the standard nomic rules check, it can be used
to remove an immutable rule.
<li><a href="#move_nomic_rule">move_nomic_rule</a>(string, class nomic_rule, int)<br/>
This method moves a rule from one type to another.
<li><a href="#query_all_nomic_rules">query_all_nomic_rules</a>(string)<br/>
This method returns all the nomic rules for the area.
<li><a href="#query_can_change_rule">query_can_change_rule</a>(string, class nomic_rule)<br/>
This method checks to see if the specified rule can be changed.
<li><a href="#query_nomic_rule">query_nomic_rule</a>(string, int)<br/>
This method returns a nomic rule for the specified area.
<li><a href="#query_type_name">query_type_name</a>(int)<br/>
This method returns the name of the corresponding type name.
<li><a href="#query_type_number">query_type_number</a>(string)<br/>
This method returns the number for the corresponding type name.
<li><a href="#remove_nomic_rule">remove_nomic_rule</a>(string, int)<br/>
This method removes a nomic rule from the system.
<li><a href="#rule_as_string">rule_as_string</a>(int, class nomic_rule)<br/>
This method returns the rule as a string.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_nomic_rule">
add_nomic_rule</a><pre class="autodocfuncdef">
int add_nomic_rule(string area,
                   int type,
                   string creator,
                   string text)
</pre><dd><br />
This method adds a nomic rule into the system.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area the rule is added in<br />
type - the type of rule to add<br />
creator - the person that created the rule<br />
text - the text associated with the rule<br />
<br />
<dd><b>Returns:</b>
<br />the new number of the rule, NOMIC_ERROR on fai;l
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="change_nomic_rule">
change_nomic_rule</a><pre class="autodocfuncdef">
int change_nomic_rule(string area,
                      class nomic_rule rule)
</pre><dd><br />
This method moves a rule from one type to another.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area the rule is added in<br />
rule - the rule to move<br />
type - the new type of the rule<br />
<br />
<dd><b>Returns:</b>
<br />the new number of the rule, NOMIC_ERROR on fai;l
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="create_area">
create_area</a><pre class="autodocfuncdef">
int create_area(string area)
</pre><dd><br />
This method creates an new nomic area.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the new nomic area name<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="find_nomic_rule">
find_nomic_rule</a><pre class="autodocfuncdef">
class nomic_rule find_nomic_rule(string area,
                                 string creator,
                                 string text)
</pre><dd><br />
This method searches through for the specified rule.  This stops the
same rule being added more than once by some error in the code.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area the rule is in<br />
creator - the creator of the rule<br />
text - the text of the rule<br />
<br />
<dd><b>Returns:</b>
<br />the rule if it is found, 0 if not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="int_remove_nomic_rule">
int_remove_nomic_rule</a><pre class="autodocfuncdef">
int int_remove_nomic_rule(string area,
                          int id)
</pre><dd><br />
This method by passes the standard nomic rules check, it can be used
to remove an immutable rule.
<br />

<dt class="autodocfuncname"><a name="query_all_nomic_rules">
query_all_nomic_rules</a><pre class="autodocfuncdef">
class nomic_rule * query_all_nomic_rules(string area)
</pre><dd><br />
This method returns all the nomic rules for the area.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to get the rule sin<br />
<br />
<dd><b>Returns:</b>
<br />all the rules
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_can_change_rule">
query_can_change_rule</a><pre class="autodocfuncdef">
int query_can_change_rule(string area,
                          class nomic_rule rule)
</pre><dd><br />
This method checks to see if the specified rule can be changed.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area in which the rule will be changed in<br />
rule - the rule to check<br />
<br />
<dd><b>Returns:</b>
<br />1 if it can be changed, 0 if not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_nomic_rule">
query_nomic_rule</a><pre class="autodocfuncdef">
class nomic_rule query_nomic_rule(string area,
                                  int id)
</pre><dd><br />
This method returns a nomic rule for the specified area.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to get the rule in<br />
id - the id of the rule to match<br />
<br />
<dd><b>Returns:</b>
<br />0 if failed, the class if succeeded
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_type_name">
query_type_name</a><pre class="autodocfuncdef">
string query_type_name(int type_no)
</pre><dd><br />
This method returns the name of the corresponding type name.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
type_no - the type number<br />
<br />
<dd><b>Returns:</b>
<br />the type name string
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_type_number">
query_type_number</a><pre class="autodocfuncdef">
int query_type_number(string name)
</pre><dd><br />
This method returns the number for the corresponding type name.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the name of the area to get the number of<br />
<br />
<dd><b>Returns:</b>
<br />the type number
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="remove_nomic_rule">
remove_nomic_rule</a><pre class="autodocfuncdef">
int remove_nomic_rule(string area,
                      int id)
</pre><dd><br />
This method removes a nomic rule from the system.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area the rule is removed in<br />
id - the id of the rule to remove<br />
<br />
<dd><b>Returns:</b>
<br />the status of the removal, NOMIC_ERROR on fai;l
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="rule_as_string">
rule_as_string</a><pre class="autodocfuncdef">
string rule_as_string(int indent,
                      class nomic_rule rule)
</pre><dd><br />
This method returns the rule as a string.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
rule - the rule to make a string<br />
<br />
<dd><b>Returns:</b>
<br />the string version of us
<br /><br />
<br /></dl>

</dl>
<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_nomic_rule_class">
add_nomic_rule_class</a><pre class="autodocfuncdef">
int add_nomic_rule_class(string area,
                         class nomic_rule new_rule,
                         int type)
</pre><dd><br />
This method adds a nomic rule into the system.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area the rule is added in<br />
new_rule - the rule that is being added<br />
type - the type of the rule<br />
<br />
<dd><b>Returns:</b>
<br />the new number of the rule, NOMIC_ERROR on fai;l
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="move_nomic_rule">
move_nomic_rule</a><pre class="autodocfuncdef">
int move_nomic_rule(string area,
                    class nomic_rule rule,
                    int type)
</pre><dd><br />
This method moves a rule from one type to another.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area the rule is added in<br />
rule - the rule to move<br />
type - the new type of the rule<br />
<br />
<dd><b>Returns:</b>
<br />the new number of the rule, NOMIC_ERROR on fai;l
<br /><br />
<br /></dl>

</dl>
[an error occurred while processing this directive]

