Logo Search packages:      
Sourcecode: balazar3 version File versions  Download package

def balazar3-0.1::tofu::Unique::gen_uid (   self  ) 

Unique.gen_uid()

Generate a new UID for the Unique object.

Definition at line 82 of file __init__.py.

00082                    :
    """Unique.gen_uid()

Generate a new UID for the Unique object."""
    while Unique._next_uid < 65000:
      if not Unique._alls.has_key(Unique._next_uid): break
      Unique._next_uid += 1
    else:
      Unique._next_uid = 1
      while Unique._next_uid < 65000:
        if not Unique._alls.has_key(Unique._next_uid): break
        Unique._next_uid += 1
      else:
        raise ValueError("All UID are used!")
    self.uid = Unique._next_uid
    Unique._alls[self.uid] = self
    Unique._next_uid += 1
    
  @side("client")
  def gen_uid(self):


Generated by  Doxygen 1.6.0   Back to index