5 #include "indexstate.h"
17 void ClipEDLs::clear()
19 for( int i=0; i<size(); ++i ) get(i)->remove_user();
23 void ClipEDLs::add_clip(EDL *edl)
29 void ClipEDLs::remove_clip(EDL *clip)
34 while( --n >= 0 ) clip->remove_user();
38 EDL* ClipEDLs::get_copy(EDL *src)
41 for( int i=0; i<size(); ++i ) {
43 if( !strcmp(dst->path, src->path) ) return dst;
47 dst->create_objects();
53 EDL* ClipEDLs::load(char *path)
55 for( int i=0; i<size(); ++i ) {
57 if( !strcmp(dst->path, path) ) return dst;
61 dst->create_objects();
64 xml_file.read_from_file(path);
65 dst->load_xml(&xml_file, LOAD_ALL);
67 // Override path EDL was saved to with the path it was loaded from.
73 void ClipEDLs::copy_nested(ClipEDLs &nested)
76 for( int i=0; i<nested.size(); ++i ) {
77 EDL *new_edl = new EDL;
78 new_edl->create_objects();
79 new_edl->copy_all(nested[i]);
84 void ClipEDLs::update_index(EDL *clip_edl)
86 for( int i=0; i<size(); ++i ) {
87 EDL *current = get(i);
88 if( !strcmp(current->path, clip_edl->path) ) {
89 current->update_index(clip_edl);