Package pyxb :: Package utils :: Module utility :: Class UniqueIdentifier |
[hide private]
[frames] | no frames]

# type UniqueIdentifier

source code

    object --+
             |
            UniqueIdentifier

Records a unique identifier, generally associated with a binding generation action.

The identifier is a string, but gets wrapped in an instance of this class to optimize comparisons and reduce memory footprint.

Invoking the constructor for this class on the same string multiple times will return the same Python object.

An instance of this class compares equal to, and hashes equivalent to, the uid string. When `str`'d, the result is the uid; when `repr`'d, the result is a constructor call to `pyxb.utils.utility.UniqueIdentifier`.

Instance Methods | [hide private]
uid(self) The string unique identifier | source code
__getnewargs__(self) | source code
__getstate__(self) | source code
__setstate__(self, state) | source code
associateObject(self, obj) Associate the given object witth this identifier. | source code
associatedObjects(self) The set of objects that have been associated with this identifier instance. | source code
__init__(self, uid=None) Create a new UniqueIdentifier instance. | source code
__eq__(self, other) | source code
__hash__(self) | source code
__str__(self) | source code
__repr__(self) | source code

Static Methods | [hide private]
__new__(cls, *args) | source code

Class Variables | [hide private]
| __ExistingUIDs = ``{``'``PyXB-1.2.3-Builtin``'``:` pyxb.utils.utility.Uni`...``
| __uid = `None`
| __associatedObjects = `None`

Method Details | [hide private]

### __new__(cls, *args) Static Method | source code
Overrides: object.__new__ (inherited documentation)

### associateObject(self, obj) | source code
Associate the given object witth this identifier. This is a one-way association: the object is not provided with a return path to this identifier instance.

### __init__(self, uid=None) (Constructor) | source code
Create a new UniqueIdentifier instance. Parameters: `uid` (`str` or `unicode`) - The unique identifier string. If present, it is the callers responsibility to ensure the value is universally unique. If `None`, one will be provided. Overrides: object.__init__

### __hash__(self) (Hashing function) | source code
Overrides: object.__hash__ (inherited documentation)

### __str__(self) (Informal representation operator) | source code
Overrides: object.__str__ (inherited documentation)

### __repr__(self) (Representation operator) | source code
Overrides: object.__repr__ (inherited documentation)

Class Variable Details | [hide private]

  ### __ExistingUIDs Value:
      {'PyXB-1.2.3-Builtin': pyxb.utils.utility.UniqueIdentifier('PyXB-1.2.3
      -Builtin')}