summaryrefslogtreecommitdiffstats
path: root/src/misc/nm/nmApi.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2006-06-11 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2006-06-11 08:01:00 -0700
commit3db1557f45b03875a0a0b8adddcc15c4565895d2 (patch)
tree2896d20ddcb85ae4aa7245ca28bc585f567fea54 /src/misc/nm/nmApi.c
parent7d0921330b1f4e789901b4c2450920e7c412f95f (diff)
downloadabc-3db1557f45b03875a0a0b8adddcc15c4565895d2.tar.gz
abc-3db1557f45b03875a0a0b8adddcc15c4565895d2.tar.bz2
abc-3db1557f45b03875a0a0b8adddcc15c4565895d2.zip
Version abc60611
Diffstat (limited to 'src/misc/nm/nmApi.c')
-rw-r--r--src/misc/nm/nmApi.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/misc/nm/nmApi.c b/src/misc/nm/nmApi.c
index 72ec24e6..3a9ac074 100644
--- a/src/misc/nm/nmApi.c
+++ b/src/misc/nm/nmApi.c
@@ -135,6 +135,31 @@ char * Nm_ManStoreIdName( Nm_Man_t * p, int ObjId, char * pName, char * pSuffix
return pEntry->Name;
}
+/**Function*************************************************************
+
+ Synopsis [Creates a new entry in the name manager.]
+
+ Description [Returns 1 if the entry with the given object ID
+ already exists in the name manager.]
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void Nm_ManDeleteIdName( Nm_Man_t * p, int ObjId )
+{
+ Nm_Entry_t * pEntry;
+ pEntry = Nm_ManTableLookupId(p, ObjId);
+ if ( pEntry == NULL )
+ {
+ printf( "Nm_ManDeleteIdName(): This entry is not in the table.\n" );
+ return;
+ }
+ // remove entry from the table
+ Nm_ManTableDelete( p, pEntry );
+}
+
/**Function*************************************************************
@@ -255,6 +280,28 @@ void Nm_ManPrintTables( Nm_Man_t * p )
printf( "\n" );
}
+/**Function*************************************************************
+
+ Synopsis [Return the IDs of objects with names.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+Vec_Int_t * Nm_ManReturnNameIds( Nm_Man_t * p )
+{
+ Vec_Int_t * vNameIds;
+ int i;
+ vNameIds = Vec_IntAlloc( p->nEntries );
+ for ( i = 0; i < p->nBins; i++ )
+ if ( p->pBinsI2N[i] )
+ Vec_IntPush( vNameIds, p->pBinsI2N[i]->ObjId );
+ return vNameIds;
+}
+
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////