This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#ifndef __MutuallyConnectable_H__ | |
#define __MutuallyConnectable_H__ | |
// Usage: Suppose you want to have two classes A and B that are mutually connected to each other. | |
// | |
// Derive the class A from MutuallyConnectable<A, B> where A is the class you're deriving | |
// and B is the other class you want to make mutual connections with. | |
// Derive the class B from MutuallyConnectable<B, A>. | |
// |
NewerOlder