1 /* 2 Copyright (c) Grame 2012 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 __markers__ 24 #define __markers__ 25 26 #include "guidoelement.h" 27 #include "ARTag.h" 28 29 namespace guido 30 { 31 32 /*! 33 \addtogroup operations 34 @{ 35 */ 36 37 /*! 38 \brief tools for marking tags. 39 */ 40 class markers 41 { 42 public: 43 enum { kNoMark, kClosed=-1, kOpenedBegin=1, kOpenedEnd=2}; 44 45 /// mark an element with an 'opened' attribute, taking care of its current openness 46 static void markOpened ( Sguidotag& elt, bool end=true ); 47 /// set an element 'opened' attribute whatever its current status 48 static void setMark ( Sguidotag& elt, int type ); 49 /// set an element 'opened' attribute whatever its current status 50 static void setMark ( Sguidoelement& elt, int type ); 51 /// delete the 'opened' attribute 52 static void delMark ( Sguidotag& elt ); 53 /// gives the 'opened' attribute value 54 static int opened ( Sguidotag& elt ); 55 }; 56 57 /*! @} */ 58 59 } 60 61 #endif 62