apptools.naming.state_factory module

The base class for all state factories.

class apptools.naming.state_factory.StateFactory[source]

Bases: traits.has_traits.HasPrivateTraits

The base class for all state factories.

A state factory accepts an object and returns some data representing the object that is suitable for storing in a particular context.

get_state_to_bind(obj, name, context)[source]

Returns the state of an object for binding.

Returns None if the factory cannot create the state (ie. it does not recognise the object passed to it).