source: branches/work_302/core/ARAssignHelper.h @ 182

Revision 182, 3.0 KB checked in by jls17, 9 years ago (diff)
  • added page that lists all error handlers (#95)
  • improved support for HOVER-function
  • added names of server managed object properties
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 "ARValue.h"
19#include "../output/Table.h"
20#include "../output/TableRow.h"
21#include "../ARInside.h"
22
23using namespace OUTPUT;
24
25class CARAssignHelper
26{
27public:
28        CARAssignHelper(CARInside& arIn, int rootLevel, const CARServerObject& obj, const CARSchema& schema1, const CARSchema& schema2);
29        CARAssignHelper(CARInside& arIn, int rootLevel, const CARServerObject& obj, int schemaId1, int schemaId2);
30        CARAssignHelper(CARInside& arIn, int rootLevel, const CARServerObject& obj, const string& schemaName1, const string& schemaName2);
31
32        ~CARAssignHelper(void);
33
34        bool pushFieldFlag;
35
36        string PushFieldsAssignment(const ARPushFieldsActionStruct &action, int nAction, IfElseState ifElse);
37        string SetFieldsAssignment(const ARSetFieldsActionStruct &action, int nAction, IfElseState ifElse);
38        string OpenWindowAssignment(const ARFieldAssignList &action, int nAction, IfElseState ifElse, OpenWindowMode openCloseInfo);
39        string ServiceAssignment(const ARFieldAssignList &action, int nAction, IfElseState ifElse, ServiceMappingMode serviceInfo);
40
41private:
42        unsigned int CheckAssignment(int targetFieldId, ARAssignStruct* parentAssignment, IfElseState ifElse, int nAction, ARAssignStruct &assignment, stringstream &assignText, const CRefItem& refItem);
43
44        void AssignValue(int targetFieldId, IfElseState ifElse, ARValueStruct &v, stringstream &assignText, const CRefItem& refItem);   
45        void AssignField(IfElseState ifElse, int nAction, ARAssignFieldStruct &v, stringstream &assignText, const CRefItem& refItem);
46        void AssignProcess(IfElseState ifElse, char *v, stringstream &assignText, const CRefItem& refItem);
47        void AssignFunction(int targetFieldId, IfElseState ifElse, int nAction, ARFunctionAssignStruct &v, stringstream &assignText, const  CRefItem& refItem);
48        void AssignDDE(IfElseState ifElse, ARDDEStruct &v, stringstream &assignText, const CRefItem& refItem);
49        void AssignSQL(IfElseState ifElse, ARAssignSQLStruct &v, stringstream &assignText, const CRefItem& refItem);   
50        void AssignFilterApi(IfElseState ifElse, ARAssignFilterApiStruct &v, stringstream &assignText, const CRefItem& refItem);       
51
52private:
53        enum AssignmentMode
54        {
55                AM_SETFIELDS,
56                AM_PUSHFIELD,
57                AM_OPENWINDOW,
58                AM_SERVICE,
59        };
60
61        CARInside *arIn;
62        CARServerObject* object;
63
64        int schemaInsideId1;
65        int schemaInsideId2;
66        int rootLevel;
67        AssignmentMode mode;
68};
Note: See TracBrowser for help on using the repository browser.