Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## swarm.simtools
Class UNameImpl

    java.lang.Object
      |
      +--swarm.BaseImpl
            |
            +--swarm.simtools.UNameImpl

public class UNameImpl
extends BaseImpl
implements SwarmObject, SwarmObjectS, UNameS, UName

A class used to generate unique names (e.g. "critter1", "critter2" etc.). This class is used to generate unique names (agent0, agent1, agent2...) for objects in a simulation. The user will typically create an instance of the UName class initialized with a baseName presented either as a (const char *) or an object of class String. The user can then request new names, again either as (const char *)'s or as instances of the String class. The user can also reset the counter used to generate the names in case s/he wants to restart naming objects with the same baseName. Note: Both in the case of initialization by (const char *) and initialization by an instance of the String class, the original is copied not stored internally so it is up to the user to free the original (const char *) or String instance if/when necessary!

Constructor Summary
`UNameImpl()`
`UNameImpl(Zone aZone)` The create: message creates a new instance of a type with default options.
`UNameImpl(Zone aZone, java.lang.Object aStringObject)` The create:setBaseNameObject: method is used to create an instance of the UName class and set the base name given an object of class String.
`UNameImpl(Zone aZone, java.lang.String aString)` The create:setBaseNameObject: method is used to create an instance of the UName class and set the base name given a const char *.

Methods implemented by this class for interface swarm.objectbase.SwarmObject
`getCompleteProbeMap, getProbeForMessage, getProbeForVariable, getProbeMap`

Methods implemented by this class for interface swarm.simtools.UName
`getNewName, getNewNameObject, resetCounter`

Methods implemented by this class for interface swarm.defobj.Drop
`drop`

Methods implemented by this class for interface swarm.defobj.DefinedObject
`compare, describe, describeID, getDisplayName, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid`

Methods implemented by this class for interface swarm.defobj.GetName
`getName`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### UNameImpl

    public UNameImpl()

### UNameImpl

    public UNameImpl(Zone aZone,
                     java.lang.Object aStringObject)

  The create:setBaseNameObject: method is used to create an instance of the UName class and set the base name given an object of class String. This method will automatically reset the counter.

### UNameImpl

    public UNameImpl(Zone aZone,
                     java.lang.String aString)

  The create:setBaseNameObject: method is used to create an instance of the UName class and set the base name given a const char *. This method will automatically reset the counter.

### UNameImpl

    public UNameImpl(Zone aZone)

  The create: message creates a new instance of a type with default options. The zone argument specifies the source of storage for the new object. The receiving object of this message is a previously defined type object. The message is declared as a class message (with a + declaration tag) to indicate that the message is accepted only by the type object itself rather than an already created instance of the type (which a - declaration tag otherwise defines). The create: message returns the new object just created. This object is an instance of some class selected to implement the type. The class which a type selects to implement an object may be obtained by the getClass message, but is not otherwise visible to the calling program. A caller never refers to any class name when creating objects using these messages, only to type names, which are automatically published as global constants from any @protocol declaration.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD