当前位置: 首页>>代码示例>>C++>>正文


C++ FileXML类代码示例

本文整理汇总了C++中FileXML的典型用法代码示例。如果您正苦于以下问题:C++ FileXML类的具体用法?C++ FileXML怎么用?C++ FileXML使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了FileXML类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: save_data

void LensMain::save_data(KeyFrame *keyframe)
{
	FileXML output;
	char string[BCTEXTLEN];



// cause data to be stored directly in text
	output.set_shared_string(keyframe->get_data(), MESSAGESIZE);
	output.tag.set_title("LENS");
	for(int i = 0; i < FOV_CHANNELS; i++)
	{
		sprintf(string, "FOCAL_LENGTH%d", i);
		output.tag.set_property(string, config.fov[i]);
	}
	output.tag.set_property("ASPECT", config.aspect);
	output.tag.set_property("RADIUS", config.radius);
	output.tag.set_property("MODE", config.mode);
	output.tag.set_property("CENTER_X", config.center_x);
	output.tag.set_property("CENTER_Y", config.center_y);
	output.tag.set_property("DRAW_GUIDES", config.draw_guides);
	output.append_tag();
	output.terminate_string();

}
开发者ID:beequ7et,项目名称:cinelerra-cv,代码行数:25,代码来源:lens.C

示例2: read_data

void SvgMain::read_data(KeyFrame *keyframe)
{
	FileXML input;

	input.set_shared_string(keyframe->get_data(), strlen(keyframe->get_data()));

	int result = 0;

	while(!result)
	{
		result = input.read_tag();

		if(!result)
		{
			if(input.tag.title_is("SVG"))
			{
 				config.in_x = input.tag.get_property("IN_X", config.in_x);
				config.in_y = input.tag.get_property("IN_Y", config.in_y);
				config.in_w = input.tag.get_property("IN_W", config.in_w);
				config.in_h = input.tag.get_property("IN_H", config.in_h);
				config.out_x =	input.tag.get_property("OUT_X", config.out_x);
				config.out_y =	input.tag.get_property("OUT_Y", config.out_y);
				config.out_w =	input.tag.get_property("OUT_W", config.out_w);
				config.out_h =	input.tag.get_property("OUT_H", config.out_h);
				input.tag.get_property("SVG_FILE", config.svg_file);
			}
		}
	}
}
开发者ID:petterreinholdtsen,项目名称:cinelerra-hv,代码行数:29,代码来源:svg.C

示例3: load

void ChannelDB::load(const char *filename)
{
	if( !filename ) return;

	FileXML file;
	char path[BCTEXTLEN];

	prefix_to_path(path, filename);
	channels.remove_all_objects();

	int done = file.read_from_file(path, 1);

	channels.remove_all_objects();
// Load channels
	while(!done)
	{
		Channel *channel = new Channel;
		if(!(done = channel->load(&file)))
			channels.append(channel);
		else
		{
			delete channel;
		}
	}
}
开发者ID:Cuchulain,项目名称:cinelerra,代码行数:25,代码来源:channeldb.C

示例4: read_data

void FreezeFrameMain::read_data(KeyFrame *keyframe)
{
	FileXML input;

	input.set_shared_string(keyframe->get_data(), strlen(keyframe->get_data()));

	int result = 0;
	config.enabled = 0;
	config.line_double = 0;

	while(!result)
	{
		result = input.read_tag();

		if(!result)
		{
			if(input.tag.title_is("ENABLED"))
			{
				config.enabled = 1;
			}
			if(input.tag.title_is("LINE_DOUBLE"))
			{
				config.line_double = 1;
			}
		}
	}
}
开发者ID:petterreinholdtsen,项目名称:cinelerra-hv,代码行数:27,代码来源:freezeframe.C

示例5: read_data

void CompressorEffect::read_data(KeyFrame *keyframe)
{
	FileXML input;
	input.set_shared_string(keyframe->get_data(), strlen(keyframe->get_data()));

	int result = 0;
	config.levels.remove_all();
	while(!result)
	{
		result = input.read_tag();

		if(!result)
		{
			if(input.tag.title_is("COMPRESSOR"))
			{
				config.reaction_len = input.tag.get_property("REACTION_LEN", config.reaction_len);
				config.decay_len = input.tag.get_property("DECAY_LEN", config.decay_len);
				config.trigger = input.tag.get_property("TRIGGER", config.trigger);
				config.smoothing_only = input.tag.get_property("SMOOTHING_ONLY", config.smoothing_only);
				config.input = input.tag.get_property("INPUT", config.input);
			}
			else
			if(input.tag.title_is("LEVEL"))
			{
				double x = input.tag.get_property("X", (double)0);
				double y = input.tag.get_property("Y", (double)0);
				compressor_point_t point = { x, y };

				config.levels.append(point);
			}
		}
	}
}
开发者ID:petterreinholdtsen,项目名称:cinelerra-hv,代码行数:33,代码来源:compressor.C

示例6: read_ads

int Commercials::
read_ads(const char *filename)
{
	char index_filename[BCTEXTLEN], source_filename[BCTEXTLEN];
	IndexFile::get_index_filename(source_filename,
		mwindow->preferences->index_directory, index_filename,
		filename, ".ads");
	tracks.remove_all_objects();
	FileXML xml;
	if( xml.read_from_file(index_filename, 1) ) return 1;

	do {
		if( xml.read_tag() ) return 1;
	} while( !xml.tag.title_is("ADS") );

	for(;;) {
		if( xml.read_tag() ) return 1;
		if( xml.tag.title_is("/ADS") ) break;
		if( xml.tag.title_is("CLIPS") ) {
			int pid = xml.tag.get_property("PID", (int)0);
			Clips *clips = new Clips(pid);
			tracks.append(clips);
			if( clips->load(xml) ) return 1;
			if( !xml.tag.title_is("/CLIPS") ) break;
		}
	}

	return 0;
}
开发者ID:TravisKraatz,项目名称:cinelerra,代码行数:29,代码来源:commercials.C

示例7:

void Color3WayMain::save_data(KeyFrame *keyframe)
{
	FileXML output;

// cause data to be stored directly in text
	output.set_shared_string(keyframe->get_data(), MESSAGESIZE);
	output.tag.set_title("COLOR3WAY");
	for(int i = 0; i < SECTIONS; i++)
	{
		char string[BCTEXTLEN];
		sprintf(string, "HUE_X_%d", i);
		output.tag.set_property(string, config.hue_x[i]);
		sprintf(string, "HUE_Y_%d", i);
		output.tag.set_property(string, config.hue_y[i]);
		sprintf(string, "VALUE_%d", i);
		output.tag.set_property(string, config.value[i]);
		sprintf(string, "SATURATION_%d", i);
		output.tag.set_property(string, config.saturation[i]);
		if(is_defaults())
		{
			sprintf(string, "COPY_TO_ALL_%d", i);
			output.tag.set_property(string, copy_to_all[i]);
		}
	}

	if(is_defaults())
	{
		output.tag.set_property("W",  w);
		output.tag.set_property("H",  h);
	}
	
	output.append_tag();
	output.terminate_string();
}
开发者ID:petterreinholdtsen,项目名称:cinelerra-hv,代码行数:34,代码来源:color3way.C

示例8: read_data

void TranslateMain::read_data(KeyFrame *keyframe)
{
	FileXML input;

	input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));

	int result = 0;

	while(!result)
	{
		result = input.read_tag();

		if(!result)
		{
			if(input.tag.title_is("TRANSLATE"))
			{
 				config.in_x = input.tag.get_property("IN_X", config.in_x);
				config.in_y = input.tag.get_property("IN_Y", config.in_y);
				config.in_w = input.tag.get_property("IN_W", config.in_w);
				config.in_h = input.tag.get_property("IN_H", config.in_h);
				config.out_x =	input.tag.get_property("OUT_X", config.out_x);
				config.out_y =	input.tag.get_property("OUT_Y", config.out_y);
				config.out_w =	input.tag.get_property("OUT_W", config.out_w);
				config.out_h =	input.tag.get_property("OUT_H", config.out_h);
			}
		}
	}
}
开发者ID:Cuchulain,项目名称:cinelerra,代码行数:28,代码来源:translate.C

示例9: read_data

void ColorBalanceMain::read_data(KeyFrame *keyframe)
{
	FileXML input;

	input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));

	int result = 0;

	while(!result)
	{
		result = input.read_tag();

		if(!result)
		{
			if(input.tag.title_is("COLORBALANCE"))
			{
				config.cyan = input.tag.get_property("CYAN", config.cyan);
				config.magenta = input.tag.get_property("MAGENTA", config.magenta);
				config.yellow = input.tag.get_property("YELLOW", config.yellow);
				config.preserve = input.tag.get_property("PRESERVELUMINOSITY", config.preserve);
				config.lock_params = input.tag.get_property("LOCKPARAMS", config.lock_params);
			}
		}
	}
}
开发者ID:Cuchulain,项目名称:cinelerra,代码行数:25,代码来源:colorbalance.C

示例10: strlen

void RGB601Main::read_data(KeyFrame *keyframe)
{
	FileXML input;

	input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));

	int result = 0;

	while(!result)
	{
		result = input.read_tag();

		if(!result)
		{
			if(input.tag.title_is("RGB601"))
			{
				config.direction = input.tag.get_property("DIRECTION", config.direction);
			}
		}
	}

	if(thread) 
	{
		((RGB601Window*)thread->window)->update();
	}
}
开发者ID:knutj,项目名称:cinelerra,代码行数:26,代码来源:rgb601.C

示例11: read_data

void BlurMain::read_data(KeyFrame *keyframe)
{
	FileXML input;

	input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));

	int result = 0;

	while(!result)
	{
		result = input.read_tag();

		if(!result)
		{
			if(input.tag.title_is("BLUR"))
			{
				config.vertical = input.tag.get_property("VERTICAL", config.vertical);
				config.horizontal = input.tag.get_property("HORIZONTAL", config.horizontal);
				config.radius = input.tag.get_property("RADIUS", config.radius);
//printf("BlurMain::read_data 1 %d %d %s\n", get_source_position(), keyframe->position, keyframe->get_data());
				config.r = input.tag.get_property("R", config.r);
				config.g = input.tag.get_property("G", config.g);
				config.b = input.tag.get_property("B", config.b);
				config.a = input.tag.get_property("A", config.a);
				config.a_key = input.tag.get_property("A_KEY", config.a_key);
			}
		}
	}
}
开发者ID:Cuchulain,项目名称:cinelerra,代码行数:29,代码来源:blur.C

示例12: read_data

void PluginAClientLAD::read_data(KeyFrame *keyframe)
{
	FileXML input;
	char string[BCTEXTLEN];

	input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
	config.initialize(server);

	while(! input.read_tag() ) {
//printf("PluginAClientLAD::read_data %s\n", input.tag.get_title());
		if(! input.tag.title_is(lad_to_upper(string, plugin_title())) ) continue;
		const LADSPA_Descriptor *lad_desc = server->lad_descriptor;
		const LADSPA_PortDescriptor *port_desc = lad_desc->PortDescriptors;
		int port_count = lad_desc->PortCount;
		for(int port = 0, i = 0; i < port_count; i++) {
			if( !LADSPA_IS_PORT_INPUT(port_desc[i]) ) continue;
			if( !LADSPA_IS_PORT_CONTROL(port_desc[i]) ) continue;
			PluginAClientLAD::lad_to_upper(string, (char*)lad_desc->PortNames[i]);
			config.port_data[port] = 
				input.tag.get_property(string, config.port_data[port]);
//printf("PluginAClientLAD::read_data %d %f\n", port, config.port_data[port]);
			port++;
		}
	}
}
开发者ID:knutj,项目名称:cinelerra,代码行数:25,代码来源:pluginaclientlad.C

示例13: save_data

void PluginAClientLAD::save_data(KeyFrame *keyframe)
{
	FileXML output;
	char string[BCTEXTLEN];
	if( !config.port_data ) config.initialize(server);

// cause data to be stored directly in text
	output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
	output.tag.set_title(lad_to_upper(string, plugin_title()));

	const LADSPA_Descriptor *lad_desc = server->lad_descriptor;
	const LADSPA_PortDescriptor *port_desc = lad_desc->PortDescriptors;
//printf("PluginAClientLAD::save_data %d\n", lad_desc->PortCount);
	int port_count = lad_desc->PortCount;
	for(int port = 0, i = 0; i < port_count; i++) {
		if( !LADSPA_IS_PORT_INPUT(port_desc[i]) ) continue;
		if( !LADSPA_IS_PORT_CONTROL(port_desc[i]) ) continue;
// Convert LAD port name to default title
		PluginAClientLAD::lad_to_upper(string, 
			(char*)lad_desc->PortNames[i]);
		output.tag.set_property(string, config.port_data[port]);
//printf("PluginAClientLAD::save_data %d %f\n", port, config.port_data[port]);
		++port;
	}

	output.append_tag();
	output.terminate_string();
}
开发者ID:knutj,项目名称:cinelerra,代码行数:28,代码来源:pluginaclientlad.C

示例14: save_data

void FindObjectMain::save_data(KeyFrame *keyframe)
{
	FileXML output;

// cause data to be stored directly in text
	output.set_shared_string(keyframe->get_data(), MESSAGESIZE);
	output.tag.set_title("FINDOBJECT");

	output.tag.set_property("GLOBAL_BLOCK_W", config.global_block_w);
	output.tag.set_property("GLOBAL_BLOCK_H", config.global_block_h);
	output.tag.set_property("BLOCK_X", config.block_x);
	output.tag.set_property("BLOCK_Y", config.block_y);
	output.tag.set_property("GLOBAL_RANGE_W", config.global_range_w);
	output.tag.set_property("GLOBAL_RANGE_H", config.global_range_h);
	output.tag.set_property("DRAW_KEYPOINTS", config.draw_keypoints);
	output.tag.set_property("DRAW_BORDER", config.draw_border);
	output.tag.set_property("REPLACE_OBJECT", config.replace_object);
	output.tag.set_property("DRAW_OBJECT_BORDER", config.draw_object_border);
	output.tag.set_property("OBJECT_LAYER", config.object_layer);
	output.tag.set_property("REPLACE_LAYER", config.replace_layer);
	output.tag.set_property("SCENE_LAYER", config.scene_layer);
	output.tag.set_property("ALGORITHM", config.algorithm);
	output.tag.set_property("VMIN", config.vmin);
	output.tag.set_property("VMAX", config.vmax);
	output.tag.set_property("SMIN", config.smin);
	output.tag.set_property("BLEND", config.blend);
	output.append_tag();
	output.terminate_string();
}
开发者ID:petterreinholdtsen,项目名称:cinelerra-hv,代码行数:29,代码来源:findobject.C

示例15: save_data

void SelTempAvgMain::save_data(KeyFrame *keyframe)
{
	FileXML output;

// cause data to be stored directly in text
	output.set_shared_string(keyframe->get_data(), MESSAGESIZE);
	output.tag.set_title("SELECTIVE_TEMPORAL_AVERAGE");
	output.tag.set_property("FRAMES", config.frames);
	output.tag.set_property("METHOD", config.method);
	output.tag.set_property("OFFSETMODE", config.offsetmode);
	output.tag.set_property("PARANOID", config.paranoid);
	output.tag.set_property("NOSUBTRACT", config.nosubtract);
	output.tag.set_property("OFFSETMODE_RESTARTMODE_KEYFRAME", config.offset_restartmarker_keyframe);
	output.tag.set_property("OFFSETMODE_FIXED_VALUE", config.offset_fixed_value);
	output.tag.set_property("GAIN", config.gain);


	output.tag.set_property("AVG_THRESHOLD_RY", config.avg_threshold_RY); 
	output.tag.set_property("AVG_THRESHOLD_GU", config.avg_threshold_GU); 
	output.tag.set_property("AVG_THRESHOLD_BV", config.avg_threshold_BV); 
	output.tag.set_property("STD_THRESHOLD_RY", config.std_threshold_RY); 
	output.tag.set_property("STD_THRESHOLD_GU", config.std_threshold_GU); 
	output.tag.set_property("STD_THRESHOLD_BV", config.std_threshold_BV);

	output.tag.set_property("MASK_RY", config.mask_RY); 
	output.tag.set_property("MASK_GU", config.mask_GU); 
	output.tag.set_property("MASK_BV", config.mask_BV);

	output.append_tag();
	output.terminate_string();
}
开发者ID:petterreinholdtsen,项目名称:cinelerra-hv,代码行数:31,代码来源:seltempavg.C


注:本文中的FileXML类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。