idenning2003 / cbase

Library of C data structures and tests
https://idenning2003.github.io/cbase/
GNU General Public License v3.0
2 stars 0 forks source link

4 implement class #22

Closed idenning2003 closed 3 months ago

idenning2003 commented 3 months ago

I had to make the structure for the class public since otherwise classes would have to be allocated on the stack and removed before the program finished. Since this would add extra steps and require certain execution at the end of main, I opted to move the structure to public.

Thankfully, all the fields can be made const so that a constructed class may not be changed. However, it will still be preferable for future development to use the class_* functions instead of the function pointers to interact with any class instance, that way global changes can be made easier.

I didn't want to make a bunch of TODO notes anywhere I avoided implementation of the rope structure, so instead I implemented a a couple basic rope functions instead which, when a true rope implementation comes around, can be replaced.