Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Identifiers Class Reference

#include <Identifiers.h>

Collaboration diagram for Identifiers:

Collaboration graph
[legend]
List of all members.

Public Methods

 Identifiers (const Id &nameSpace, string type)
 Create an identifiers with the specified namespace and type. More...

const Id new_id ()
 Generate a new identifier. More...

const Id new_id (const Id &id) throw (AGException)
bool existsId (const Id &id)
 Test if an id has been issued. More...

void reclaim_id (const Id &id)
 Reclaim an id. More...


Static Public Methods

Id getNamespace (const Id &id)
AGSetgetAGSetRef (const AGSetId &id)
 Get AGSet reference by id. More...

AGgetAGRef (const AGId &id)
 Get AG reference by id. More...

TimelinegetTimelineRef (const TimelineId &id)
 Get Timeline reference by id. More...

SignalgetSignalRef (const SignalId &id)
 Get Signal reference by id. More...

AnnotationgetAnnotationRef (const AnnotationId &id)
 Get Annotation reference by id. More...

AnchorgetAnchorRef (const AnchorId &id)
 Get Anchor reference by id. More...

void deleteAGSetRef (const AGSetId &id)
 Delete an AGSet id to reference mapping. More...

void deleteAGRef (const AGId &id)
 Delete an AG id to reference mapping. More...

void deleteTimelineRef (const TimelineId &id)
 Delete a Timeline id to reference mapping. More...

void deleteSignalRef (const SignalId &id)
 Delete a Signal id to reference mapping. More...

void deleteAnnotationRef (const AnnotationId &id)
 Delete an Annotation id to reference mapping. More...

void deleteAnchorRef (const AnchorId &id)
 Delete an Anchor id to reference mapping. More...

void addAGSetRef (const AGSetId &id, AGSet *ref)
 Add an AGSet id to reference mapping. More...

void addAGRef (const AGId &id, AG *ref)
 Add an AG id to reference mapping. More...

void addTimelineRef (const TimelineId &id, Timeline *ref)
 Add a Timeline id to reference mapping. More...

void addSignalRef (const SignalId &id, Signal *ref)
 Add a Signal id to reference mapping. More...

void addAnnotationRef (const AnnotationId &id, Annotation *ref)
 Add an Annotation id to reference mapping. More...

void addAnchorRef (const AnchorId &id, Anchor *ref)
 Add an Anchor id to reference mapping. More...

bool existsAGSet (const AGSetId &id)
 Test if an AGSet exists. More...

bool existsAG (const AGId &id)
 Test if an AG exists. More...

bool existsTimeline (const TimelineId &id)
 Test if a Timeline exists. More...

bool existsSignal (const SignalId &id)
 Test if a Signal exists. More...

bool existsAnnotation (const AnnotationId &id)
 Test if an Annotation exists. More...

bool existsAnchor (const AnchorId &id)
 Test if an Anchor exists. More...


Detailed Description

Identifiers manages the issuing of ids. Identifiers generates unique identifiers for AGSets, AGs, timelines, signals, annotations, and anchors. It also maintains Id to reference maps for AGSet, AG, Signal, Timeline, Annotation and Anchor, to speed up reference lookup.
Author(s):
Xiaoyi Ma


Constructor & Destructor Documentation

Identifiers::Identifiers ( const Id & nameSpace,
string type )
 

Create an identifiers with the specified namespace and type.


Member Function Documentation

void Identifiers::addAGRef ( const AGId & id,
AG * ref ) [static]
 

Add an AG id to reference mapping.

void Identifiers::addAGSetRef ( const AGSetId & id,
AGSet * ref ) [static]
 

Add an AGSet id to reference mapping.

void Identifiers::addAnchorRef ( const AnchorId & id,
Anchor * ref ) [static]
 

Add an Anchor id to reference mapping.

void Identifiers::addAnnotationRef ( const AnnotationId & id,
Annotation * ref ) [static]
 

Add an Annotation id to reference mapping.

void Identifiers::addSignalRef ( const SignalId & id,
Signal * ref ) [static]
 

Add a Signal id to reference mapping.

void Identifiers::addTimelineRef ( const TimelineId & id,
Timeline * ref ) [static]
 

Add a Timeline id to reference mapping.

void Identifiers::deleteAGRef ( const AGId & id ) [static]
 

Delete an AG id to reference mapping.

void Identifiers::deleteAGSetRef ( const AGSetId & id ) [static]
 

Delete an AGSet id to reference mapping.

void Identifiers::deleteAnchorRef ( const AnchorId & id ) [static]
 

Delete an Anchor id to reference mapping.

void Identifiers::deleteAnnotationRef ( const AnnotationId & id ) [static]
 

Delete an Annotation id to reference mapping.

void Identifiers::deleteSignalRef ( const SignalId & id ) [static]
 

Delete a Signal id to reference mapping.

void Identifiers::deleteTimelineRef ( const TimelineId & id ) [static]
 

Delete a Timeline id to reference mapping.

bool Identifiers::existsAG ( const AGId & id ) [static]
 

Test if an AG exists.

bool Identifiers::existsAGSet ( const AGSetId & id ) [static]
 

Test if an AGSet exists.

bool Identifiers::existsAnchor ( const AnchorId & id ) [static]
 

Test if an Anchor exists.

bool Identifiers::existsAnnotation ( const AnnotationId & id ) [static]
 

Test if an Annotation exists.

bool Identifiers::existsId ( const Id & id )
 

Test if an id has been issued.

bool Identifiers::existsSignal ( const SignalId & id ) [static]
 

Test if a Signal exists.

bool Identifiers::existsTimeline ( const TimelineId & id ) [static]
 

Test if a Timeline exists.

AG * Identifiers::getAGRef ( const AGId & id ) [static]
 

Get AG reference by id.

AGSet * Identifiers::getAGSetRef ( const AGSetId & id ) [static]
 

Get AGSet reference by id.

Anchor * Identifiers::getAnchorRef ( const AnchorId & id ) [static]
 

Get Anchor reference by id.

Annotation * Identifiers::getAnnotationRef ( const AnnotationId & id ) [static]
 

Get Annotation reference by id.

Id Identifiers::getNamespace ( const Id & id ) [static]
 

Get the namespace of a given id. For example, the namespace of "TIMIT:AG122:Annotaion32" would be "TIMIT:AG122", and the namespace of "TIMIT:AG122" would be "TIMIT".

Signal * Identifiers::getSignalRef ( const SignalId & id ) [static]
 

Get Signal reference by id.

Timeline * Identifiers::getTimelineRef ( const TimelineId & id ) [static]
 

Get Timeline reference by id.

const Id Identifiers::new_id ( const Id & id ) throw (AGException)
 

Try to register the given identifier.

Parameters:
id   existing identifier
Returns:
the identifier created
Note:
if the identifier already exists in issued then create a new identifier
Exceptions:
AGException   IF (the namespace of id is different from the one of the Identifiers)

const Id Identifiers::new_id ( )
 

Generate a new identifier.

void Identifiers::reclaim_id ( const Id & id )
 

Reclaim an id.


The documentation for this class was generated from the following file:
Generated at Wed Jul 3 14:55:30 2002 for Annotation Graph API by doxygen1.2.7 written by Dimitri van Heesch, © 1997-2001