paulkokos / DIPAL

This is a C++ image processing and analysis library. The intention is to be indepedent of any libraries.
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Header is one for all images #11

Open paulkokos opened 7 months ago

paulkokos commented 7 months ago

Describe the bug Header is one for all images

To Reproduce Steps to reproduce the behavior: Just see the adresss of the header

Expected behavior The addresss should not be the same

Screenshots Screenshot 2024-02-17 014320

Desktop (please complete the following information):

Additional context Need to change the Singleton Pattern to something else

paulkokos commented 7 months ago

The solution is to make a singleton INSIDE the Image class. This way there will be only one instace of each image. From there it can be extended acordingly

paulkokos commented 6 months ago

there is no way to make an inner class, singleton of an outer class. It will still have one instance of inner classes no matter how many outer classes will be created

paulkokos commented 6 months ago

A different aproach will be to create the inner class inside the constructor. Ans expose it accordingly.