Product Documentation
Virtuoso Studio Design Environment SKILL Reference
Product Version IC23.1, November 2023

ddProduceObjRelNames

ddProduceObjRelNames( 
b_objId 
g_consumer 
g_clientData 
) 
=> t / nil 

Description

Produces the names of all the objects that belong to a library, cell, or view and calls the given function with each name and any provided data structure.

The list of names includes objects in the library’s temporary directory, if it exists, as well as those in the library itself (the master directory).

The objective is to generate the names of the objects underneath a library, cell, or view when the caller is only interested in the names and not what type of object the name is associated with. This avoids doing expensive fstats on the objects.

If an object is created while the producer is active, its name may not be visible g_consumer. If an object is deleted after the producer has been started but before you access it, g_consumer could get a name for an object that does not exist.

You should use ddGetObj to get a ddId for the object if you need one. You should check the return value of ddGetObj for the reasons described above.

Arguments

b_objId

The parent object.

g_consumer

The g_consumer function should be of the form
myClient( t_objName, g_clientData ) => t / nil

t_objName
Is the name of the next objects (directory or file) being produced.

g_clientData
Is the client data that the producer was given.

g_clientData

Any arbitrary piece of data you want passed to the g_consumer.

Value Returned

t

g_consumer returned t for each name passed to it.

nil

There are no objects or if the name production is interrupted by a nil return value of g_consumer.

Examples

Here is how you call this procedure from SKILL:

Sample client:

(procedure (myClient name  arg)
    rplacd(last(arg) ncons(name)) t ) 

The client always returns t so it gets the entire list. If it were searching for a particular name, it would return nil after finding it.

Sample usage:

plist = ’( "ProducedList" )
l1 = ddGetObj( "l1" )
ddProduceObjRelNames( l1, ’myClient plist )
    => t
plist
    => ( "ProducedList" "cdsinfo.tag" "cell1" ) 

Return to top
 ⠀
X