| 2263 |
kivins |
1 |
//## begin module%1.7%.codegen_version preserve=yes
|
|
|
2 |
// Read the documentation to learn more about C++ code generator
|
|
|
3 |
// versioning.
|
|
|
4 |
//## end module%1.7%.codegen_version
|
|
|
5 |
|
|
|
6 |
//## begin module%4212D05100DB.cm preserve=no
|
|
|
7 |
//## end module%4212D05100DB.cm
|
|
|
8 |
|
|
|
9 |
//## begin module%4212D05100DB.cp preserve=no
|
|
|
10 |
// C O P Y R I G H T N O T I C E
|
|
|
11 |
// This material is confidential to ERG and may not be disclosed in whole
|
|
|
12 |
// or in part to any third party nor used in any manner whatsoever other
|
|
|
13 |
// than for the purposes expressly consented to by ERG in writing.
|
|
|
14 |
//
|
|
|
15 |
// This material is also copyright and may not be reproduced, stored in a
|
|
|
16 |
// retrieval system or transmitted in any form or by any means in whole or
|
|
|
17 |
// in part without the express written consent of ERG.
|
|
|
18 |
//## end module%4212D05100DB.cp
|
|
|
19 |
|
|
|
20 |
//## Module: MacQualification%4212D05100DB; Pseudo Package body
|
|
|
21 |
//## Subsystem: MASS::Dev::Tools::TxnTestManager::src%41F5A79001E4
|
|
|
22 |
//## Source file: Z:\MASS_Dev\Tools\TxnTestManager\src\MacQualification.cpp
|
|
|
23 |
|
|
|
24 |
//## begin module%4212D05100DB.additionalIncludes preserve=no
|
|
|
25 |
//## end module%4212D05100DB.additionalIncludes
|
|
|
26 |
|
|
|
27 |
//## begin module%4212D05100DB.includes preserve=yes
|
|
|
28 |
#pragma warn -com
|
|
|
29 |
#include <LoggingMacros.h>
|
|
|
30 |
#pragma warn +com
|
|
|
31 |
//## end module%4212D05100DB.includes
|
|
|
32 |
|
|
|
33 |
// Iteration
|
|
|
34 |
#include "Iteration.h"
|
|
|
35 |
// TestScenario
|
|
|
36 |
#include "TestScenario.h"
|
|
|
37 |
// IXmlSchemaWrapperString
|
|
|
38 |
#include "IXmlSchemaWrapperString.h"
|
|
|
39 |
// IXmlSchemaWrapperElement
|
|
|
40 |
#include "IXmlSchemaWrapperElement.h"
|
|
|
41 |
// IXmlSchemaWrapperFactory
|
|
|
42 |
#include "IXmlSchemaWrapperFactory.h"
|
|
|
43 |
// MacQualification
|
|
|
44 |
#include "MacQualification.h"
|
|
|
45 |
// EvaluationContext
|
|
|
46 |
#include "EvaluationContext.h"
|
|
|
47 |
// TransactionStructure
|
|
|
48 |
#include "TransactionStructure.h"
|
|
|
49 |
// TransactionSpecification
|
|
|
50 |
#include "TransactionSpecification.h"
|
|
|
51 |
//## begin module%4212D05100DB.additionalDeclarations preserve=yes
|
|
|
52 |
#include <sstream>
|
|
|
53 |
//## end module%4212D05100DB.additionalDeclarations
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
// Class MacQualification
|
|
|
57 |
|
|
|
58 |
//## begin MacQualification::datatype%4236A1AE03DB.attr preserve=no private: static AnsiString {VAC} "Struct"
|
|
|
59 |
const AnsiString MacQualification::g_datatype = "Struct";
|
|
|
60 |
//## end MacQualification::datatype%4236A1AE03DB.attr
|
|
|
61 |
|
|
|
62 |
//## begin MacQualification::isInMac%4212F476023C.attr preserve=no private: static AnsiString {VAC} "true"
|
|
|
63 |
const AnsiString MacQualification::g_isInMac = "true";
|
|
|
64 |
//## end MacQualification::isInMac%4212F476023C.attr
|
|
|
65 |
|
|
|
66 |
//## Operation: MacQualification%4212D08F0291
|
|
|
67 |
MacQualification::MacQualification (EvaluationContext& evaluationContext)
|
|
|
68 |
//## begin MacQualification::MacQualification%4212D08F0291.hasinit preserve=no
|
|
|
69 |
: m_inMac(0),
|
|
|
70 |
m_evaluationContext(0),
|
|
|
71 |
m_datatype(0)
|
|
|
72 |
//## end MacQualification::MacQualification%4212D08F0291.hasinit
|
|
|
73 |
//## begin MacQualification::MacQualification%4212D08F0291.initialization preserve=yes
|
|
|
74 |
//## end MacQualification::MacQualification%4212D08F0291.initialization
|
|
|
75 |
{
|
|
|
76 |
//## begin MacQualification::MacQualification%4212D08F0291.body preserve=yes
|
|
|
77 |
|
|
|
78 |
m_evaluationContext = &evaluationContext;
|
|
|
79 |
|
|
|
80 |
m_inMac = &evaluationContext.
|
|
|
81 |
getTransaction().
|
|
|
82 |
getScenario().
|
|
|
83 |
getIteration().
|
|
|
84 |
getSchemaWrapperFactory().
|
|
|
85 |
createString();
|
|
|
86 |
m_datatype = &evaluationContext.
|
|
|
87 |
getTransaction().
|
|
|
88 |
getScenario().
|
|
|
89 |
getIteration().
|
|
|
90 |
getSchemaWrapperFactory().
|
|
|
91 |
createString();
|
|
|
92 |
|
|
|
93 |
//## end MacQualification::MacQualification%4212D08F0291.body
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
|
|
|
97 |
MacQualification::~MacQualification()
|
|
|
98 |
{
|
|
|
99 |
//## begin MacQualification::~MacQualification%4212D05100DB_dest.body preserve=yes
|
|
|
100 |
|
|
|
101 |
if ( m_inMac )
|
|
|
102 |
{
|
|
|
103 |
m_evaluationContext->
|
|
|
104 |
getTransaction().
|
|
|
105 |
getScenario().
|
|
|
106 |
getIteration().
|
|
|
107 |
getSchemaWrapperFactory().
|
|
|
108 |
destroyString( *m_inMac );
|
|
|
109 |
m_inMac = 0;
|
|
|
110 |
}
|
|
|
111 |
|
|
|
112 |
if ( m_datatype )
|
|
|
113 |
{
|
|
|
114 |
m_evaluationContext->
|
|
|
115 |
getTransaction().
|
|
|
116 |
getScenario().
|
|
|
117 |
getIteration().
|
|
|
118 |
getSchemaWrapperFactory().
|
|
|
119 |
destroyString( *m_datatype );
|
|
|
120 |
m_datatype = 0;
|
|
|
121 |
}
|
|
|
122 |
|
|
|
123 |
m_evaluationContext = 0; // We don't own this.
|
|
|
124 |
|
|
|
125 |
//## end MacQualification::~MacQualification%4212D05100DB_dest.body
|
|
|
126 |
}
|
|
|
127 |
|
|
|
128 |
|
|
|
129 |
|
|
|
130 |
//## Other Operations (implementation)
|
|
|
131 |
//## Operation: qualifySerialisation%423688600282
|
|
|
132 |
const bool XSW_STDCALL MacQualification::qualifySerialisation (XMLSchema::IXmlSchemaWrapperElement& element)
|
|
|
133 |
{
|
|
|
134 |
//## begin MacQualification::qualifySerialisation%423688600282.body preserve=yes
|
|
|
135 |
|
|
|
136 |
if ( !element.isField() ||
|
|
|
137 |
( element.getAttributeValue( "inMac", *m_inMac ) &&
|
|
|
138 |
g_isInMac.AnsiCompareIC( m_inMac->c_str() ) == 0 ) ||
|
|
|
139 |
( element.getAttributeValue( "datatype", *m_datatype ) &&
|
|
|
140 |
g_datatype.AnsiCompareIC( m_datatype->c_str() ) == 0 ) )
|
|
|
141 |
{
|
|
|
142 |
MDETAIL( "Qualifying \"" << element.getName() << "\" for serialisation." );
|
|
|
143 |
|
|
|
144 |
return ( true );
|
|
|
145 |
}
|
|
|
146 |
|
|
|
147 |
return ( false );
|
|
|
148 |
|
|
|
149 |
//## end MacQualification::qualifySerialisation%423688600282.body
|
|
|
150 |
}
|
|
|
151 |
|
|
|
152 |
// Additional Declarations
|
|
|
153 |
//## begin MacQualification%4212D05100DB.declarations preserve=yes
|
|
|
154 |
//## end MacQualification%4212D05100DB.declarations
|
|
|
155 |
|
|
|
156 |
//## begin module%4212D05100DB.epilog preserve=yes
|
|
|
157 |
//## end module%4212D05100DB.epilog
|
|
|
158 |
|