コード例 #1
0
CL_IODevice CL_VirtualFileSource_File::open_file(const CL_String &filename,
	CL_File::OpenMode mode,
	unsigned int access,
	unsigned int share,
	unsigned int flags)
{
	return CL_File(path + filename, mode, access, share, flags);
}
コード例 #2
0
ファイル: model.cpp プロジェクト: PaulFSherwood/cplusplus
void Model_Impl::Load(const char *filename, std::vector<CL_Collada_Image> &library_images)
{
	CL_File file;
	CL_DomDocument doc;

	file = CL_File(filename);
	doc = CL_DomDocument(file);

	Load(doc, "Mesh_Object", library_images);
}
コード例 #3
0
int CL_CSSDocument_Impl::load_import(unsigned char *data, int pos, int length, const CL_StringRef &path)
{
	int block_start = 0, block_end = 0;
	pos = load_keyword("@import", data, pos, length);
	block_start = load_until("\"", data, pos, length)+1;
	block_end = load_until("\"", data, block_start, length);

	CL_String8 import_utf8((char *) data+block_start, block_end-block_start);
	CL_String import_text = CL_StringHelp::trim(CL_StringHelp::utf8_to_text(import_utf8));

	CL_String inc_fullname = path + import_text;
	CL_String inc_path = CL_PathHelp::get_fullpath(inc_fullname, CL_PathHelp::path_type_file);

	CL_IODevice iodevice = CL_File(inc_fullname);
		
	load(inc_path, iodevice);

	return load_until(";", data, block_end+1, length)+1;
}