Dependencies in a class library

Started by
0 comments, last by Mr Cucumber 21 years, 3 months ago
I am at the moment constructing a class library for C++ and I started thinking about dependencies in the library itself. For example I have one class that is supposed to log all memory allocation and deallocation. I have one class that handles array managment, it uses the memory logging for all memory it allocates and deallocates. I have one class that uses one of these arrays for storing a pointer to all open files. So the file library is dependant on the array library which in turn is dependant on the memory library. Should I try to remove all these dependencies withing the class library and only for example log memory that the developer using the engine allocates and not log memory that the library in itself allocates? However it makes life much easier if I can use the array library in the file class, and it does seem to make sense to log the memory that is allocated in the array class. Hope this makes sense.
Advertisement
Does anyone have any ideas of this?

This topic is closed to new replies.

Advertisement