geosolver/workbench/singleton.py
kwikrick 22e159a5ad Changes to GeometricSolver:
- Added RigidConstraint.
- Depricated some methods (get_result, get_constrainedness) and 
added some new methods (get_solution, get_cluster, get_status).

Removed old SelectionConstraint and renamed FunctionConstraint to SelectionConstraint

Depricated ClusterSolver2D
Small bugfixes in cluster ClusterSolver3D

Renamed solvergui directory to workbench

Renamed solvertest directory to test
2009-10-09 12:23:02 +00:00

15 lines
397 B
Python

class Singleton(object):
def __new__(type, *p, **k):
if not '_instance' in type.__dict__:
type._instance = object.__new__(type)
type._instance._isNew = True
else:
type._instance._isNew = False
return type._instance
class Borg:
__shared_state = {}
def __init__(self):
self.__dict__ = self.__shared_state