Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DiscordInterface : public NetworkInterface
- {
- public:
- struct Options {
- const char *client_id;
- };
- public:
- DiscordInterface(Options &options);
- ~DiscordInterface();
- };
- //Some other class's method
- template<class NetworkClass>
- void initNetwork(typename NetworkClass::Options opt)
- {
- _network = std::make_unique<NetworkClass>(opt);
- }
- //Caller
- game.initNetwork<DiscordInterface>({.client_id = "5090046****195668"});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement