diff --git a/wst/trunk/tests/test_suite/test_generators.pas b/wst/trunk/tests/test_suite/test_generators.pas index cff9c048d..2d071a880 100644 --- a/wst/trunk/tests/test_suite/test_generators.pas +++ b/wst/trunk/tests/test_suite/test_generators.pas @@ -118,7 +118,7 @@ begin CreateWstInterfaceSymbolTable(tr); mdl := TPasModule(tr.CreateElement(TPasModule,'class_properties_default',tr.Package,visDefault,'',0)); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TClassSampleType',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okClass; mdl.InterfaceSection.Declarations.Add(cltyp); @@ -188,7 +188,7 @@ begin CreateWstInterfaceSymbolTable(tr); mdl := TPasModule(tr.CreateElement(TPasModule,'urn:wst-test',tr.Package,visDefault,'',0)); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TClassSampleType',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okClass; mdl.InterfaceSection.Declarations.Add(cltyp); @@ -253,7 +253,7 @@ begin CreateWstInterfaceSymbolTable(tr); mdl := TPasModule(tr.CreateElement(TPasModule,'class_extent_native_type',tr.Package,visDefault,'',0)); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TExtendString',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okClass; cltyp.AncestorType := tr.FindElementNS('TComplexStringContentRemotable',sXSD_NS) as TPasType; @@ -323,7 +323,7 @@ begin CreateWstInterfaceSymbolTable(tr); mdl := TPasModule(tr.CreateElement(TPasModule,'class_headerblock_derived',tr.Package,visDefault,'',0)); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TEmptyHeader',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okClass; cltyp.AncestorType := tr.FindElementNS('THeaderBlock',s_xs) as TPasType; @@ -396,7 +396,7 @@ begin CreateWstInterfaceSymbolTable(tr); mdl := TPasModule(tr.CreateElement(TPasModule,'class_headerblock_simplecontent_derived',tr.Package,visDefault,'',0)); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TSampleHeader',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okClass; cltyp.AncestorType := tr.FindElementNS('TSimpleContentHeaderBlock',s_xs) as TPasType; @@ -459,7 +459,7 @@ begin CreateWstInterfaceSymbolTable(tr); mdl := TPasModule(tr.CreateElement(TPasModule,'class_widestring_property',tr.Package,visDefault,'',0)); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TSampleClass',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okClass; mdl.InterfaceSection.Declarations.Add(cltyp); @@ -521,7 +521,7 @@ begin CreateWstInterfaceSymbolTable(tr); mdl := TPasModule(tr.CreateElement(TPasModule,'class_unicodestring_property',tr.Package,visDefault,'',0)); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TSampleClass',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okClass; mdl.InterfaceSection.Declarations.Add(cltyp); @@ -560,7 +560,7 @@ begin mdl := TPasModule(tr.CreateElement(TPasModule,'array_sequence_collection',tr.Package,visDefault,'',0)); tr.RegisterExternalAlias(mdl,'urn:wst-test'); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TComplexType',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okClass; cltyp.AncestorType := tr.FindElementNS('TBaseComplexRemotable',s_xs) as TPasType; @@ -625,7 +625,7 @@ begin mdl := TPasModule(tr.CreateElement(TPasModule,'open_type_module',tr.Package,visDefault,'',0)); tr.RegisterExternalAlias(mdl,'urn:wst-test'); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TComplexType',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okClass; cltyp.AncestorType := tr.FindElementNS('TBaseComplexRemotable',s_xs) as TPasType; @@ -713,7 +713,7 @@ begin mdl := TPasModule(tr.CreateElement(TPasModule,'open_type_module',tr.Package,visDefault,'',0)); tr.RegisterExternalAlias(mdl,'urn:wst-test'); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TComplexType',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okClass; cltyp.AncestorType := tr.FindElementNS('TBaseComplexRemotable',s_xs) as TPasType; @@ -804,7 +804,7 @@ begin mdl := TPasModule(tr.CreateElement(TPasModule,'open_type_module',tr.Package,visDefault,'',0)); tr.RegisterExternalAlias(mdl,'urn:wst-test'); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TComplexType',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okClass; cltyp.AncestorType := tr.FindElementNS('TBaseComplexRemotable',s_xs) as TPasType; @@ -874,7 +874,7 @@ begin mdl := TPasModule(tr.CreateElement(TPasModule,'type_alias_widestring',tr.Package,visDefault,'',0)); tr.RegisterExternalAlias(mdl,'urn:wst-test'); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); aliasType := TPasAliasType(tr.CreateElement(TPasAliasType,'AliasedType',mdl.InterfaceSection,visDefault,'',0)); aliasType.DestType := tr.FindElementNS('WideString',s_xs) as TPasType; aliasType.DestType.AddRef(); @@ -910,7 +910,7 @@ begin mdl := TPasModule(tr.CreateElement(TPasModule,'type_hint_array_item',tr.Package,visDefault,'',0)); tr.RegisterExternalAlias(mdl,'urn:wst-test'); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); aliasType := tr.CreateArray('AliasedType',tr.FindElementNS('WideString',s_xs) as TPasType,'Item','Item',asScoped); mdl.InterfaceSection.Declarations.Add(aliasType); mdl.InterfaceSection.Types.Add(aliasType); @@ -966,7 +966,7 @@ begin CreateWstInterfaceSymbolTable(tr); mdl := TPasModule(tr.CreateElement(TPasModule,'type_hint_record_item',tr.Package,visDefault,'',0)); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasRecordType(tr.CreateElement(TPasRecordType,'TSampleRecord',mdl.InterfaceSection,visDefault,'',0)); mdl.InterfaceSection.Declarations.Add(cltyp); mdl.InterfaceSection.Types.Add(cltyp); @@ -1031,7 +1031,7 @@ begin CreateWstInterfaceSymbolTable(tr); mdl := TPasModule(tr.CreateElement(TPasModule,'class_ansichar_property',tr.Package,visDefault,'',0)); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TSampleClass',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okClass; mdl.InterfaceSection.Declarations.Add(cltyp); @@ -1092,7 +1092,7 @@ begin CreateWstInterfaceSymbolTable(tr); mdl := TPasModule(tr.CreateElement(TPasModule,'class_widechar_property',tr.Package,visDefault,'',0)); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TSampleClass',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okClass; mdl.InterfaceSection.Declarations.Add(cltyp); @@ -1153,7 +1153,7 @@ begin CreateWstInterfaceSymbolTable(tr); mdl := TPasModule(tr.CreateElement(TPasModule,'class_currency_property',tr.Package,visDefault,'',0)); tr.Package.Modules.Add(mdl); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'TSampleClass',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okClass; mdl.InterfaceSection.Declarations.Add(cltyp); @@ -1233,7 +1233,7 @@ begin mdl := TPasModule(tr.CreateElement(TPasModule,'echo_service',tr.Package,visDefault,'',0)); tr.Package.Modules.Add(mdl); tr.RegisterExternalAlias(mdl,'uri:echo-service'); - mdl.InterfaceSection := TPasSection(tr.CreateElement(TPasSection,'',mdl,visDefault,'',0)); + mdl.InterfaceSection := TInterfaceSection(tr.CreateElement(TInterfaceSection,'',mdl,visDefault,'',0)); cltyp := TPasClassType(tr.CreateElement(TPasClassType,'IEchoService',mdl.InterfaceSection,visDefault,'',0)); cltyp.ObjKind := okInterface; cltyp.InterfaceGUID := '{FCD0F68F-3023-46C6-AD09-1DDA4A2989EB}'; diff --git a/wst/trunk/tests/test_suite/testmetadata_unit.pas b/wst/trunk/tests/test_suite/testmetadata_unit.pas index 762600c6c..4b79b4694 100644 --- a/wst/trunk/tests/test_suite/testmetadata_unit.pas +++ b/wst/trunk/tests/test_suite/testmetadata_unit.pas @@ -85,13 +85,13 @@ function TTestMetadata.CreateSymbolTable(): TwstPasTreeContainer; var inft : TPasClassType; - sct : TPasSection; + sct : TInterfaceSection; locProc : TPasProcedure; begin Result := TwstPasTreeContainer.Create(); CreateWstInterfaceSymbolTable(Result); Result.Package.Modules.Add(Result.CreateElement(TPasModule,'test_unit_name',Result.Package,visDefault,'',0)); - sct := TPasSection(Result.CreateElement(TPasSection,'',Result.CurrentModule,visDefault,'',0)); + sct := TInterfaceSection(Result.CreateElement(TInterfaceSection,'',Result.CurrentModule,visDefault,'',0)); Result.CurrentModule.InterfaceSection := sct; inft := TPasClassType(Result.CreateElement(TPasClassType,'service_1',sct,visDefault,'',0)); diff --git a/wst/trunk/ws_helper/pascal_parser_intf.pas b/wst/trunk/ws_helper/pascal_parser_intf.pas index 7472982a7..c994b1ee0 100644 --- a/wst/trunk/ws_helper/pascal_parser_intf.pas +++ b/wst/trunk/ws_helper/pascal_parser_intf.pas @@ -31,6 +31,11 @@ const sARRAY_IS_COLLECTION = 'ARRAY_COLLECTION'; sXSD_NS = 'http://www.w3.org/2001/XMLSchema'; + +{$IF not Declared(TInterfaceSection) } +type + TInterfaceSection = TPasSection; +{$IFEND} type @@ -407,7 +412,7 @@ begin try AContainer.Package.Modules.Add(Result); AContainer.RegisterExternalAlias(Result,sXSD_NS); - Result.InterfaceSection := TPasSection(AContainer.CreateElement(TPasSection,'',Result,visDefault,'',0)); + Result.InterfaceSection := TInterfaceSection(AContainer.CreateElement(TInterfaceSection,'',Result,visDefault,'',0)); AddSystemSymbol(Result,AContainer); AddClassDef(Result,'TBaseRemotable','',TPasNativeClassType); AContainer.RegisterExternalAlias(AddClassDef(Result,'anyType_Type','TBaseRemotable',TPasNativeClassType),'anyType'); diff --git a/wst/trunk/ws_helper/wsdl_parser.pas b/wst/trunk/ws_helper/wsdl_parser.pas index 5567e4e6f..e3daa428a 100644 --- a/wst/trunk/ws_helper/wsdl_parser.pas +++ b/wst/trunk/ws_helper/wsdl_parser.pas @@ -1312,7 +1312,7 @@ begin FModule := TPasModule(SymbolTable.CreateElement(TPasModule,AModuleName,SymbolTable.Package,visDefault,'',0)); SymbolTable.Package.Modules.Add(FModule); SymbolTable.RegisterExternalAlias(FModule,FTargetNameSpace); - FModule.InterfaceSection := TPasSection(SymbolTable.CreateElement(TPasSection,'',FModule,visDefault,'',0)); + FModule.InterfaceSection := TInterfaceSection(SymbolTable.CreateElement(TInterfaceSection,'',FModule,visDefault,'',0)); FPortTypeCursor := nil; diff --git a/wst/trunk/ws_helper/xsd_parser.pas b/wst/trunk/ws_helper/xsd_parser.pas index 7d8ecd9f5..78fdd4ace 100644 --- a/wst/trunk/ws_helper/xsd_parser.pas +++ b/wst/trunk/ws_helper/xsd_parser.pas @@ -734,7 +734,7 @@ begin FModule := TPasModule(SymbolTable.CreateElement(TPasModule,FModuleName,SymbolTable.Package,visDefault,'',0)); SymbolTable.Package.Modules.Add(FModule); SymbolTable.RegisterExternalAlias(FModule,FTargetNameSpace); - FModule.InterfaceSection := TPasSection(SymbolTable.CreateElement(TPasSection,'',FModule,visDefault,'',0)); + FModule.InterfaceSection := TInterfaceSection(SymbolTable.CreateElement(TInterfaceSection,'',FModule,visDefault,'',0)); end; end;