Main Page   Class Hierarchy   Compound List   Compound Members  

Identifiers Class Reference

List of all members.

Public Methods

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

const Id new_id ()
 Generate a new identifier.

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

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

IdSet & getIssuedIds ()
 Return all issued ids.


Static Public Methods

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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:
Xiaoyi Ma


Member Function Documentation

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".

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)