I'm building a large Desktop application, which will have a range of functionality, for each I wish to have a specific class.
I'm thinking of using a nested class structure to modularize the code and ensure separation of interface vs implementation:
class Manager
{
public:
Manager(); //Initialise *t and *wapi in constructor
~Manager(); //Delete *t and *wapi in destructor
private:
class Transport;
Transport *t;
class WinAPI;
WinAPI *wapi;
};
class Manager::Transport
{
public:
Transport(); //Initialise *tcp and *http in constructor
~Transport(); //Delete *tcp and *http in destructor
private:
class TCPSocket;
TCPSocket *tcp;
class HTTP;
HTTP *http;
};
class Manager::Transport::TCPSocket {};
class Manager::Transport::HTTP {};
class Manager::WinAPI
{
...
};
This is the first time I've built a large embedded application - are there any issues/other considerations I should consider before taking this approach?