Created
February 10, 2012 13:06
-
-
Save gerdr/1789578 to your computer and use it in GitHub Desktop.
namespace scheme
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
#define NAMESPACE_SOURCE | |
#include "foo.h" |
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
#ifndef NAMESPACE_FOO_H_ | |
#define NAMESPACE_FOO_H_ | |
#define ShortName Namespace_LongName | |
// forward declaration | |
typedef struct namespace_implementation_name_ ShortName; | |
struct namespace_implementation_name_ | |
{ | |
// ... | |
}; | |
#ifndef NAMESPACE_SOURCE | |
#undef ShortName | |
#endif | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment