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

Revision 592, 2.0 KB checked in by jls17, 5 years ago (diff)
  • the classes CRefItem, CARQualification, CARAssignHelper and the method CARInside::LinkToField? do support passing details via the Context class
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 Context;
21class MappingContext;
22
23class CARQualification
24{
25public:
26        // use this constructor in case only one form is involved (e.g. run if)
27        CARQualification(CARInside &arIn, const CRefItem &referenceItem, int currentFormId, int rootLevel);
28        CARQualification(Context &context, const CRefItem &referenceItem);
29
30        // use this constructor in case two forms are involved (e.g. setfield-if, pushfield-if)
31        CARQualification(CARInside &arIn, const CRefItem &referenceItem, int currentFormId, int otherFormId, int rootLevel);
32        CARQualification(MappingContext &context, const CRefItem &referenceItem);
33
34        ~CARQualification(void);
35
36        void CheckQuery(const ARQualifierStruct *query, stringstream &qText);
37
38        int arsStructItemType;;
39
40private:
41        CARInside *arIn;
42        CRefItem refItem;
43        int primaryFormId;
44        int secondaryFormId;
45        int rootLevel;
46        char primaryFormDelimiter;
47        char secondaryFormDelimiter;
48
49        void CheckOperand(ARFieldValueOrArithStruct *operand, ARFieldValueOrArithStruct *parent, stringstream &qText);
50        int FindCurrentEnumFieldId();
51        char* getFieldPrefix(ARFieldValueOrArithStruct *operand);
52        bool getFormIdAndDelimiter(ARFieldValueOrArithStruct *operand, int &formId, char &delimiter);
53
54        int tmpFormId;
55        vector<const ARQualifierStruct*> qualLevels;
56};
Note: See TracBrowser for help on using the repository browser.