17 lines
		
	
	
		
			463 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			463 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
| #! /usr/bin/env python
 | |
| 
 | |
| import sys
 | |
| 
 | |
| if len(sys.argv) < 3:
 | |
| 	sys.exit(1)
 | |
| 
 | |
| pkg = sys.argv[1]
 | |
| name = sys.argv[2]
 | |
| ifdef = "WOMBAT_%s_%s_HPP" % (pkg.upper(), name.upper())
 | |
| namespace = "namespace wombat {\nnamespace %s {\n\n}\n}" % pkg
 | |
| hpp = "#ifndef %s\n#define %s\n\n%s\n\n#endif" % (ifdef, ifdef, namespace)
 | |
| cpp = "#include \"%s.hpp\"\n\n%s" % (name, namespace)
 | |
| 
 | |
| open("src/%s/%s.hpp" % (pkg, name), "w").write(hpp)
 | |
| open("src/%s/%s.cpp" % (pkg, name), "w").write(cpp)
 |