Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • sight sight
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 121
    • Issues 121
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 20
    • Merge requests 20
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Sight
  • sightsight
  • Merge requests
  • !851

Resolve "refactor(core): separate public/private API of IService"

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Flavien BRIDAULT requested to merge 995-refactor-core-separate-public-private-api-of-iservice into dev Nov 30, 2022
  • Overview 6
  • Commits 1
  • Pipelines 28
  • Changes 315

Description

We reduced the size of the public API of the IService interface, which is undoubtedly the most used in Sight.

First, the data management responsibility has been moved to the IHasData interface and now holds the getters and setters for inputs, in/outs and outputs. Secondly, a significant part of the implementation of IService methods has been moved to a pimpl in service::detail::Service and service::detail::ServiceConnection.

The AppConfigManager was moved in the detail namespace as well, so now the public API only exposes IAppConfigManager.

This refactor also finishes the migration of data::ptr. Now the objects of services are only held in data::ptr, the former input, inout and output maps of IService were removed, which simplifies a lot the code. This also implies that services can no longer specify any data in the XML configuration that is not declared as data::ptr. In this repository, only two services relied on the old behaviour SConfigController and SConfigLauncher. The migration consisted in using a single declared group of objects (data::ptr_vector<data::Object>) instead of multiple undeclared objects. Changes were brought in all XML configurations.

Last, the ObjectService registry refactor was also finished. Its role has been reduced because we no longer rely on it to store the relationship between services and objects. This responsibility is filled by the services themselves. So now, this registry only holds a global list of registered services. It has been renamed accordingly. Doing so, the sight::service::registry namespace was removed, and the only other class that was there, sight::service::registry::Proxy was moved to sight::core::com::Proxy. Indeed, it has actually no dependency at all on services and is generic enough to be in the core::com namespace.

Closes #995 (closed)

How to test it?

  • CI tests should be sufficient

Some results

(Some interesting results, screenshots, perfs, ...)

Edited Jan 04, 2023 by Flavien BRIDAULT
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 995-refactor-core-separate-public-private-api-of-iservice