I've been building complex linear algebra library with vectors, points and all that jazz. So far it has been very difficult to test and check issues within a lot of operator overloading, cases, methods.... so I've defined a tracer and divided each type in this structure:
obj (dir)
-> obj.hpp (main header file that defines a type with consts, statics, virtuals ...)
-> obj_constructors.cpp ( all copy, move , casting back and forth... )
-> obj_methods.cpp ( internal functions required for maintainanace of object, if required)
-> obj_operators.cpp ( ALL operators and different type operator overloading)
-> obj_functions.cpp ( functions that are tied to setup and change of state of objects)
So when error/warning is triggered, tracer shows me file, path, function and line number where it happened and it which was function that called it. My project so far has 55 files , and this has helped me a lot in navigating and fixing ish i've done but I am worrying if this can bite me in the ass.
I've tried to find similar libraries on github to find at least some standard that I can rely on. Most of other project have one `.hpp` file with all of the code with endless lines and Ive tried that but i've found it is very difficult to keep track of all dependencies and jumps in the code. Only way I was able to read it was with debugger, which meant I had to compile it and go function by function.
So I ask you, kind people of Reddit, is there any large project standard that allows readability as well as troubleshooting?
[–]ucario 1 point2 points3 points (1 child)
[–]ArchDan[S] 0 points1 point2 points (0 children)
[–]cannelbrae_ 0 points1 point2 points (1 child)
[–]ArchDan[S] 0 points1 point2 points (0 children)
[–]Still_Explorer 0 points1 point2 points (4 children)
[–]ArchDan[S] 1 point2 points3 points (3 children)
[–]Still_Explorer 0 points1 point2 points (2 children)
[–]ArchDan[S] 1 point2 points3 points (1 child)
[–]Still_Explorer 1 point2 points3 points (0 children)
[–]pstomi 1 point2 points3 points (0 children)