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

<!--#set var="isip_page_title" value="Identifier" -->
<?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/mmedia/Identifier/Identifier.h">Identifier</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;Identifier.h&gt;

static boolean diagnose(Integral::DEBUG debug_level);
const String registerId();
const String registerId(const String& id);
boolean existsId(const String& id);
boolean reclaimId(const String& id);
String getNamespace(const String& id);
Annotation* getAnnotationRef(const String& id);
Anchor* getAnchorRef(const String& id);
boolean deleteAnnotationRef(const String& id);
boolean deleteAnchorRef(const String& id);
boolean addAnnotationRef(const String& id, Annotation* ref);
boolean addAnchorRef(const String& id, Anchor* ref);
boolean existsAnnotation(const String& id);
boolean existsAnchor(const String& id);
</pre>
</blockquote>

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

<blockquote>
<pre>

String database(L"Timit");
String anchor(L"Anchor1");

Identifier ident_00(database, anchor);
ident_00.registerId();
ident_00.existsId(L"Timit:Anchor1");

</pre>
</blockquote>

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

This class is used to represent an identifier in the annotation library.

<ul>
[1] S. Bird, M. Liberman, A Formal Framework for Linguistic Annotation, Linguistic Data Consortium, University of Pennsylvania, Philadelphia, Pennsylvania, USA, 2000.

[2] K. Maeda, X. Ma, H. Lee, S. Bird, The Annotation Graph Toolkit: Application Developer's Manual (Draft), Linguistic Data Consortium, University of Pennsylvania, Philadelphia, Pennsylvania, USA, 2001.
</ul>

<br><br>

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

<ul>
  <li> <a href="../../math/scalar/String/">String.h</a>
  <li> <a href="../../dstr/HashTable/">HashTable.h</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/mmedia/Identifier/ident_00.cc&constant=CLASS_NAME">static const String CLASS_NAME = L"Identifier";</a></pre>

  <li> define i/o related constants:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_00.cc&constant=DEF_PARAM">static const String DEF_PARAM;</a></pre>
       
</ul>

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

<ul>
  <li> error codes indicating general errors:

</ul>

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

<ul>
  <li> declare the identifier namespace:

       <pre>String namespace_d;</pre>

  <li> declare the identifier type:

       <pre>String type_d;</pre>

  <li> declare define the collection of identifiers already issued:

       <pre>DoubleLinkedList&lt;String&gt; issued_d;</pre>

  <li> declare define the highest id issued so far:

       <pre>Long curr_d;</pre>

  <li> declare define the table of anchors:

       <pre>HashTable&lt;String, Anchor&gt; anchors_d;</pre>

  <li> declare define the table of annotations:

       <pre>HashTable&lt;String, Annotation&gt; annotations_d;</pre>

  <li> declare the debugging parameters:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_00.cc&static=debug_level_d">static Integral::DEBUG debug_level_d;</a></pre>

  <li> declare the memory manager:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_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/mmedia/Identifier/Identifier.h&method=name&instance=0">static const String& name();</a></pre>

  <li> debug methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_01.cc&method=debug&instance=0">boolean debug(const unichar* msg) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/Identifier.h&method=setDebug&instance=0">static boolean setDebug(Integral::DEBUG arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_02.cc&method=diagnose&instance=0">static boolean diagnose(Integral::DEBUG debug_level);</a></pre>
       
  <li> destructor/constructor(s):

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/Identifier.h&method=destructor&instance=0">~Identifier();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_00.cc&method=default+constructor&instance=0">Identifier();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/Identifier.h&method=copy+constructor&instance=0">Identifier(const Identifier& arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/Identifier.h&method=default+constructor&instance=0">Identifier(String& id, String& type);</a></pre>

  <li> assign methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=assign&instance=0">boolean assign(const Identifier& arg);</a></pre>

  <li> operator= method:

       <pre>not present.</pre>

  <li> i/o methods:

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

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/Identifier.h&method=read&instance=0">boolean read(Sof& sof, long tag);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/Identifier.h&method=write&instance=0">boolean write(Sof& sof, long tag) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/Identifier.h&method=read&instance=1">boolean read(Sof& sof, long tag, const String& name);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/Identifier.h&method=readData&instance=0">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/mmedia/Identifier/Identifier.h&method=write&instance=1">boolean write(Sof& sof, long tag, const String& name) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/Identifier.h&method=writeData&instance=0">boolean writeData(Sof& sof, const String& pname =  DEF_PARAM) const;</a></pre>

  <li> equality methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=eq&instance=0">boolean eq(const Identifier& arg) const;</a></pre>

  <li> memory management methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/Identifier.h&method=new&instance=0">static void* operator new(size_t arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/Identifier.h&method=new\[\]&instance=0">static void* operator new[](size_t arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/Identifier.h&method=delete&instance=0">static void operator delete(void* arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/Identifier.h&method=delete\[\]&instance=0">static void operator delete[](void* arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/Identifier.h&method=setGrowSize&instance=0">static boolean setGrowSize(long arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=clear&instance=0">boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE);</a></pre>

</ul>

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

<ul>
  <li> declare identifier methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=registerId&instance=1">const String registerId();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=registerId&instance=0">const String registerId(const String& id);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=existsId&instance=0">boolean existsId(const String& id);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=reclaimId&instance=0">boolean reclaimId(const String& id);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=getNamespace&instance=0">String getNamespace(const String& id);</a></pre>

  <li> declare annotation related methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=getAnnotationRef&instance=0">Annotation* getAnnotationRef(const String& id);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=deleteAnnotationRef&instance=0">boolean deleteAnnotationRef(const String& id);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=addAnnotationRef&instance=0">boolean addAnnotationRef(const String& id, Annotation* ref);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=existsAnnotation&instance=0">boolean existsAnnotation(const String& id);</a></pre>
       
  <li> declare anchor related methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=getAnchorRef&instance=0">Anchor* getAnchorRef(const String& id);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=deleteAnchorRef&instance=0">boolean deleteAnchorRef(const String& id);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=addAnchorRef&instance=0">boolean addAnchorRef(const String& id, Anchor* ref);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Identifier/ident_05.cc&method=existsAnchor&instance=0">boolean existsAnchor(const String& id);</a></pre>

</ul>

<a name="private">
<b>private methods:</b>
<br><br>

<ul>
  <li> declare private methods:

</ul>

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

<ul>

    <li> This <a href="/perl/ifc_document.pl?file=$isip/doc/examples/class/mmedia/mmedia_example_07/example.cc">example</a> shows how to use the Identifier object.
	 
</ul>

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

<ul>
  <li> none.
</ul>

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