Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Observer/Observable to utils #2782

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

alkino
Copy link
Member

@alkino alkino commented Mar 18, 2024

Still on the purpose of removing IVOS (copy of interviews).

This Observer/Observable should one day be replace by signal/slot because it will be more meaningful.

FROM

class Foo: public Observable
{
  virtual void update(Observable*);
  virtual void disconnect(Observable*);

};

class Bar: public Observer {
  void Attach(cTemplate*, Observer*);
  void Detach(cTemplate*, Observer*);
};

TO

class Foo {
  signal onNewMessage(cTemplate*);
};

class Bar {
  Bar() {
    foo.onNewMessage.connect([](cTemplate*) {}); 
  }
};

Copy link

sonarcloud bot commented Mar 18, 2024

Quality Gate Passed Quality Gate passed

Issues
5 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@ohm314 ohm314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks reasonable. your suggestion to move towards signal/slot should go into an issue so we can address it later.

@ohm314
Copy link
Member

ohm314 commented Mar 25, 2024

obviously - assuming the build errors get figured out :)

@alkino alkino marked this pull request as draft March 26, 2024 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants