2 #include "edlsession.h"
7 IntAuto::IntAuto(EDL *edl, IntAutos *autos)
8 : Auto(edl, (Autos*)autos)
17 int IntAuto::operator==(Auto &that)
19 return identical((IntAuto*)&that);
22 int IntAuto::operator==(IntAuto &that)
24 return identical((IntAuto*)&that);
27 int IntAuto::identical(IntAuto *that)
29 return that->value == value;
32 void IntAuto::load(FileXML *file)
34 value = file->tag.get_property("VALUE", value);
35 //printf("IntAuto::load 1 %d\n", value);
38 void IntAuto::copy(int64_t start, int64_t end, FileXML *file, int default_auto)
40 file->tag.set_title("AUTO");
42 file->tag.set_property("POSITION", 0);
44 file->tag.set_property("POSITION", position - start);
45 file->tag.set_property("VALUE", value);
47 file->append_newline();
51 void IntAuto::copy_from(Auto *that)
53 copy_from((IntAuto*)that);
54 //printf("IntAuto::copy_from(Auto *that) %d\n", value);
57 void IntAuto::copy_from(IntAuto *that)
59 //printf("IntAuto::copy_from(IntAuto *that) %d %d\n", value, that->value);
60 Auto::copy_from(that);
61 this->value = that->value;
64 float IntAuto::value_to_percentage()
69 int IntAuto::percentage_to_value(float percentage)
71 return percentage > .5;