本文整理汇总了C++中FileXML::read_tag方法的典型用法代码示例。如果您正苦于以下问题:C++ FileXML::read_tag方法的具体用法?C++ FileXML::read_tag怎么用?C++ FileXML::read_tag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileXML
的用法示例。
在下文中一共展示了FileXML::read_tag方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
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;
}
示例2: 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++;
}
}
}
示例3: 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;
}
}
}
}
示例4: 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);
}
}
}
}
示例5: read_data
void IVTCMain::read_data(KeyFrame *keyframe)
{
FileXML input;
input.set_shared_string(keyframe->get_data(), strlen(keyframe->get_data()));
int result = 0;
float new_threshold;
while(!result)
{
result = input.read_tag();
if(!result)
{
if(input.tag.title_is("IVTC"))
{
config.frame_offset = input.tag.get_property("FRAME_OFFSET", config.frame_offset);
config.first_field = input.tag.get_property("FIRST_FIELD", config.first_field);
config.automatic = input.tag.get_property("AUTOMATIC", config.automatic);
new_threshold = input.tag.get_property("AUTO_THRESHOLD", config.auto_threshold);
config.pattern = input.tag.get_property("PATTERN", config.pattern);
}
}
}
}
示例6: 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);
}
}
}
}
示例7: read_data
void ParametricEQ::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("PARAMETRICEQ"))
{
config.wetness = input.tag.get_property("WETNESS", config.wetness);
config.window_size = input.tag.get_property("WINDOW_SIZE", config.window_size);
}
else
if(input.tag.title_is("BAND"))
{
int band = input.tag.get_property("NUMBER", 0);
config.band[band].freq = input.tag.get_property("FREQ", config.band[band].freq);
config.band[band].quality = input.tag.get_property("QUALITY", config.band[band].quality);
config.band[band].magnitude = input.tag.get_property("MAGNITUDE", config.band[band].magnitude);
config.band[band].mode = input.tag.get_property("MODE", config.band[band].mode);
}
}
}
}
示例8: read_data
void FlipMain::read_data(KeyFrame *keyframe)
{
FileXML input;
input.set_shared_string(keyframe->data, strlen(keyframe->data));
int result = 0;
config.flip_vertical = config.flip_horizontal = 0;
while(!result)
{
result = input.read_tag();
if(!result)
{
if(input.tag.title_is("VERTICAL"))
{
config.flip_vertical = 1;
}
else
if(input.tag.title_is("HORIZONTAL"))
{
config.flip_horizontal = 1;
}
}
}
}
示例9: 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();
}
}
示例10: read_data
void SelTempAvgMain::read_data(KeyFrame *keyframe)
{
FileXML input;
input.set_shared_string(keyframe->get_data(), strlen(keyframe->get_data()));
int result = 0;
while(!input.read_tag())
{
if(input.tag.title_is("SELECTIVE_TEMPORAL_AVERAGE"))
{
config.frames = input.tag.get_property("FRAMES", config.frames);
config.method = input.tag.get_property("METHOD", config.method);
config.offsetmode = input.tag.get_property("OFFSETMODE", config.offsetmode);
config.paranoid = input.tag.get_property("PARANOID", config.paranoid);
config.nosubtract = input.tag.get_property("NOSUBTRACT", config.nosubtract);
config.offset_restartmarker_keyframe = input.tag.get_property("OFFSETMODE_RESTARTMODE_KEYFRAME", config.offset_restartmarker_keyframe);
config.offset_fixed_value = input.tag.get_property("OFFSETMODE_FIXED_VALUE", config.offset_fixed_value);
config.gain = input.tag.get_property("gain", config.gain);
config.avg_threshold_RY = input.tag.get_property("AVG_THRESHOLD_RY", config.avg_threshold_RY);
config.avg_threshold_GU = input.tag.get_property("AVG_THRESHOLD_GU", config.avg_threshold_GU);
config.avg_threshold_BV = input.tag.get_property("AVG_THRESHOLD_BV", config.avg_threshold_BV);
config.std_threshold_RY = input.tag.get_property("STD_THRESHOLD_RY", config.std_threshold_RY);
config.std_threshold_GU = input.tag.get_property("STD_THRESHOLD_GU", config.std_threshold_GU);
config.std_threshold_BV = input.tag.get_property("STD_THRESHOLD_BV", config.std_threshold_BV);
config.mask_RY = input.tag.get_property("MASK_RY", config.mask_RY);
config.mask_GU = input.tag.get_property("MASK_GU", config.mask_GU);
config.mask_BV = input.tag.get_property("MASK_BV", config.mask_BV);
}
}
}
示例11: 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);
}
}
}
}
示例12: 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);
}
}
}
}
示例13: 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);
}
}
}
}
示例14: read_data
void LensMain::read_data(KeyFrame *keyframe)
{
FileXML input;
char string[BCTEXTLEN];
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("LENS"))
{
for(int i = 0; i < FOV_CHANNELS; i++)
{
sprintf(string, "FOCAL_LENGTH%d", i);
config.fov[i] = input.tag.get_property(string, config.fov[i]);
}
config.aspect = input.tag.get_property("ASPECT", config.aspect);
config.radius = input.tag.get_property("RADIUS", config.radius);
config.mode = input.tag.get_property("MODE", config.mode);
config.center_x = input.tag.get_property("CENTER_X", config.center_x);
config.center_y = input.tag.get_property("CENTER_Y", config.center_y);
config.draw_guides = input.tag.get_property("DRAW_GUIDES", config.draw_guides);
}
}
}
}
示例15: read_data
void Synth::read_data(KeyFrame *keyframe)
{
FileXML input;
char string[BCTEXTLEN];
// cause htal file to read directly from text
input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
//printf("Synth::read_data %s\n", keyframe->get_data());
int result = 0, current_osc = 0;
//int total_oscillators = 0;
while(!result)
{
result = input.read_tag();
if(!result)
{
if(input.tag.title_is("SYNTH"))
{
config.wetness = input.tag.get_property("WETNESS", config.wetness);
if(is_defaults())
{
window_w = input.tag.get_property("WINDOW_W", window_w);
window_h = input.tag.get_property("WINDOW_H", window_h);
}
config.momentary_notes = input.tag.get_property("MOMENTARY_NOTES", config.momentary_notes);
//printf("Synth::read_data %d %d %d\n", __LINE__, window_w, window_h);
for(int i = 0; i < MAX_FREQS; i++)
{
sprintf(string, "BASEFREQ_%d", i);
config.base_freq[i] = input.tag.get_property(string, (double)0);
}
config.wavefunction = input.tag.get_property("WAVEFUNCTION", config.wavefunction);
//total_oscillators = input.tag.get_property("OSCILLATORS", 0);
}
else
if(input.tag.title_is("OSCILLATOR"))
{
if(current_osc >= config.oscillator_config.total)
config.oscillator_config.append(new SynthOscillatorConfig(current_osc));
config.oscillator_config.values[current_osc]->read_data(&input);
current_osc++;
}
}
}
while(config.oscillator_config.total > current_osc)
config.oscillator_config.remove_object();
}