2009-06-25 07:16:22 -07:00
|
|
|
/*
|
|
|
|
* UstTrack.cs
|
|
|
|
* Copyright (c) 2009 kbinani
|
|
|
|
*
|
|
|
|
* This file is part of Boare.Lib.Vsq.
|
|
|
|
*
|
|
|
|
* Boare.Lib.Vsq is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the BSD License.
|
|
|
|
*
|
|
|
|
* Boare.Lib.Vsq is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
*/
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
2009-09-07 03:44:18 -07:00
|
|
|
using bocoree;
|
|
|
|
|
2009-06-25 07:16:22 -07:00
|
|
|
namespace Boare.Lib.Vsq{
|
|
|
|
|
|
|
|
public class UstTrack : ICloneable {
|
|
|
|
public object Tag;
|
2009-09-07 03:44:18 -07:00
|
|
|
private Vector<UstEvent> m_events;
|
2009-06-25 07:16:22 -07:00
|
|
|
|
|
|
|
public UstTrack(){
|
2009-09-07 03:44:18 -07:00
|
|
|
m_events = new Vector<UstEvent>();
|
2009-06-25 07:16:22 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public UstEvent getEvent( int index ) {
|
2009-09-07 03:44:18 -07:00
|
|
|
return m_events.get( index );
|
2009-06-25 07:16:22 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public void setEvent( int index, UstEvent item ) {
|
2009-09-07 03:44:18 -07:00
|
|
|
m_events.set( index, item );
|
2009-06-25 07:16:22 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public void addEvent( UstEvent item ) {
|
2009-09-07 03:44:18 -07:00
|
|
|
m_events.add( item );
|
2009-06-25 07:16:22 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public void removeEvent( int index ) {
|
2009-09-07 03:44:18 -07:00
|
|
|
m_events.removeElementAt( index );
|
2009-06-25 07:16:22 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public int getEventCount() {
|
2009-09-07 03:44:18 -07:00
|
|
|
return m_events.size();
|
2009-06-25 07:16:22 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public Iterator getNoteEventIterator() {
|
|
|
|
return new ListIterator<UstEvent>( m_events );
|
|
|
|
}
|
|
|
|
|
|
|
|
public object Clone() {
|
|
|
|
UstTrack ret = new UstTrack();
|
2009-09-07 03:44:18 -07:00
|
|
|
for ( int i = 0; i < m_events.size(); i++ ) {
|
|
|
|
ret.m_events.set( i, (UstEvent)m_events.get( i ).Clone() );
|
2009-06-25 07:16:22 -07:00
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|