Public Member Functions | |
def | __str__ |
def | get_count |
def | __init__ |
def | set_schema |
def | __iter__ |
def | __getitem__ |
returns an singleton instance env[name] <==> env.get_singleton(name) | |
def | get_singleton |
def | get_non_singleton |
def | map |
return the current landmark id as env# | |
def | __setitem__ |
def | set_landmark |
def | get_landmark |
def | set |
should use set_env instead set the mapping for landmark used to mark instances that should be the same but are not example: if the landmark is by thread, then to map two theads to the same instance then call: set( thread1_id, "newname") set( thread2_id, "newname") | |
def | set_env |
set an environment name in the map if instances have already been created with a old name then | |
def | get_env |
returns the current env name | |
def | __delitem__ |
def | del_instance |
delete the instance 'instance_name' from each singleton stored | |
def | assure_new_instances |
calls the __new_instance__ class for each of the classes stored | |
def | manage_non_singleton |
add a non-singleton class, treats it like a singleton | |
def | Execute |
def | End |
calls 'End' on each singleton class before calling __del_instance__ | |
def | reset |
Static Public Attributes | |
tuple | singletons = dict() |
tuple | non_singletons = dict() |
tuple | count = property( get_count ) |
tuple | lms = property( _get_lm ) |
tuple | instance_names = property( _get_instance_names ) |
tuple | landmark = property( get_landmark, set_landmark ) |
tuple | current_env = property( get_env, set_env ) |
Definition at line 38 of file InstanceManager.py.
def __str__ | ( | self | ) |
Definition at line 48 of file InstanceManager.py.
def get_count | ( | self | ) |
Definition at line 51 of file InstanceManager.py.
def __init__ | ( | self | ) |
Definition at line 58 of file InstanceManager.py.
def set_schema | ( | self, | ||
schematic | ||||
) |
Definition at line 61 of file InstanceManager.py.
def __iter__ | ( | self | ) |
Definition at line 65 of file InstanceManager.py.
def __getitem__ | ( | self, | ||
item | ||||
) |
returns an singleton instance env[name] <==> env.get_singleton(name)
Definition at line 76 of file InstanceManager.py.
def get_singleton | ( | self, | ||
item | ||||
) |
Definition at line 87 of file InstanceManager.py.
def get_non_singleton | ( | self, | ||
name | ||||
) |
Definition at line 99 of file InstanceManager.py.
def map | ( | self, | ||
landmark_id | ||||
) |
def __setitem__ | ( | self, | ||
item, | ||||
value | ||||
) |
Definition at line 140 of file InstanceManager.py.
def set_landmark | ( | self, | ||
lm | ||||
) |
Definition at line 146 of file InstanceManager.py.
def get_landmark | ( | self | ) |
Definition at line 151 of file InstanceManager.py.
def set | ( | self, | ||
lm, | ||||
name | ||||
) |
should use set_env instead set the mapping for landmark used to mark instances that should be the same but are not example: if the landmark is by thread, then to map two theads to the same instance then call: set( thread1_id, "newname") set( thread2_id, "newname")
Definition at line 172 of file InstanceManager.py.
def set_env | ( | self, | ||
name | ||||
) |
set an environment name in the map if instances have already been created with a old name then
Definition at line 181 of file InstanceManager.py.
def get_env | ( | self | ) |
def __delitem__ | ( | self, | ||
instance_name | ||||
) |
Definition at line 204 of file InstanceManager.py.
def del_instance | ( | self, | ||
instance_name | ||||
) |
delete the instance 'instance_name' from each singleton stored
Definition at line 212 of file InstanceManager.py.
def assure_new_instances | ( | self | ) |
calls the __new_instance__ class for each of the classes stored
Definition at line 231 of file InstanceManager.py.
def manage_non_singleton | ( | self, | ||
name, | ||||
obj, | ||||
p, | ||||
kw | ||||
) |
add a non-singleton class, treats it like a singleton
Definition at line 241 of file InstanceManager.py.
def Execute | ( | self | ) |
Definition at line 249 of file InstanceManager.py.
def End | ( | self | ) |
calls 'End' on each singleton class before calling __del_instance__
Definition at line 256 of file InstanceManager.py.
def reset | ( | self | ) |
Definition at line 266 of file InstanceManager.py.
tuple singletons = dict() [static] |
Definition at line 40 of file InstanceManager.py.
tuple non_singletons = dict() [static] |
Definition at line 41 of file InstanceManager.py.
tuple count = property( get_count ) [static] |
Definition at line 56 of file InstanceManager.py.
tuple lms = property( _get_lm ) [static] |
Definition at line 132 of file InstanceManager.py.
tuple instance_names = property( _get_instance_names ) [static] |
Definition at line 138 of file InstanceManager.py.
tuple landmark = property( get_landmark, set_landmark ) [static] |
Definition at line 200 of file InstanceManager.py.
tuple current_env = property( get_env, set_env ) [static] |
Definition at line 201 of file InstanceManager.py.