Body Services
Services for body objects in the Hiten framework.
Body Persistence Service
_BodyPersistenceService()
Encapsulate IO helpers for bodies to simplify testing and substitution.
- class hiten.algorithms.types.services.body._BodyPersistenceService[source]
Bases:
_PersistenceServiceBase
Encapsulate IO helpers for bodies to simplify testing and substitution.
- Parameters:
save_fn (Callable[..., Any]) – The function to save the object.
load_fn (Callable[..., Any]) – The function to load the object.
load_inplace_fn (Optional[Callable[..., Any]] = None) – The function to load the object in place.
Body Dynamics Service
_BodyDynamicsService()
Encapsulate dynamics helpers for bodies to simplify testing and substitution.
- class hiten.algorithms.types.services.body._BodyDynamicsService(body)[source]
Bases:
_DynamicsServiceBase
Encapsulate dynamics helpers for bodies to simplify testing and substitution.
Body Services
_BodyServices()
Encapsulate services for bodies.
- class hiten.algorithms.types.services.body._BodyServices(domain_obj, persistence, dynamics)[source]
Bases:
_ServiceBundleBase
Encapsulate services for bodies.
- Parameters:
domain_obj (
Body
) – The domain object.persistence (
_BodyPersistenceService
) – The persistence service.dynamics (
_BodyDynamicsService
) – The dynamics service.
- classmethod default(domain_obj)[source]
Create a default service bundle.
- Parameters:
domain_obj (
Body
) – The domain object.- Returns:
The service bundle.
- Return type:
_BodyServices
Create a service bundle with a shared dynamics service.
- Parameters:
dynamics (
_BodyDynamicsService
) – The dynamics service.- Returns:
The service bundle.
- Return type:
_BodyServices