1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/
19 // File: QtxListOfOperations.h
20 // Author: Alexander SOLOVYOV
22 #ifndef __QTX_LIST_OF_OPERATIONS_HEADER__
23 #define __QTX_LIST_OF_OPERATIONS_HEADER__
26 #include "QtxOperations.h"
29 #pragma warning( disable:4251 )
34 Class: QtxListOfOperations
36 This class provides special variant of QtxOperations. It contains list of QtxOperations* with
37 fixed order. When it is necessary to calculate operation or get it's priority, this operation is
38 being found starting from first item. It makes possible to create unions of operations. Every QtxOperations*
39 has priority, which is added to priority of operation, so that it makes possible to increase priority of
40 whole group of operations
42 class QTX_EXPORT QtxListOfOperations : public QtxOperations
45 QtxListOfOperations();
46 virtual ~QtxListOfOperations();
48 virtual void opersList( QStringList& ) const;
49 virtual void bracketsList( QStringList&, bool open ) const;
51 virtual bool createValue( const QString&, QtxValue& ) const;
52 virtual int prior ( const QString&, bool isBin ) const;
53 virtual QtxParser::Error isValid( const QString&,
55 const QVariant::Type ) const;
56 virtual QtxParser::Error calculate( const QString&, QtxValue&, QtxValue& ) const;
59 bool has ( const QString& ) const;
60 void append ( const QString&, QtxOperations*, int prior );
61 void prepend( const QString&, QtxOperations*, int prior );
62 void insert ( const QString&, QtxOperations*, int prior, int pos = -1 );
63 void remove ( const QString& );
65 QtxOperations* operations( const QString& ) const;
71 QtxOperations* myOperations;
76 typedef QValueList< OperationSet > OperationSets;
77 typedef OperationSets::const_iterator OperationSetsIterator;