source: branches/work_311/core/ARQualification.h @ 559

Revision 559, 1.8 KB checked in by jls17, 6 years ago (diff)
  • added some missing currency support to qualifications
Line 
1//Copyright (C) 2009 Stefan Nerlich | stefan.nerlich@hotmail.com
2//
3//This file is part of ARInside.
4//
5//    ARInside is free software: you can redistribute it and/or modify
6//    it under the terms of the GNU General Public License as published by
7//    the Free Software Foundation, version 2 of the License.
8//
9//    ARInside 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
12//    GNU General Public License for more details.
13//
14//    You should have received a copy of the GNU General Public License
15//    along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
16
17#pragma once
18#include "../ARInside.h"
19
20class CARQualification
21{
22public:
23        // use this constructor in case only one form is involved (e.g. run if)
24        CARQualification(CARInside &arIn, const CRefItem &referenceItem, int currentFormId, int rootLevel);
25        // use this constructor in case two forms are involved (e.g. setfield-if, pushfield-if)
26        CARQualification(CARInside &arIn, const CRefItem &referenceItem, int currentFormId, int otherFormId, int rootLevel);
27
28        ~CARQualification(void);
29
30        void CheckQuery(const ARQualifierStruct *query, stringstream &qText);
31
32        int arsStructItemType;;
33
34private:
35        CARInside *arIn;
36        CRefItem refItem;
37        int primaryFormId;
38        int secondaryFormId;
39        int rootLevel;
40        char primaryFormDelimiter;
41        char secondaryFormDelimiter;
42
43        void CheckOperand(ARFieldValueOrArithStruct *operand, ARFieldValueOrArithStruct *parent, stringstream &qText);
44        int FindCurrentEnumFieldId();
45        char* getFieldPrefix(ARFieldValueOrArithStruct *operand);
46        bool getFormIdAndDelimiter(ARFieldValueOrArithStruct *operand, int &formId, char &delimiter);
47
48        int tmpFormId;
49        vector<const ARQualifierStruct*> qualLevels;
50};
Note: See TracBrowser for help on using the repository browser.