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

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

static boolean diagnose(Integral::DEBUG debug_level);
const String getId() const;
float getOffset() const;
boolean setOffset(float arg);
boolean getAnchored() const;
boolean setUnit(String& arg);
String getUnit() const;
boolean unsetOffset();

</pre>
</blockquote>

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

<blockquote>
<pre>

Anchor ancr_00;
String unit_00(L"seconds");
ancr_00.setOffset(0.6);
ancr_00.setUnit(unit_00);

</pre>
</blockquote>

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

This class is used to represent time offsets in the annotation graph.

<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>
  <li> <a href="../../dstr/DoubleLinkedList/">DoubleLinkedList.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/Anchor/ancr_00.cc&constant=CLASS_NAME">static const String CLASS_NAME = L"Anchor";</a></pre>

  <li> i/o related constants:

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

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/ancr_00.cc&constant=PARAM_ID">static const String PARAM_ID;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/ancr_00.cc&constant=PARAM_OFFSET">static const String PARAM_OFFSET;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/ancr_00.cc&constant=PARAM_UNIT">static const String PARAM_UNIT;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/ancr_00.cc&constant=PARAM_ANCHORED">static const String PARAM_ANCHORED;</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 anchor id:

       <pre>String id_d;</pre>

  <li> declare the anchor offset:

       <pre>Float offset_d;</pre>

  <li> declare the anchor time unit:

       <pre>String unit_d;</pre>

  <li> declare a flag that indicates if the anchor is anchored:

       <pre>Boolean anchored_d;</pre>

  <li> declare the debugging parameters:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/ancr_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/Anchor/ancr_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/Anchor/Anchor.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/Anchor/ancr_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/Anchor/Anchor.h&method=setDebug&instance=0">static boolean setDebug(Integral::DEBUG arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/ancr_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/Anchor/Anchor.h&method=destructor&instance=0">~Anchor();</a></pre>

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

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

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/ancr_00.cc&method=default+constructor&instance=2">Anchor(String& id, float offset, String& unit);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/ancr_00.cc&method=default+constructor&instance=1">Anchor(String& id, String& unit);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/ancr_00.cc&method=default+constructor&instance=3">Anchor(String& id, const Anchor*);</a></pre>

  <li> assign methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/ancr_05.cc&method=assign&instance=0">boolean assign(const Anchor& 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/Anchor/Anchor.h&method=sofSize&instance=0">long sofSize() const;</a></pre>

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

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

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

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/ancr_03.cc&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/Anchor/ancr_04.cc&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/Anchor/ancr_05.cc&method=eq&instance=0">boolean eq(const Anchor& arg) const;</a></pre>

  <li> memory management methods:

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

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

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

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

  <li> declare offset methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/Anchor.h&method=getOffset&instance=0">float getOffset() const;</a></pre>

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

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/Anchor.h&method=unsetOffset&instance=0">boolean unsetOffset();</a></pre>
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/Anchor.h&method=getAnchored&instance=0">boolean getAnchored() const;</a></pre>

  <li> declare unit methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/Anchor.h&method=setUnit&instance=0">boolean setUnit(String& arg);</a></pre>

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

</ul>

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

<ul>
  <li> declare friend classes:
       
       <pre>friend class AnnotationGraph;</pre>
  
  <li> declare private methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Anchor/ancr_05.cc&method=compare&instance=0">boolean compare(const String& arg1, const String& arg2) const;</a></pre>

</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_03/example.cc">example</a> shows how to use the Anchor object.
	 
</ul>

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

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

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