rcrath / wvtbl

Wavetable processor
GNU General Public License v3.0
0 stars 0 forks source link

Use setters and getters #29

Closed rcrath closed 2 months ago

rcrath commented 5 months ago

In aa_common, remove the underscore global variables and use setters and getters instead. Requires code adjustments. These adjustments will ensure that the functionality remains intact and the code is more modular and easier to maintain.

Variables to Remove:

_start_file_name, _start_file, _base, tmp_folder (these are globals and can be managed through getters/setters or passed explicitly to functions).

If I remove the following, do I need to make adjustments to the code in other places?:

_start_file_name, _start_file, _base, tmp_folder (these are globals and can be managed through getters/setters or passed explicitly to functions).

no code, just plain l;anguage plz.


response: 
Yes, if you remove the global variables `_start_file_name`, `_start_file`, `_base`, and `tmp_folder`, you will need to make adjustments to the code in other places:

1. **Use Getters/Setters:**
   - Replace direct access to these global variables with calls to their respective getter and setter functions (e.g., `get_start_file_name()`, `set_start_file_name(value)`).

2. **Pass as Arguments:**
   - Any function that currently relies on these global variables will need to have them passed as arguments. Update function signatures and calls to include these parameters.

3. **Update Function Calls:**
   - Ensure that any function or part of the code that sets or reads these variables uses the updated method (either through getters/setters or by passing them as parameters).