-
Notifications
You must be signed in to change notification settings - Fork 1
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
Get rid of all global variables #5
Comments
Could you give me an example? Do you mean the variables declared in config.h? |
The config.h file is generated by the configure stage, so it can be completely ignored. There are three
Both of these get instantiated and referred to by others in The idea would be to instantiate something function-local in OneNoteParser::parse() (or maybe OneDocument::parse()) and pass this to functions that would be called afterwards. This can also be an opportunity to fold in the Does that make any sense? :) |
I am at a similar point with my library attempt, too. I was just training design patterns, and thought a factory might be needed here, e.g. reading I haven't looked much on that idea, but can have a librevenge stream meta information?
yeah, you warned me, that you are currently very busy. Don't feel pressured to invest time. |
Indeed, a singleton won't work because of the inherent limit of managing only one document. (as an aside, that might just work for issue #3, as logging would be done in one manner library-wide anyway). I'm wondering though what you have in mind with the factory approach? If you have any more thoughts on this or anything. This might or might not work, so far I've avoided design patterns to keep things simple, but you might be onto something here. Regarding stream properties, one way of appending metadata "private" to libone could be to use librevenge document properties if you want to limit yourself to what's provided by librevenge (one could prefix private data with (this is a bit of a braindump, again..) |
No description provided.
The text was updated successfully, but these errors were encountered: