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

<!--#set var="isip_page_title" value="Long" -->
<?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/shell/DebugLevel/DebugLevel.h">DebugLevel</a>:  public  <a href="../../math/scalar/Long/index.html">Long</a></b>

<br><br>

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

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

#include &lt;DebugLevel.h&gt;

DebugLevel(Integral::DEBUG arg = Integral::DEF_DEBUG);
Long(const DebugLevel& arg);
</pre>
</blockquote>

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

<blockquote>
<pre>
DebugLevel val0;
val0 = Integral::ALL;

if (val1 > Integral::BRIEF) {
   String output(L"printing some detailed debugging information");
   Console::put(output);
}
</pre>
</blockquote>

<a name="description"> 
<b>description:</b>
<br> <br>
The DebugLevel class mainly serves as a wrapper for the
standard debug levels supported in the ISIP environment.
It is used by classes that need to write a debug level to a file
and utilities that need to specify the debug level as an argument.
The DebugLevel class is a trivial extension of the scalar
class Long.

<br><br>

<a name="dependencies">
<b>dependencies:</b>
<br><br>
<ul>
  <li> <a href="../../math/scalar/Long/index.html">Long</a>
  <li> <a href="../../io/NameMap/index.html">NameMap</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/shell/DebugLevel/dbgl_00.cc&constant=CLASS_NAME">static const String CLASS_NAME = L"DebugLevel";</a></pre>
 
  <li> define a name map containing the enumerated values for debug levels:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/dbgl_00.cc&constant=LEVEL_MAP">static const NameMap LEVEL_MAP = L"NONE, BRIEF, DETAILED, ALL";</a></pre>
 
  <li> define a name/value tag for i/o:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/dbgl_00.cc&constant=DEF_PARAM">static const String DEF_PARAM = L"debug_level";</a></pre>
 
</ul>

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

<ul>
  <li> error code indicating console class general error:
       
       <pre><a href="/perl/ifc_document.pl?err=00045500">static const long ERR = 45500;</a>
       </pre>
</ul>

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

<ul>
  <li> static memory manager:

     <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/
dbgl_00.cc&static=mgr_d">static MemoryManager mgr_d;</a></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/shell/DebugLevel/DebugLevel.h&method=name">static const String& name();</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/dbgl_02.cc">static boolean diagnose(Integral::DEBUG debug_level);</a></pre>

  <li> debug methods: the setDebug method is inherited from the <a href = ../../math/scalar/Long/index.html#public>Long</a> class
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/dbgl_01.cc">boolean debug(const unichar* message) const;</a></pre>
       
  <li> destructor/constructor(s):
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=destructor">~DebugLevel();</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=default+constructor">DebugLevel(Integral::DEBUG arg = Integral::DEF_DEBUG);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=copy+constructor">DebugLevel(const DebugLevel& arg);</a></pre>     
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=constructor">DebugLevel(const String& arg);</a></pre>     

  <li> assign methods:
       
       <pre>assign methods are inherited from the class <a href = "../../math/scalar/Long/index.html#public:assign">Long</a> </pre>

  <li> operator= methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=operator%3D&instance=0">DebugLevel& operator=(const DebugLevel& arg);</a></pre>
       
  <li> i/o methods: the sofSize method is inherited is inherited from the <a href = "../../math/scalar/Long/index.html#public">Long</a> class
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/dbgl_03.cc&method=read">boolean read(Sof& sof, long tag, const String& name = CLASS_NAME);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/dbgl_04.cc&method=write">boolean write(Sof& sof, long tag, const string& name = CLASS_NAME) const;</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/dbgl_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/shell/DebugLevel/dbgl_04.cc&method=writeData">boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;</a></pre>
       
  <li> equality methods:
       
       <pre>these methods are inherited from the <a href = "../../math/scalar/Long/index.html#public:equality">Long</a> class</pre>

  <li> memory management methods: the clear method is inherited from the <a href = "../../math/scalar/Long/index.html#public">Long</a> class
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=new">static void* operator new(size_t size);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=new[]">static void* operator new[](size_t size);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=delete ">static void operator delete(void* ptr);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=delete[]">static void operator delete[](void* ptr);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=setGrowSize">static boolean setGrowSize(long grow_size);</a></pre>
</ul>

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

<ul>
  <li> operator = methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=operator%3D&instance=1">DebugLevel& operator= (Integral::DEBUG arg);</a></pre>


  <li> operator > methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=operator&instance=0">boolean operator> (Integral::DEBUG arg);</a></pre>

  <li> operator >= methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=operator&instance=1">boolean operator>= (Integral::DEBUG arg);</a></pre>

  <li> operator != methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=operator&instance=2">boolean operator!= (Integral::DEBUG arg);</a></pre>

  <li> operator < methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=operator&instance=3">boolean operator< (Integral::DEBUG arg);</a></pre>

  <li> operator <= methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=operator&instance=4">boolean operator<= (Integral::DEBUG arg);</a></pre>

  <li> operator == methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=operator&instance=5">boolean operator== (Integral::DEBUG arg);</a></pre>

  <li> assign methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=assign&instance=1">boolean assign(Integral::DEBUG arg);</a></pre>       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=assign&instance=2">boolean assign(const String& arg);</a></pre>

  <li> get methods;
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=getIndex&instance=0">Integral::DEBUG getIndex(const String& arg) const;</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=getIndex&instance=1">Integral::DEBUG getIndex() const;</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=getName&instance=0">const String& getName() const;</a></pre>
        <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=operator&instance=6">operator Integral::DEBUG() const;</a></pre>     
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/shell/DebugLevel/DebugLevel.h&method=operator+String%26%28%29">operator const String&() const;</a></pre>
</ul>

<a name="private">
<b>private methods:</b>
<ul>
  <li> none
</ul>

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

<ul>

  <li> This example shows how to write a DebugLevel object into a Sof file
       
<pre>
DebugLevel val0(Integral::BRIEF);
String tmp_filename(L"foo");
Sof tmp_file;
tmp_file.open(tmp_filename, File::WRITE_ONLY, File::TEXT);
       
DebugLevel.write(tmp_file, (long)0);
tmp_file.close();
</pre>

  <li> This example shows how to do some simple assignments and comparisons

<pre>
DebugLevel val0(Integral::ALL);

if (val0 > Integral::BRIEF) {
   String output(L"printing some detailed debugging information");
   Console::put(output);
}

DebugLevel val1;
val1 = Integral::DETAILED;

if (val1 > Integral::BRIEF) {
   String output(L"printing some detailed debugging information");
   Console::put(output);
}
</pre>
</ul>

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

<ul>
  <li> none
</ul>       
<br><br>

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