Changeset 592


Ignore:
Timestamp:
08/13/14 03:00:05 (5 years ago)
Author:
jls17
Message:
  • the classes CRefItem, CARQualification, CARAssignHelper and the method CARInside::LinkToField? do support passing details via the Context class
Location:
branches/work_311
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • branches/work_311/ARInside.cpp

    r565 r592  
    6060 
    6161#include "util/ResourceFileLocatorAndExtractor.h" 
     62#include "util/Context.h" 
    6263 
    6364///////// 
     
    10261027} 
    10271028 
     1029string CARInside::LinkToField(Context &context, int fieldInsideId) 
     1030{ 
     1031        return LinkToField(context.getCurrentSchemaId(), fieldInsideId, context.getRootLevel()); 
     1032} 
     1033 
    10281034string CARInside::LinkToField(int schemaInsideId, int fieldInsideId, const string& linkText, int fromRootLevel) 
    10291035{        
  • branches/work_311/ARInside.h

    r563 r592  
    5454 
    5555extern const string AppVersion; 
     56class Context; 
    5657 
    5758class CARInside 
     
    118119        string LinkToField(int schemaInsideId, int fieldInsideId, const string& linkText, int fromRootLevel); 
    119120        string LinkToField(int schemaInsideId, int fieldInsideId, int fromRootLevel); 
     121        string CARInside::LinkToField(Context &context, int fieldInsideId); 
    120122        string LinkToMenuField(int schemaInsideId, int fieldInsideId, int fromRootLevel); 
    121123 
  • branches/work_311/core/ARAssignHelper.cpp

    r583 r592  
    2020#include "../doc/DocStatusHistoryField.h" 
    2121#include "../output/URLLink.h" 
     22#include "../util/Context.h" 
    2223 
    2324CARAssignHelper::CARAssignHelper(CARInside& arIn, int rootLevel, const CARServerObject &obj, const CARSchema& schema1, const CARSchema& schema2) 
     
    5152        this->schemaInsideId2 = schema2.GetInsideId(); 
    5253        this->rootLevel = rootLevel; 
     54        this->pushFieldFlag = false; 
     55} 
     56 
     57CARAssignHelper::CARAssignHelper(MappingContext &context) 
     58{ 
     59        this->arIn = &context.getInside(); 
     60        this->object = context.getCurrentObject().Clone(); 
     61        this->schemaInsideId1 = context.getCurrentSchemaId(); 
     62        this->schemaInsideId2 = context.getSecondarySchemaId(); 
     63        this->rootLevel = context.getRootLevel(); 
    5364        this->pushFieldFlag = false; 
    5465} 
  • branches/work_311/core/ARAssignHelper.h

    r368 r592  
    2323using namespace OUTPUT; 
    2424 
     25class MappingContext; 
     26 
    2527class CARAssignHelper 
    2628{ 
     
    2931        CARAssignHelper(CARInside& arIn, int rootLevel, const CARServerObject& obj, int schemaId1, int schemaId2); 
    3032        CARAssignHelper(CARInside& arIn, int rootLevel, const CARServerObject& obj, const string& schemaName1, const string& schemaName2); 
     33        CARAssignHelper(MappingContext &context); 
    3134 
    3235        ~CARAssignHelper(void); 
  • branches/work_311/core/ARQualification.cpp

    r583 r592  
    2020#include "../doc/DocStatusHistoryField.h" 
    2121#include "../output/URLLink.h" 
     22#include "../util/Context.h" 
    2223 
    2324CARQualification::CARQualification(CARInside &arIn, const CRefItem &referenceItem, int currentFormId, int rootLevel) 
     
    3738} 
    3839 
     40CARQualification::CARQualification(Context &context, const CRefItem &referenceItem) 
     41: refItem(referenceItem) 
     42{ 
     43        this->arIn = &context.getInside(); 
     44        this->tmpFormId = 0; 
     45        arsStructItemType = AR_STRUCT_ITEM_XML_NONE; 
     46 
     47        this->primaryFormId = context.getCurrentSchemaId(); 
     48        this->secondaryFormId = context.getCurrentSchemaId(); 
     49 
     50        this->primaryFormDelimiter = '\''; 
     51        this->secondaryFormDelimiter = '\''; 
     52 
     53        this->rootLevel = context.getRootLevel(); 
     54} 
     55 
    3956CARQualification::CARQualification(CARInside &arIn, const CRefItem &referenceItem, int currentFormId, int otherFormId, int rootLevel) 
    4057: refItem(referenceItem) 
     
    5168 
    5269        this->rootLevel = rootLevel; 
     70} 
     71 
     72CARQualification::CARQualification(MappingContext &context, const CRefItem &referenceItem) 
     73: refItem(referenceItem) 
     74{ 
     75        this->arIn = &context.getInside(); 
     76        this->tmpFormId = 0; 
     77        arsStructItemType = AR_STRUCT_ITEM_XML_NONE; 
     78 
     79        this->primaryFormId = context.getCurrentSchemaId(); 
     80        this->secondaryFormId = context.getSecondarySchemaId(); 
     81 
     82        this->primaryFormDelimiter = '$'; 
     83        this->secondaryFormDelimiter = '\''; 
     84 
     85        this->rootLevel = context.getRootLevel(); 
    5386} 
    5487 
  • branches/work_311/core/ARQualification.h

    r559 r592  
    1818#include "../ARInside.h" 
    1919 
     20class Context; 
     21class MappingContext; 
     22 
    2023class CARQualification 
    2124{ 
     
    2326        // use this constructor in case only one form is involved (e.g. run if) 
    2427        CARQualification(CARInside &arIn, const CRefItem &referenceItem, int currentFormId, int rootLevel); 
     28        CARQualification(Context &context, const CRefItem &referenceItem); 
     29 
    2530        // use this constructor in case two forms are involved (e.g. setfield-if, pushfield-if) 
    2631        CARQualification(CARInside &arIn, const CRefItem &referenceItem, int currentFormId, int otherFormId, int rootLevel); 
     32        CARQualification(MappingContext &context, const CRefItem &referenceItem); 
    2733 
    2834        ~CARQualification(void); 
  • branches/work_311/util/RefItem.cpp

    r579 r592  
    1818 
    1919#include "RefItem.h" 
     20#include "Context.h" 
    2021#include "../ARInside.h" 
    2122#include "../core/ARServerObject.h" 
     
    6869} 
    6970 
     71CRefItem::CRefItem(Context &context, int dMessage) 
     72{ 
     73        Init(context.getCurrentObject(), context.getIfElse(), context.getActionIndex(), dMessage); 
     74} 
     75 
    7076CRefItem::CRefItem(const CARServerObject &obj, int IfOrElse, int nAction, int OpenOrClose, int dMessage) 
    7177{ 
  • branches/work_311/util/RefItem.h

    r480 r592  
    6666// forward declaration 
    6767class CARServerObject; 
     68class Context; 
    6869 
    6970// Reference Types //////////////////////////////////////////////////////////// 
     
    221222        CRefItem(const CARServerObject& obj, int dMessage); 
    222223        CRefItem(const CARServerObject& obj, int IfOrElse, int nAction, int dMessage); 
     224        CRefItem(Context &context, int dMessage); 
    223225        CRefItem(const CRefItem& copyFrom, int dMessage); // to copy the referenced object, but change the message at the same time 
    224226        // the following constructor is for openwindow-action references 
Note: See TracChangeset for help on using the changeset viewer.