00001 /* 00002 00003 Copyright (C) 2006 Grame 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 00019 Grame Research Laboratory, 9 rue du Garet, 69001 Lyon - France 00020 research@grame.fr 00021 00022 */ 00023 00024 #ifndef __AnnotationsList__ 00025 #define __AnnotationsList__ 00026 00027 #ifdef WIN32 00028 #pragma warning (disable : 4786) 00029 #endif 00030 00031 #include <iostream> 00032 #include "Annotation.h" 00033 00034 namespace ScoreProcessing 00035 { 00036 00041 class AnnotationsVisitor; 00042 typedef SP_SMARTP<class AnnotationsList> SAnnotationsList; 00043 00052 class AnnotationsList : public sp_smartable 00053 { 00054 protected: 00055 virtual ~AnnotationsList() {} 00056 00057 public: 00058 virtual SAnnotationsList add(SAnnotation a) = 0; 00059 virtual SAnnotationsList rem(SAnnotation a) = 0; 00060 virtual SAnnotationsList move(SAnnotation a, TimeRange range) = 0; 00061 virtual SAnnotationsList clear() = 0; 00062 virtual void addMeasure(Time shiftFrom, Time measureDuration) = 0; 00063 virtual void remMeasure(Time deleteFrom, Time measureDuration) = 0; 00064 virtual int size() = 0; 00065 virtual bool empty() = 0; 00066 virtual SAnnotation get(int index) = 0; 00067 virtual bool contains(SAnnotation a) = 0; 00068 00069 virtual SAnnotationsList insert(SAnnotation a) = 0; 00070 virtual SAnnotationsList sort() = 0; 00071 virtual SAnnotationsList clip(TimeRange tr) = 0; 00072 00073 virtual void accept(AnnotationBaseVisitor* visitor)=0; 00074 00075 virtual std::ostream& print(std::ostream& out)=0; 00076 }; 00077 00078 std::ostream& operator << (std::ostream& out, SAnnotationsList& al); 00079 00082 } // namespace 00083 00084 #endif
1.5.8