indra::base::lluuid::UUID Class Reference

Collaboration diagram for indra::base::lluuid::UUID:

Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __len__
def __nonzero__
def __str__
def __getitem__
def __eq__
def __ne__
def __le__
def __ge__
def __lt__
def __gt__
def __hash__
def set
def setFromString
def setFromMemoryDump
def toString
def getAsString
def generate
def isNull
def xor

Static Public Attributes

string NULL_STR = "00000000-0000-0000-0000-000000000000"
string hex_wildcard = r"[0-9a-fA-F]"
string word = r"{4,4}-"
string long_word = r"{8,8}-"
string very_long_word = r"{12,12}"
 UUID_REGEX_STRING = long_word+word+word+word+very_long_word
tuple uuid_regex = re.compile(UUID_REGEX_STRING)
tuple rand = random.Random()
string ip = ''
tuple ip = socket.gethostbyname(socket.gethostname())
string hexip = ''
string lastid = ''

Private Attributes

 _bits

Static Private Attributes

 __repr__ = __str__


Detailed Description

A class which represents a 16 byte integer. Stored as a 16 byte 8
bit character string.

The string version is to be of the form:
AAAAAAAA-AAAA-BBBB-BBBB-BBBBBBCCCCCC  (a 128-bit number in hex)
where A=network address, B=timestamp, C=random.

Definition at line 45 of file lluuid.py.


Member Function Documentation

def indra::base::lluuid::UUID::__init__ (   self,
  possible_uuid = None 
)

Initialize to first valid UUID in argument (if a string),
or to null UUID if none found or argument is not supplied.

If the argument is a UUID, the constructed object will be a copy of it.

Definition at line 77 of file lluuid.py.

def indra::base::lluuid::UUID::__len__ (   self  ) 

Used by the len() builtin.

Definition at line 101 of file lluuid.py.

def indra::base::lluuid::UUID::__nonzero__ (   self  ) 

Definition at line 107 of file lluuid.py.

def indra::base::lluuid::UUID::__str__ (   self  ) 

Definition at line 110 of file lluuid.py.

def indra::base::lluuid::UUID::__getitem__ (   self,
  index 
)

Definition at line 116 of file lluuid.py.

def indra::base::lluuid::UUID::__eq__ (   self,
  other 
)

Definition at line 119 of file lluuid.py.

def indra::base::lluuid::UUID::__ne__ (   self,
  other 
)

Definition at line 124 of file lluuid.py.

def indra::base::lluuid::UUID::__le__ (   self,
  other 
)

Definition at line 127 of file lluuid.py.

def indra::base::lluuid::UUID::__ge__ (   self,
  other 
)

Definition at line 130 of file lluuid.py.

def indra::base::lluuid::UUID::__lt__ (   self,
  other 
)

Definition at line 133 of file lluuid.py.

def indra::base::lluuid::UUID::__gt__ (   self,
  other 
)

Definition at line 136 of file lluuid.py.

def indra::base::lluuid::UUID::__hash__ (   self  ) 

Definition at line 139 of file lluuid.py.

def indra::base::lluuid::UUID::set (   self,
  uuid 
)

Definition at line 142 of file lluuid.py.

def indra::base::lluuid::UUID::setFromString (   self,
  uuid_string 
)

Given a string version of a uuid, set self bits
appropriately. Returns self.

Definition at line 145 of file lluuid.py.

def indra::base::lluuid::UUID::setFromMemoryDump (   self,
  gdb_string 
)

We expect to get gdb_string as four hex units. eg:
0x147d54db		0xc34b3f1b		0x714f989b		0x0a892fd2
Which will be translated to:
db547d14-1b3f4bc3-9b984f71-d22f890a
Returns self.

Definition at line 157 of file lluuid.py.

def indra::base::lluuid::UUID::toString (   self  ) 

Return as a string matching the LL standard
AAAAAAAA-AAAA-BBBB-BBBB-BBBBBBCCCCCC  (a 128-bit number in hex)
where A=network address, B=timestamp, C=random.

Definition at line 173 of file lluuid.py.

def indra::base::lluuid::UUID::getAsString (   self  ) 

Return a different string representation of the form
AAAAAAAA-AAAABBBB-BBBBBBBB-BBCCCCCC	 (a 128-bit number in hex)
where A=network address, B=timestamp, C=random.

Definition at line 181 of file lluuid.py.

def indra::base::lluuid::UUID::generate (   self  ) 

Generate a new uuid. This algorithm is slightly different
from c++ implementation for portability reasons.
Returns self.

Definition at line 193 of file lluuid.py.

def indra::base::lluuid::UUID::isNull (   self  ) 

Returns 1 if the uuid is null - ie, equal to default uuid.

Definition at line 204 of file lluuid.py.

def indra::base::lluuid::UUID::xor (   self,
  rhs 
)

xors self with rhs.

Definition at line 210 of file lluuid.py.


Member Data Documentation

string indra::base::lluuid::UUID::NULL_STR = "00000000-0000-0000-0000-000000000000" [static]

Definition at line 55 of file lluuid.py.

string indra::base::lluuid::UUID::hex_wildcard = r"[0-9a-fA-F]" [static]

Definition at line 58 of file lluuid.py.

string indra::base::lluuid::UUID::word = r"{4,4}-" [static]

Definition at line 59 of file lluuid.py.

string indra::base::lluuid::UUID::long_word = r"{8,8}-" [static]

Definition at line 60 of file lluuid.py.

string indra::base::lluuid::UUID::very_long_word = r"{12,12}" [static]

Definition at line 61 of file lluuid.py.

Definition at line 62 of file lluuid.py.

Definition at line 63 of file lluuid.py.

tuple indra::base::lluuid::UUID::rand = random.Random() [static]

Definition at line 65 of file lluuid.py.

string indra::base::lluuid::UUID::ip = '' [static]

Definition at line 66 of file lluuid.py.

tuple indra::base::lluuid::UUID::ip = socket.gethostbyname(socket.gethostname()) [static]

Definition at line 68 of file lluuid.py.

string indra::base::lluuid::UUID::hexip = '' [static]

Definition at line 74 of file lluuid.py.

string indra::base::lluuid::UUID::lastid = '' [static]

Definition at line 75 of file lluuid.py.

indra::base::lluuid::UUID::__repr__ = __str__ [static, private]

Definition at line 114 of file lluuid.py.

Definition at line 84 of file lluuid.py.


The documentation for this class was generated from the following file:

Generated on Fri May 16 09:42:26 2008 for SecondLife by  doxygen 1.5.5