Skip to content

Instantly share code, notes, and snippets.

@Antol
Created December 23, 2012 12:11
Show Gist options
  • Save Antol/4363117 to your computer and use it in GitHub Desktop.
Save Antol/4363117 to your computer and use it in GitHub Desktop.
Cool technique in C++ for superclasses
class Object : public Node
{
private:
// It helps to typedef super & self so if you change the name
// of the class or super class, you don't have to replace all
// the references
typedef Node super;
typedef Object self;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment