1 /*
2   Copyright � Grame 2008
3 
4     This library is free software; you can redistribute it and/or
5     modify it under the terms of the GNU Lesser General Public
6     License as published by the Free Software Foundation; either
7     version 2.1 of the License, or (at your option) any later version.
8 
9     This library is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12     Lesser General Public License for more details.
13 
14     You should have received a copy of the GNU Lesser General Public
15     License along with this library; if not, write to the Free Software
16     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 
18     Grame Research Laboratory, 9, rue du Garet 69001 Lyon - France
19     research@grame.fr
20 
21 */
22 
23 #ifndef __eheadOperation__
24 #define __eheadOperation__
25 
26 #include <map>
27 #include <string>
28 
29 #include "headOperation.h"
30 
31 namespace guido
32 {
33 
34 /*!
35 \addtogroup operations
36 @{
37 */
38 
39 /*!
40 \brief A visitor that cuts the tail of a score after a given events number.
41 */
42 class gar_export eheadOperation : public headOperation
43 {
44     public:
eheadOperation()45  				 eheadOperation()	{}
~eheadOperation()46 		virtual ~eheadOperation()	{}
47 
48 		/*! cuts the tail of a score after a given duration
49 			\param score the score to be cut
50 			\param evIndex the number of events to preserve
51 			\return a new score
52 		*/
53 		Sguidoelement operator() ( const Sguidoelement& score, unsigned int evIndex, unsigned int voiceIndex=0 );
54 
55 		/*! cuts the tail of a score after a given duration
56 			\param score1 the score to be cut
57 			\param score2 a score which events count is used as cut point.
58 			\return a new score
59 		*/
60 		virtual SARMusic operator() ( const SARMusic& score1, const SARMusic& score2 );
61 
62 };
63 
64 /*! @} */
65 
66 } // namespace MusicXML
67 
68 
69 #endif
70