예제 #1
0
static bool create_fiber(file_tmpl& tmpl)
{
	string file(tmpl.get_project_name());
	file << ".cf";
	if (tmpl.copy_and_replace("master_fiber.cf", file.c_str()) == false)
		return false;

	const char* name = "master_fiber";
	const FILE_FROM_TO tab[] = {
		{ "main_fiber.cpp", "main.cpp" },
		{ "master_fiber.h", "master_service.h" },
		{ "master_fiber.cpp", "master_service.cpp" },
		{ "stdafx_fiber.h", "stdafx.h" },
		{ "http_servlet.h", "http_servlet.h" },
		{ NULL, NULL }
	};

	return tmpl.files_copy(name, tab)
		&& tmpl.copy_and_replace("Makefile_fiber", "Makefile")
		&& tmpl.file_copy("tmpl/Makefile_fiber.in",
			"Makefile.in");
}
예제 #2
0
static bool create_master_udp(file_tmpl& tmpl)
{
	string file(tmpl.get_project_name());
	file << ".cf";
	if (tmpl.copy_and_replace("master_udp.cf", file.c_str()) == false)
		return false;

	const char* name = "master_udp";
	const FILE_FROM_TO tab[] = {
		{ "main_udp.cpp", "main.cpp" },
		{ "master_udp.h", "master_service.h" },
		{ "master_udp.cpp", "master_service.cpp" },
		{ NULL, NULL }
	};

	return tmpl. files_copy(name, tab);
}