<?php $isip_window_title = "ISIP Homepage"; ?>
<?php include("/data/isip/www/templates/documentation/header/header.html"); ?>

<!--#set var="isip_page_title" value="ProductionRuleTokenType" -->
<?php include("/data/isip/www/templates/documentation/body/index_class.html"); ?>
<?php include("/data/isip/www/templates/documentation/body/bar.html"); ?>

<a name="name">
<b>name: <a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType.h">ProductionRuleTokenType</a></b>

<br><br>

<a name="synopsis">
<b>synopsis:</b>
<br><br>

<blockquote>
<pre> 
g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_mmedia.a

#include &lt;ProductionRuleTokenType.h&gt;

bool setType(ProductionRuleTokenType::TYPE);
ProductionRuleTokenTypeTokenType::TYPE getType();
</pre>
</blockquote>

<a name="quick_start">
<b>quick start:</b>
<br><br>

<blockquote>
<pre>
ProductionRuleTokenType prtt;
prtt.setType(ProductionRuleTokenType::NON_TERMINAL);
</pre>
</blockquote>

<a name="description"> 
<b>description:</b>
<br><br>
This is a helper class for ProductionRule.  This class, along with a String value and a floating point weight, forms the basis of the linked list of which a ProductionRule is composed.  Cases of explicit instantiation outside of the ProductionRule class should be rare; a ProductionRule is typically constructed with on-the-fly instantiation of this class.  For example:
<br>
<pre>
ProductionRule prdrl;
prdrl.setRuleName(L"A");
prdrl.append(ProductionRuleTokenType::NON_TERMINAL, L"a");
prdrl.append(ProductionRuleTokenType::KLEENE_STAR);
</pre>

<a name="dependencies">
<b>dependencies:</b>
<br><br>

<ul>
  <li> <a href="../../math/scalar/String/index.html">String</a>
  <li> <a href="../../shell/Filename/index.html">Filename</a>
  <li> <a href="../../system/File/index.html">File</a>
  <li> <a href="../../shell/DebugLevel/index.html">DebugLevel</a>
  <li> <a href="../../io/Sof/index.html">Sof</a>
</ul>

<a name="constants">
<b>public constants:</b>
<br><br>

<ul>
  <li> define the class name:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_00.cc&constant=CLASS_NAME">static const String ProductionRuleTokenType::CLASS_NAME = L"ProductionRuleTokenType";</a></pre>

  <li> define i/o constants:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_00.cc&constant=DEF_PARAM">static const String ProductionRuleTokenType::DEF_PARAM = L"";</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_00.cc&constant=DEF_TAG">static const long ProductionRuleTokenType::DEF_TAG = 0;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_00.cc&constant=PARAM_TYPE">static const String ProductionRuleTokenType::PARAM_TYPE = L"type";</a></pre>

<pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_00.cc&constant=BLOCK_START_STR">static const String ProductionRuleTokenType::BLOCK_START_STR = L"{";</a></pre>

<pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_00.cc&constant=BLOCK_DELIM_STR">static const String ProductionRuleTokenType::BLOCK_DELIM_STR = L"}, {";</a></pre>

<pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_00.cc&constant=BLOCK_END_STR">static const String ProductionRuleTokenType::BLOCK_END_STR = L"}";</a></pre>

<pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_00.cc&constant=BLOCK_TERM_STR">static const String ProductionRuleTokenType::BLOCK_TERM_STR = L";\n";</a></pre>

</ul>

<a name="error">
<b>error codes:</b>
<br><br>
<ul>
</ul>

<a name="protected">
<b>protected data:</b>
<br><br>

<ul> <!-- list of categories -->

  <li> declare a TYPE field
    <pre>ProductionRuleTokenType::TYPE type_d;</pre>

  <li> declare the debug level
    <pre>DebugLevel debug_level_d;</pre>
</ul>

<a name="public">
<b>required public methods:</b>
<br><br>

<ul>
  <li> static methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/ProductionRuleTokenType.h&method=name">static const String& name();</a></pre>
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_02.cc&method=diagnose">static boolean diagnose(Integral::DEBUG debug_level);</a></pre>

  <li> debug methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType.h&method=setDebug">boolean setDebug(Integral::DEBUG debug_level);</a></pre>
     
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_01.cc&method=debug">boolean debug(const unichar* msg) const;</a></pre>
       
  <li> constructor:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/ProductionRuleTokenType.h&method=default+constructor">ProductionRuleTokenType();</a></pre>
                          
  <li> i/o methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_03.cc&method=read">boolean read(Sof& sof, long tag, const String& cname = CLASS_NAME);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_03.cc&method=readData">boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);</a></pre>
  
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_03.cc&method=write">boolean write(Sof& sof, long tag, const String& cname = CLASS_NAME) const;</a></pre>
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_03.cc&method=writeData">boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/ProductionRuleTokenType.h&method=sofSize">long sofSize() const;</a></pre>

  <li> assign methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_01.cc&method=assign&instance=0">boolean assign(const ProductionRuleTokenType& prdrl_a);</a></pre>

  <li> operator= methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_01.cc&method=operator%3D">ProductionRuleTokenType& operator=(const ProductionRuleTokenType& prdrl_a);</a></pre>

  <li> equality methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_01.cc.h&method=eq&instance=0">boolean eq(const ProductionRuleTokenType& prdrl_a) const;</a></pre>

  <li> operator== methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_01.cc.h&method=operator%3D%3D&">ProductionRuleTokenType& operator==(const ProductionRuleTokenType& prdrl_a);</a></pre>

  <li> clear methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/prdrl_01.cc&method=clear">boolean clear(Integral::CMODE ctype);</a></pre>

</ul>

<a name="specific">
<b>class-specific public methods:</b>
<br><br>

<ul>       

       <li> get method:
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/ProductionRuleTokenType.h&method=getType">ProductionRuleTokenType getType();</a></pre>

       <li> set methods:
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/ProductionRuleTokenType.h&=setType">bool setType(ProductionRuleTokenType::TYPE);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/pr/ProductionRuleTokenType/ProductionRuleTokenType.h&=setType">bool setType(const String& type_a);</a></pre>

</ul>

<a name="examples">
<b>examples:</b>
<br><br>

<ul>
  <li> This example shows how create a ProductionRuleTokenType for "A::=(a B)+" and retrieve the string representation.  This exhibits on-the-fly ProductionRuleTokenType object instantiation.
   
<pre>

// declare the ProductionRuleTokenType
//
ProductionRuleTokenType prdrl;

// set the name
//
prdrl.setRuleName(L"A");

// construct the RHS
//
prdrl.append(ProductionRuleTokenTypeTokenType::OPEN_PAREN);
prdrl.append(ProductionRuleTokenTypeTokenType::TERMINAL, L"a");
prdrl.append(ProductionRuleTokenTypeTokenType::CONCATENATION);
prdrl.append(ProductionRuleTokenTypeTokenType::NON_TERMINAL, L"B");
prdrl.append(ProductionRuleTokenTypeTokenType::CONCATENATION);
prdrl.append(ProductionRuleTokenTypeTokenType::KLEENE_PLUS);

// output the string representation of the rule
//
Console::put(prdrl.getRule());

</pre>
</ul>

<a name="notes">
<b>notes:</b>
<br><br>


<!--#include virtual="/hse/ies/templates/documentation/footer/footer.html" -->
