You've already forked lazarus-ccr
ws_helper : Better attribute parsing in nested types
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@145 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1569,146 +1569,147 @@ Var
|
|||||||
typRegItem : TTypeRegistryItem;
|
typRegItem : TTypeRegistryItem;
|
||||||
begin
|
begin
|
||||||
oldSS := AStore.GetSerializationStyle();
|
oldSS := AStore.GetSerializationStyle();
|
||||||
AStore.BeginObjectRead(AName,ATypeInfo);
|
if ( AStore.BeginObjectRead(AName,ATypeInfo) >= 0 ) then begin
|
||||||
try
|
try
|
||||||
if AStore.IsCurrentScopeNil() then
|
if AStore.IsCurrentScopeNil() then
|
||||||
Exit; // ???? FreeAndNil(AObject);
|
Exit; // ???? FreeAndNil(AObject);
|
||||||
If Not Assigned(AObject) Then
|
If Not Assigned(AObject) Then
|
||||||
AObject := Create();
|
AObject := Create();
|
||||||
objTypeData := GetTypeData(ATypeInfo);
|
objTypeData := GetTypeData(ATypeInfo);
|
||||||
propCount := objTypeData^.PropCount;
|
propCount := objTypeData^.PropCount;
|
||||||
If ( propCount > 0 ) Then Begin
|
If ( propCount > 0 ) Then Begin
|
||||||
propListLen := GetPropList(ATypeInfo,propList);
|
propListLen := GetPropList(ATypeInfo,propList);
|
||||||
Try
|
Try
|
||||||
typRegItem := GetTypeRegistry().ItemByTypeInfo[ATypeInfo];
|
typRegItem := GetTypeRegistry().ItemByTypeInfo[ATypeInfo];
|
||||||
For i := 0 To Pred(propCount) Do Begin
|
For i := 0 To Pred(propCount) Do Begin
|
||||||
p := propList^[i];
|
p := propList^[i];
|
||||||
persistType := IsStoredPropClass(objTypeData^.ClassType,p);
|
persistType := IsStoredPropClass(objTypeData^.ClassType,p);
|
||||||
If ( persistType in [pstOptional,pstAlways] ) Then Begin
|
If ( persistType in [pstOptional,pstAlways] ) Then Begin
|
||||||
pt := p^.PropType;
|
pt := p^.PropType;
|
||||||
propName := typRegItem.GetExternalPropertyName(p^.Name);
|
propName := typRegItem.GetExternalPropertyName(p^.Name);
|
||||||
if IsAttributeProperty(p^.Name) then begin
|
if IsAttributeProperty(p^.Name) then begin
|
||||||
ss := ssAttibuteSerialization;
|
ss := ssAttibuteSerialization;
|
||||||
end else begin
|
end else begin
|
||||||
ss := ssNodeSerialization;
|
ss := ssNodeSerialization;
|
||||||
end;
|
|
||||||
if ( ss <> AStore.GetSerializationStyle() ) then
|
|
||||||
AStore.SetSerializationStyle(ss);
|
|
||||||
try
|
|
||||||
Case pt^.Kind Of
|
|
||||||
tkInt64,tkQWord :
|
|
||||||
Begin
|
|
||||||
AStore.Get(pt,propName,int64Data);
|
|
||||||
SetOrdProp(AObject,p^.Name,int64Data);
|
|
||||||
End;
|
|
||||||
tkLString, tkAString :
|
|
||||||
Begin
|
|
||||||
AStore.Get(pt,propName,strData);
|
|
||||||
SetStrProp(AObject,p^.Name,strData);
|
|
||||||
End;
|
|
||||||
tkBool :
|
|
||||||
Begin
|
|
||||||
AStore.Get(pt,propName,boolData);
|
|
||||||
SetOrdProp(AObject,p^.Name,Ord(boolData));
|
|
||||||
End;
|
|
||||||
tkClass :
|
|
||||||
Begin
|
|
||||||
objData := GetObjectProp(AObject,p^.Name);
|
|
||||||
objDataCreateHere := not Assigned(objData);
|
|
||||||
try
|
|
||||||
AStore.Get(pt,propName,objData);
|
|
||||||
if objDataCreateHere then
|
|
||||||
SetObjectProp(AObject,p^.Name,objData);
|
|
||||||
finally
|
|
||||||
if objDataCreateHere then
|
|
||||||
FreeAndNil(objData);
|
|
||||||
end;
|
|
||||||
End;
|
|
||||||
tkEnumeration,tkInteger :
|
|
||||||
Begin
|
|
||||||
FillChar(enumData,SizeOf(enumData),#0);
|
|
||||||
Case GetTypeData(p^.PropType)^.OrdType Of
|
|
||||||
otSByte :
|
|
||||||
Begin
|
|
||||||
AStore.Get(pt,propName,enumData.ShortIntData);
|
|
||||||
int64Data := enumData.ShortIntData;
|
|
||||||
End;
|
|
||||||
otUByte :
|
|
||||||
Begin
|
|
||||||
AStore.Get(pt,propName,enumData.ByteData);
|
|
||||||
int64Data := enumData.ByteData;
|
|
||||||
End;
|
|
||||||
otSWord :
|
|
||||||
Begin
|
|
||||||
AStore.Get(pt,propName,enumData.SmallIntData);
|
|
||||||
int64Data := enumData.SmallIntData;
|
|
||||||
End;
|
|
||||||
otUWord :
|
|
||||||
Begin
|
|
||||||
AStore.Get(pt,propName,enumData.WordData);
|
|
||||||
int64Data := enumData.WordData;
|
|
||||||
End;
|
|
||||||
otSLong:
|
|
||||||
Begin
|
|
||||||
AStore.Get(pt,propName,enumData.SLongIntData);
|
|
||||||
int64Data := enumData.SLongIntData;
|
|
||||||
End;
|
|
||||||
otULong :
|
|
||||||
Begin
|
|
||||||
AStore.Get(pt,propName,enumData.ULongIntData);
|
|
||||||
int64Data := enumData.ULongIntData;
|
|
||||||
End;
|
|
||||||
End;
|
|
||||||
SetOrdProp(AObject,p^.Name,int64Data);
|
|
||||||
End;
|
|
||||||
tkFloat :
|
|
||||||
Begin
|
|
||||||
FillChar(floatDt,SizeOf(floatBuffer),#0);
|
|
||||||
Case GetTypeData(p^.PropType)^.FloatType Of
|
|
||||||
ftSingle :
|
|
||||||
Begin
|
|
||||||
AStore.Get(pt,propName,floatBuffer.SingleData);
|
|
||||||
floatDt := floatBuffer.SingleData;
|
|
||||||
End;
|
|
||||||
ftDouble :
|
|
||||||
Begin
|
|
||||||
AStore.Get(pt,propName,floatBuffer.DoubleData);
|
|
||||||
floatDt := floatBuffer.DoubleData;
|
|
||||||
End;
|
|
||||||
ftExtended :
|
|
||||||
Begin
|
|
||||||
AStore.Get(pt,propName,floatBuffer.ExtendedData);
|
|
||||||
floatDt := floatBuffer.ExtendedData;
|
|
||||||
End;
|
|
||||||
ftCurr :
|
|
||||||
Begin
|
|
||||||
AStore.Get(pt,propName,floatBuffer.CurrencyData);
|
|
||||||
floatDt := floatBuffer.CurrencyData;
|
|
||||||
End;
|
|
||||||
ftComp :
|
|
||||||
Begin
|
|
||||||
AStore.Get(pt,propName,floatBuffer.CompData);
|
|
||||||
floatDt := floatBuffer.CompData;
|
|
||||||
End;
|
|
||||||
End;
|
|
||||||
SetFloatProp(AObject,p^.Name,floatDt);
|
|
||||||
End;
|
|
||||||
End;
|
|
||||||
except
|
|
||||||
on E : EServiceException do begin
|
|
||||||
if ( persistType = pstAlways ) then
|
|
||||||
raise;
|
|
||||||
end;
|
end;
|
||||||
end;
|
if ( ss <> AStore.GetSerializationStyle() ) then
|
||||||
|
AStore.SetSerializationStyle(ss);
|
||||||
|
try
|
||||||
|
Case pt^.Kind Of
|
||||||
|
tkInt64,tkQWord :
|
||||||
|
Begin
|
||||||
|
AStore.Get(pt,propName,int64Data);
|
||||||
|
SetOrdProp(AObject,p^.Name,int64Data);
|
||||||
|
End;
|
||||||
|
tkLString, tkAString :
|
||||||
|
Begin
|
||||||
|
AStore.Get(pt,propName,strData);
|
||||||
|
SetStrProp(AObject,p^.Name,strData);
|
||||||
|
End;
|
||||||
|
tkBool :
|
||||||
|
Begin
|
||||||
|
AStore.Get(pt,propName,boolData);
|
||||||
|
SetOrdProp(AObject,p^.Name,Ord(boolData));
|
||||||
|
End;
|
||||||
|
tkClass :
|
||||||
|
Begin
|
||||||
|
objData := GetObjectProp(AObject,p^.Name);
|
||||||
|
objDataCreateHere := not Assigned(objData);
|
||||||
|
try
|
||||||
|
AStore.Get(pt,propName,objData);
|
||||||
|
if objDataCreateHere then
|
||||||
|
SetObjectProp(AObject,p^.Name,objData);
|
||||||
|
finally
|
||||||
|
if objDataCreateHere and ( objData <> GetObjectProp(AObject,p^.Name) ) then
|
||||||
|
FreeAndNil(objData);
|
||||||
|
end;
|
||||||
|
End;
|
||||||
|
tkEnumeration,tkInteger :
|
||||||
|
Begin
|
||||||
|
FillChar(enumData,SizeOf(enumData),#0);
|
||||||
|
Case GetTypeData(p^.PropType)^.OrdType Of
|
||||||
|
otSByte :
|
||||||
|
Begin
|
||||||
|
AStore.Get(pt,propName,enumData.ShortIntData);
|
||||||
|
int64Data := enumData.ShortIntData;
|
||||||
|
End;
|
||||||
|
otUByte :
|
||||||
|
Begin
|
||||||
|
AStore.Get(pt,propName,enumData.ByteData);
|
||||||
|
int64Data := enumData.ByteData;
|
||||||
|
End;
|
||||||
|
otSWord :
|
||||||
|
Begin
|
||||||
|
AStore.Get(pt,propName,enumData.SmallIntData);
|
||||||
|
int64Data := enumData.SmallIntData;
|
||||||
|
End;
|
||||||
|
otUWord :
|
||||||
|
Begin
|
||||||
|
AStore.Get(pt,propName,enumData.WordData);
|
||||||
|
int64Data := enumData.WordData;
|
||||||
|
End;
|
||||||
|
otSLong:
|
||||||
|
Begin
|
||||||
|
AStore.Get(pt,propName,enumData.SLongIntData);
|
||||||
|
int64Data := enumData.SLongIntData;
|
||||||
|
End;
|
||||||
|
otULong :
|
||||||
|
Begin
|
||||||
|
AStore.Get(pt,propName,enumData.ULongIntData);
|
||||||
|
int64Data := enumData.ULongIntData;
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
SetOrdProp(AObject,p^.Name,int64Data);
|
||||||
|
End;
|
||||||
|
tkFloat :
|
||||||
|
Begin
|
||||||
|
FillChar(floatDt,SizeOf(floatBuffer),#0);
|
||||||
|
Case GetTypeData(p^.PropType)^.FloatType Of
|
||||||
|
ftSingle :
|
||||||
|
Begin
|
||||||
|
AStore.Get(pt,propName,floatBuffer.SingleData);
|
||||||
|
floatDt := floatBuffer.SingleData;
|
||||||
|
End;
|
||||||
|
ftDouble :
|
||||||
|
Begin
|
||||||
|
AStore.Get(pt,propName,floatBuffer.DoubleData);
|
||||||
|
floatDt := floatBuffer.DoubleData;
|
||||||
|
End;
|
||||||
|
ftExtended :
|
||||||
|
Begin
|
||||||
|
AStore.Get(pt,propName,floatBuffer.ExtendedData);
|
||||||
|
floatDt := floatBuffer.ExtendedData;
|
||||||
|
End;
|
||||||
|
ftCurr :
|
||||||
|
Begin
|
||||||
|
AStore.Get(pt,propName,floatBuffer.CurrencyData);
|
||||||
|
floatDt := floatBuffer.CurrencyData;
|
||||||
|
End;
|
||||||
|
ftComp :
|
||||||
|
Begin
|
||||||
|
AStore.Get(pt,propName,floatBuffer.CompData);
|
||||||
|
floatDt := floatBuffer.CompData;
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
SetFloatProp(AObject,p^.Name,floatDt);
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
except
|
||||||
|
on E : EServiceException do begin
|
||||||
|
if ( persistType = pstAlways ) then
|
||||||
|
raise;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
End;
|
||||||
End;
|
End;
|
||||||
|
Finally
|
||||||
|
Freemem(propList,propListLen*SizeOf(Pointer));
|
||||||
End;
|
End;
|
||||||
Finally
|
|
||||||
Freemem(propList,propListLen*SizeOf(Pointer));
|
|
||||||
End;
|
End;
|
||||||
End;
|
finally
|
||||||
finally
|
AStore.EndScopeRead();
|
||||||
AStore.EndScopeRead();
|
AStore.SetSerializationStyle(oldSS);
|
||||||
AStore.SetSerializationStyle(oldSS);
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1786,22 +1787,24 @@ begin
|
|||||||
itmName := AName;
|
itmName := AName;
|
||||||
end;
|
end;
|
||||||
len := AStore.BeginArrayRead(AName,ATypeInfo, GetStyle(),itmName);
|
len := AStore.BeginArrayRead(AName,ATypeInfo, GetStyle(),itmName);
|
||||||
Try
|
if ( len > 0 ) then begin
|
||||||
If Not Assigned(AObject) Then
|
Try
|
||||||
AObject := Create();
|
If Not Assigned(AObject) Then
|
||||||
itmTypInfo := PTypeInfo(GetItemClass().ClassInfo);
|
AObject := Create();
|
||||||
nativObj := AObject as TBaseObjectArrayRemotable;
|
itmTypInfo := PTypeInfo(GetItemClass().ClassInfo);
|
||||||
If ( len > 0 ) Then Begin
|
nativObj := AObject as TBaseObjectArrayRemotable;
|
||||||
s := '';
|
If ( len > 0 ) Then Begin
|
||||||
nativObj.SetLength(len);
|
s := '';
|
||||||
For i := 0 To Pred(len) Do Begin
|
nativObj.SetLength(len);
|
||||||
itm := nativObj[i];
|
For i := 0 To Pred(len) Do Begin
|
||||||
AStore.Get(itmTypInfo,s,itm);
|
itm := nativObj[i];
|
||||||
|
AStore.Get(itmTypInfo,s,itm);
|
||||||
|
End;
|
||||||
End;
|
End;
|
||||||
|
Finally
|
||||||
|
AStore.EndScopeRead();
|
||||||
End;
|
End;
|
||||||
Finally
|
end;
|
||||||
AStore.EndScopeRead();
|
|
||||||
End;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TBaseObjectArrayRemotable.GetItemTypeInfo(): PTypeInfo;
|
class function TBaseObjectArrayRemotable.GetItemTypeInfo(): PTypeInfo;
|
||||||
@ -3561,7 +3564,7 @@ begin
|
|||||||
AStore.PutScopeInnerValue(TypeInfo(LongInt),(AObject as TComplexInt32SContentRemotable).Value);
|
AStore.PutScopeInnerValue(TypeInfo(LongInt),(AObject as TComplexInt32SContentRemotable).Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComplexInt32SContentRemotable.LoadValue(
|
class procedure TComplexInt32SContentRemotable.LoadValue(
|
||||||
var AObject : TObject;
|
var AObject : TObject;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3575,7 +3578,7 @@ end;
|
|||||||
|
|
||||||
{ TComplexInt32UContentRemotable }
|
{ TComplexInt32UContentRemotable }
|
||||||
|
|
||||||
procedure TComplexInt32UContentRemotable.SaveValue(
|
class procedure TComplexInt32UContentRemotable.SaveValue(
|
||||||
AObject : TBaseRemotable;
|
AObject : TBaseRemotable;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3583,7 +3586,7 @@ begin
|
|||||||
AStore.PutScopeInnerValue(TypeInfo(LongWord),(AObject as TComplexInt32UContentRemotable).Value);
|
AStore.PutScopeInnerValue(TypeInfo(LongWord),(AObject as TComplexInt32UContentRemotable).Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComplexInt32UContentRemotable.LoadValue(
|
class procedure TComplexInt32UContentRemotable.LoadValue(
|
||||||
var AObject : TObject;
|
var AObject : TObject;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3597,7 +3600,7 @@ end;
|
|||||||
|
|
||||||
{ TComplexInt16SContentRemotable }
|
{ TComplexInt16SContentRemotable }
|
||||||
|
|
||||||
procedure TComplexInt16SContentRemotable.SaveValue(
|
class procedure TComplexInt16SContentRemotable.SaveValue(
|
||||||
AObject : TBaseRemotable;
|
AObject : TBaseRemotable;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3605,7 +3608,7 @@ begin
|
|||||||
AStore.PutScopeInnerValue(TypeInfo(SmallInt),(AObject as TComplexInt16SContentRemotable).Value);
|
AStore.PutScopeInnerValue(TypeInfo(SmallInt),(AObject as TComplexInt16SContentRemotable).Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComplexInt16SContentRemotable.LoadValue(
|
class procedure TComplexInt16SContentRemotable.LoadValue(
|
||||||
var AObject : TObject;
|
var AObject : TObject;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3619,7 +3622,7 @@ end;
|
|||||||
|
|
||||||
{ TComplexInt16UContentRemotable }
|
{ TComplexInt16UContentRemotable }
|
||||||
|
|
||||||
procedure TComplexInt16UContentRemotable.SaveValue(
|
class procedure TComplexInt16UContentRemotable.SaveValue(
|
||||||
AObject : TBaseRemotable;
|
AObject : TBaseRemotable;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3627,7 +3630,7 @@ begin
|
|||||||
AStore.PutScopeInnerValue(TypeInfo(Word),(AObject as TComplexInt16UContentRemotable).Value);
|
AStore.PutScopeInnerValue(TypeInfo(Word),(AObject as TComplexInt16UContentRemotable).Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComplexInt16UContentRemotable.LoadValue(
|
class procedure TComplexInt16UContentRemotable.LoadValue(
|
||||||
var AObject : TObject;
|
var AObject : TObject;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3641,7 +3644,7 @@ end;
|
|||||||
|
|
||||||
{ TComplexFloatExtendedContentRemotable }
|
{ TComplexFloatExtendedContentRemotable }
|
||||||
|
|
||||||
procedure TComplexFloatExtendedContentRemotable.SaveValue(
|
class procedure TComplexFloatExtendedContentRemotable.SaveValue(
|
||||||
AObject : TBaseRemotable;
|
AObject : TBaseRemotable;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3649,7 +3652,7 @@ begin
|
|||||||
AStore.PutScopeInnerValue(TypeInfo(Extended),(AObject as TComplexFloatExtendedContentRemotable).Value);
|
AStore.PutScopeInnerValue(TypeInfo(Extended),(AObject as TComplexFloatExtendedContentRemotable).Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComplexFloatExtendedContentRemotable.LoadValue(
|
class procedure TComplexFloatExtendedContentRemotable.LoadValue(
|
||||||
var AObject : TObject;
|
var AObject : TObject;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3663,7 +3666,7 @@ end;
|
|||||||
|
|
||||||
{ TComplexFloatDoubleContentRemotable }
|
{ TComplexFloatDoubleContentRemotable }
|
||||||
|
|
||||||
procedure TComplexFloatDoubleContentRemotable.SaveValue(
|
class procedure TComplexFloatDoubleContentRemotable.SaveValue(
|
||||||
AObject : TBaseRemotable;
|
AObject : TBaseRemotable;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3671,7 +3674,7 @@ begin
|
|||||||
AStore.PutScopeInnerValue(TypeInfo(Double),(AObject as TComplexFloatDoubleContentRemotable).Value);
|
AStore.PutScopeInnerValue(TypeInfo(Double),(AObject as TComplexFloatDoubleContentRemotable).Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComplexFloatDoubleContentRemotable.LoadValue(
|
class procedure TComplexFloatDoubleContentRemotable.LoadValue(
|
||||||
var AObject : TObject;
|
var AObject : TObject;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3794,9 +3797,8 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
s: string;
|
|
||||||
d, m, y : Word;
|
d, m, y : Word;
|
||||||
hh, mn, ss, ssss : Word;
|
hh, mn, ss : Word;
|
||||||
begin
|
begin
|
||||||
//'-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?
|
//'-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?
|
||||||
|
|
||||||
@ -3837,7 +3839,7 @@ begin
|
|||||||
FDay := d;
|
FDay := d;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBaseDateRemotable.Save(
|
class procedure TBaseDateRemotable.Save(
|
||||||
AObject : TBaseRemotable;
|
AObject : TBaseRemotable;
|
||||||
AStore : IFormatterBase;
|
AStore : IFormatterBase;
|
||||||
const AName : string;
|
const AName : string;
|
||||||
@ -3855,7 +3857,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBaseDateRemotable.Load(
|
class procedure TBaseDateRemotable.Load(
|
||||||
var AObject : TObject;
|
var AObject : TObject;
|
||||||
AStore : IFormatterBase;
|
AStore : IFormatterBase;
|
||||||
var AName : string;
|
var AName : string;
|
||||||
@ -3885,7 +3887,7 @@ end;
|
|||||||
|
|
||||||
{ TComplexInt8SContentRemotable }
|
{ TComplexInt8SContentRemotable }
|
||||||
|
|
||||||
procedure TComplexInt8SContentRemotable.SaveValue(
|
class procedure TComplexInt8SContentRemotable.SaveValue(
|
||||||
AObject : TBaseRemotable;
|
AObject : TBaseRemotable;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3893,7 +3895,7 @@ begin
|
|||||||
AStore.PutScopeInnerValue(TypeInfo(ShortInt),(AObject as TComplexInt8SContentRemotable).Value);
|
AStore.PutScopeInnerValue(TypeInfo(ShortInt),(AObject as TComplexInt8SContentRemotable).Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComplexInt8SContentRemotable.LoadValue(
|
class procedure TComplexInt8SContentRemotable.LoadValue(
|
||||||
var AObject : TObject;
|
var AObject : TObject;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3907,7 +3909,7 @@ end;
|
|||||||
|
|
||||||
{ TComplexInt8UContentRemotable }
|
{ TComplexInt8UContentRemotable }
|
||||||
|
|
||||||
procedure TComplexInt8UContentRemotable.SaveValue(
|
class procedure TComplexInt8UContentRemotable.SaveValue(
|
||||||
AObject : TBaseRemotable;
|
AObject : TBaseRemotable;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3915,7 +3917,7 @@ begin
|
|||||||
AStore.PutScopeInnerValue(TypeInfo(Byte),(AObject as TComplexInt8UContentRemotable).Value);
|
AStore.PutScopeInnerValue(TypeInfo(Byte),(AObject as TComplexInt8UContentRemotable).Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComplexInt8UContentRemotable.LoadValue(
|
class procedure TComplexInt8UContentRemotable.LoadValue(
|
||||||
var AObject : TObject;
|
var AObject : TObject;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3929,7 +3931,7 @@ end;
|
|||||||
|
|
||||||
{ TComplexFloatSingleContentRemotable }
|
{ TComplexFloatSingleContentRemotable }
|
||||||
|
|
||||||
procedure TComplexFloatSingleContentRemotable.SaveValue(
|
class procedure TComplexFloatSingleContentRemotable.SaveValue(
|
||||||
AObject : TBaseRemotable;
|
AObject : TBaseRemotable;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3937,7 +3939,7 @@ begin
|
|||||||
AStore.PutScopeInnerValue(TypeInfo(Single),(AObject as TComplexFloatSingleContentRemotable).Value);
|
AStore.PutScopeInnerValue(TypeInfo(Single),(AObject as TComplexFloatSingleContentRemotable).Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComplexFloatSingleContentRemotable.LoadValue(
|
class procedure TComplexFloatSingleContentRemotable.LoadValue(
|
||||||
var AObject : TObject;
|
var AObject : TObject;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3951,7 +3953,7 @@ end;
|
|||||||
|
|
||||||
{ TComplexInt64SContentRemotable }
|
{ TComplexInt64SContentRemotable }
|
||||||
|
|
||||||
procedure TComplexInt64SContentRemotable.SaveValue(
|
class procedure TComplexInt64SContentRemotable.SaveValue(
|
||||||
AObject : TBaseRemotable;
|
AObject : TBaseRemotable;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3959,7 +3961,7 @@ begin
|
|||||||
AStore.PutScopeInnerValue(TypeInfo(Int64),(AObject as TComplexInt64SContentRemotable).Value);
|
AStore.PutScopeInnerValue(TypeInfo(Int64),(AObject as TComplexInt64SContentRemotable).Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComplexInt64SContentRemotable.LoadValue(
|
class procedure TComplexInt64SContentRemotable.LoadValue(
|
||||||
var AObject : TObject;
|
var AObject : TObject;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3973,7 +3975,7 @@ end;
|
|||||||
|
|
||||||
{ TComplexInt64UContentRemotable }
|
{ TComplexInt64UContentRemotable }
|
||||||
|
|
||||||
procedure TComplexInt64UContentRemotable.SaveValue(
|
class procedure TComplexInt64UContentRemotable.SaveValue(
|
||||||
AObject : TBaseRemotable;
|
AObject : TBaseRemotable;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3981,7 +3983,7 @@ begin
|
|||||||
AStore.PutScopeInnerValue(TypeInfo(QWord),(AObject as TComplexInt64UContentRemotable).Value);
|
AStore.PutScopeInnerValue(TypeInfo(QWord),(AObject as TComplexInt64UContentRemotable).Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComplexInt64UContentRemotable.LoadValue(
|
class procedure TComplexInt64UContentRemotable.LoadValue(
|
||||||
var AObject : TObject;
|
var AObject : TObject;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -3995,7 +3997,7 @@ end;
|
|||||||
|
|
||||||
{ TComplexBooleanContentRemotable }
|
{ TComplexBooleanContentRemotable }
|
||||||
|
|
||||||
procedure TComplexBooleanContentRemotable.SaveValue(
|
class procedure TComplexBooleanContentRemotable.SaveValue(
|
||||||
AObject : TBaseRemotable;
|
AObject : TBaseRemotable;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
@ -4003,7 +4005,7 @@ begin
|
|||||||
AStore.PutScopeInnerValue(TypeInfo(Boolean),(AObject as TComplexBooleanContentRemotable).Value);
|
AStore.PutScopeInnerValue(TypeInfo(Boolean),(AObject as TComplexBooleanContentRemotable).Value);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TComplexBooleanContentRemotable.LoadValue(
|
class procedure TComplexBooleanContentRemotable.LoadValue(
|
||||||
var AObject : TObject;
|
var AObject : TObject;
|
||||||
AStore : IFormatterBase
|
AStore : IFormatterBase
|
||||||
);
|
);
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
unit base_soap_formatter;
|
unit base_soap_formatter;
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
{$IF (FPC_VERSION = 2) and (FPC_RELEASE > 0)}
|
||||||
|
{$define FPC_211}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
@ -53,6 +56,7 @@ Type
|
|||||||
|
|
||||||
TStackItem = class
|
TStackItem = class
|
||||||
private
|
private
|
||||||
|
FEmbeddedScopeCount: Integer;
|
||||||
FNameSpace: string;
|
FNameSpace: string;
|
||||||
FScopeObject: TDOMNode;
|
FScopeObject: TDOMNode;
|
||||||
FScopeType: TScopeType;
|
FScopeType: TScopeType;
|
||||||
@ -66,6 +70,10 @@ Type
|
|||||||
property ScopeType : TScopeType Read FScopeType;
|
property ScopeType : TScopeType Read FScopeType;
|
||||||
property NameSpace : string Read FNameSpace;
|
property NameSpace : string Read FNameSpace;
|
||||||
property ItemsCount : Integer read GetItemsCount;
|
property ItemsCount : Integer read GetItemsCount;
|
||||||
|
|
||||||
|
property EmbeddedScopeCount : Integer read FEmbeddedScopeCount;
|
||||||
|
function BeginEmbeddedScope() : Integer;
|
||||||
|
function EndEmbeddedScope() : Integer;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
{ TObjectStackItem }
|
{ TObjectStackItem }
|
||||||
@ -110,7 +118,7 @@ Type
|
|||||||
function CreateList(const ANodeName : string):TDOMNodeList;override;
|
function CreateList(const ANodeName : string):TDOMNodeList;override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TSOAPEncodingStyle = ( Encoded, Litteral );
|
TSOAPEncodingStyle = ( Encoded, Literal );
|
||||||
TSOAPDocumentStyle = ( RPC, Document );
|
TSOAPDocumentStyle = ( RPC, Document );
|
||||||
|
|
||||||
{$M+}
|
{$M+}
|
||||||
@ -369,6 +377,21 @@ begin
|
|||||||
FNameSpace := ANameSpace;
|
FNameSpace := ANameSpace;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TStackItem.BeginEmbeddedScope(): Integer;
|
||||||
|
begin
|
||||||
|
Inc(FEmbeddedScopeCount);
|
||||||
|
Result := FEmbeddedScopeCount;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TStackItem.EndEmbeddedScope(): Integer;
|
||||||
|
begin
|
||||||
|
if ( FEmbeddedScopeCount < 1 ) then begin
|
||||||
|
raise Exception.Create('Invalid op�ration on scope, their are no embedded scope.');
|
||||||
|
end;
|
||||||
|
Dec(FEmbeddedScopeCount);
|
||||||
|
Result := FEmbeddedScopeCount;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TObjectStackItem }
|
{ TObjectStackItem }
|
||||||
|
|
||||||
function TObjectStackItem.FindNode(var ANodeName: string): TDOMNode;
|
function TObjectStackItem.FindNode(var ANodeName: string): TDOMNode;
|
||||||
@ -481,7 +504,7 @@ begin
|
|||||||
Inc(FHeaderEnterCount);
|
Inc(FHeaderEnterCount);
|
||||||
Prepare();
|
Prepare();
|
||||||
BeginScope(sHEADER,sSOAP_ENV,sSOAP_ENV_ABR,stObject,asNone);
|
BeginScope(sHEADER,sSOAP_ENV,sSOAP_ENV_ABR,stObject,asNone);
|
||||||
SetStyleAndEncoding(Document,Litteral);
|
SetStyleAndEncoding(Document,Literal);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -771,7 +794,6 @@ begin
|
|||||||
end else begin
|
end else begin
|
||||||
Error('Param or Attribute not found : "%s"',[AName]);
|
Error('Param or Attribute not found : "%s"',[AName]);
|
||||||
end;
|
end;
|
||||||
//WriteLn(StringOfChar(' ',FStack.Count), AName,' = ',Result);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSOAPBaseFormatter.GetEnum(
|
procedure TSOAPBaseFormatter.GetEnum(
|
||||||
@ -994,9 +1016,9 @@ begin
|
|||||||
strNodeName := AName;
|
strNodeName := AName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if ( AStyle = asScoped ) then begin
|
//if ( AStyle = asScoped ) then begin
|
||||||
BeginScope(strNodeName,'','',stArray,AStyle);
|
BeginScope(strNodeName,'','',stArray,AStyle);
|
||||||
end;
|
//end;
|
||||||
|
|
||||||
if ( EncodingStyle = Encoded ) then begin
|
if ( EncodingStyle = Encoded ) then begin
|
||||||
//AddScopeAttribute(sXSI_TYPE,nmspc);
|
//AddScopeAttribute(sXSI_TYPE,nmspc);
|
||||||
@ -1060,35 +1082,41 @@ Var
|
|||||||
e : TDOMElement;
|
e : TDOMElement;
|
||||||
hasNmspc, addAtt : Boolean;
|
hasNmspc, addAtt : Boolean;
|
||||||
begin
|
begin
|
||||||
scpStr := AScopeName;
|
if ( AScopeType = stObject ) or
|
||||||
hasNmspc := Not IsStrEmpty(ANameSpace);
|
( ( AScopeType = stArray ) and ( AStyle = asScoped ) )
|
||||||
If hasNmspc Then Begin
|
then begin
|
||||||
nsStr := FindAttributeByValueInScope(ANameSpace);
|
scpStr := AScopeName;
|
||||||
addAtt := IsStrEmpty(nsStr);
|
hasNmspc := Not IsStrEmpty(ANameSpace);
|
||||||
If addAtt Then Begin
|
If hasNmspc Then Begin
|
||||||
If IsStrEmpty(ANameSpaceShortName) Then
|
nsStr := FindAttributeByValueInScope(ANameSpace);
|
||||||
nsStr := 'ns' + IntToStr(NextNameSpaceCounter())
|
addAtt := IsStrEmpty(nsStr);
|
||||||
Else
|
If addAtt Then Begin
|
||||||
nsStr := Trim(ANameSpaceShortName);
|
If IsStrEmpty(ANameSpaceShortName) Then
|
||||||
End Else Begin
|
nsStr := 'ns' + IntToStr(NextNameSpaceCounter())
|
||||||
nsStr := Copy(nsStr,Succ(AnsiPos(':',nsStr)),MaxInt);
|
Else
|
||||||
|
nsStr := Trim(ANameSpaceShortName);
|
||||||
|
End Else Begin
|
||||||
|
nsStr := Copy(nsStr,Succ(AnsiPos(':',nsStr)),MaxInt);
|
||||||
|
End;
|
||||||
|
scpStr := nsStr + ':' + scpStr;
|
||||||
End;
|
End;
|
||||||
scpStr := nsStr + ':' + scpStr;
|
|
||||||
End;
|
|
||||||
|
|
||||||
e := FDoc.CreateElement(scpStr);
|
e := FDoc.CreateElement(scpStr);
|
||||||
If HasScope() Then
|
If HasScope() Then
|
||||||
GetCurrentScopeObject().AppendChild(e)
|
GetCurrentScopeObject().AppendChild(e)
|
||||||
Else
|
Else
|
||||||
FDoc.AppendChild(e);
|
FDoc.AppendChild(e);
|
||||||
if ( AScopeType = stObject ) then begin
|
if ( AScopeType = stObject ) then begin
|
||||||
PushStack(e);
|
PushStack(e);
|
||||||
end else begin
|
end else begin
|
||||||
PushStack(e,AStyle,'');
|
PushStack(e,AStyle,'');
|
||||||
end;
|
end;
|
||||||
if hasNmspc and addAtt then begin
|
if hasNmspc and addAtt then begin
|
||||||
e.SetAttribute('xmlns:'+nsStr,ANameSpace);
|
e.SetAttribute('xmlns:'+nsStr,ANameSpace);
|
||||||
StackTop().SetNameSpace(ANameSpace);
|
StackTop().SetNameSpace(ANameSpace);
|
||||||
|
end;
|
||||||
|
end else if ( ( AScopeType = stArray ) and ( AStyle = asEmbeded ) ) then begin
|
||||||
|
StackTop().BeginEmbeddedScope();
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1142,18 +1170,20 @@ begin
|
|||||||
end else begin
|
end else begin
|
||||||
locNode := stk.ScopeObject;
|
locNode := stk.ScopeObject;
|
||||||
end;
|
end;
|
||||||
if not Assigned(locNode) then begin
|
|
||||||
Error('Scope not found : "%s"',[strNodeName]);
|
if ( locNode = nil ) then begin
|
||||||
end;
|
Result := -1;
|
||||||
if ( AScopeType = stObject ) then begin
|
|
||||||
PushStack(locNode);
|
|
||||||
end else begin
|
end else begin
|
||||||
PushStack(locNode,AStyle,AItemName);
|
if ( AScopeType = stObject ) then begin
|
||||||
|
PushStack(locNode);
|
||||||
|
end else begin
|
||||||
|
PushStack(locNode,AStyle,AItemName);
|
||||||
|
end;
|
||||||
|
if ( Style = Document ) then begin
|
||||||
|
StackTop().SetNameSpace(nmspc);
|
||||||
|
end;
|
||||||
|
Result := StackTop().GetItemsCount();
|
||||||
end;
|
end;
|
||||||
if ( Style = Document ) then begin
|
|
||||||
StackTop().SetNameSpace(nmspc);
|
|
||||||
end;
|
|
||||||
Result := StackTop().GetItemsCount();
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSOAPBaseFormatter.SetSerializationStyle(const ASerializationStyle: TSerializationStyle);
|
procedure TSOAPBaseFormatter.SetSerializationStyle(const ASerializationStyle: TSerializationStyle);
|
||||||
@ -1230,7 +1260,7 @@ var
|
|||||||
locName : string;
|
locName : string;
|
||||||
chdLst : TDOMNodeList;
|
chdLst : TDOMNodeList;
|
||||||
begin
|
begin
|
||||||
SetStyleAndEncoding(Document,Litteral);
|
SetStyleAndEncoding(Document,Literal);
|
||||||
try
|
try
|
||||||
Result := StackTop().ItemsCount;
|
Result := StackTop().ItemsCount;
|
||||||
if ( Result > 0 ) then begin
|
if ( Result > 0 ) then begin
|
||||||
@ -1287,7 +1317,11 @@ end;
|
|||||||
procedure TSOAPBaseFormatter.EndScope();
|
procedure TSOAPBaseFormatter.EndScope();
|
||||||
begin
|
begin
|
||||||
CheckScope();
|
CheckScope();
|
||||||
FStack.Pop().Free();
|
if ( StackTop().EmbeddedScopeCount = 0 ) then begin
|
||||||
|
FStack.Pop().Free();
|
||||||
|
end else begin
|
||||||
|
StackTop().EndEmbeddedScope();
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSOAPBaseFormatter.AddScopeAttribute(const AName, AValue: string);
|
procedure TSOAPBaseFormatter.AddScopeAttribute(const AName, AValue: string);
|
||||||
@ -1641,7 +1675,7 @@ end;
|
|||||||
function TEmbeddedArrayStackItem.CreateList(const ANodeName: string): TDOMNodeList;
|
function TEmbeddedArrayStackItem.CreateList(const ANodeName: string): TDOMNodeList;
|
||||||
begin
|
begin
|
||||||
if ScopeObject.HasChildNodes() then begin
|
if ScopeObject.HasChildNodes() then begin
|
||||||
Result := TDOMNodeList.Create(ScopeObject,ANodeName);
|
Result := {$IFNDEF FPC_211}TDOMNodeList{$ELSE}TDOMElementList{$ENDIF}.Create(ScopeObject,ANodeName);
|
||||||
end else begin
|
end else begin
|
||||||
Result := nil;
|
Result := nil;
|
||||||
end;
|
end;
|
||||||
|
@ -14,12 +14,12 @@ unit ics_http_protocol;
|
|||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
//{$DEFINE WST_DBG}
|
{$DEFINE WST_DBG}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils,
|
Classes, SysUtils, {$IFDEF WST_DBG}Dialogs,{$ENDIF}
|
||||||
service_intf, imp_utils, base_service_intf,
|
service_intf, imp_utils, base_service_intf,
|
||||||
HttpProt;
|
HttpProt;
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ begin
|
|||||||
ARequest.Position := 0;
|
ARequest.Position := 0;
|
||||||
SetLength(s,ARequest.Size);
|
SetLength(s,ARequest.Size);
|
||||||
ARequest.Read(s[1],ARequest.Size);
|
ARequest.Read(s[1],ARequest.Size);
|
||||||
WriteLn(s);
|
TMemoryStream(AResponse).SaveToFile('request.log');
|
||||||
ARequest.Position := i;
|
ARequest.Position := i;
|
||||||
{$ENDIF WST_DBG}
|
{$ENDIF WST_DBG}
|
||||||
|
|
||||||
@ -183,10 +183,15 @@ begin
|
|||||||
FConnection.Post();
|
FConnection.Post();
|
||||||
|
|
||||||
{$IFDEF WST_DBG}
|
{$IFDEF WST_DBG}
|
||||||
|
TMemoryStream(AResponse).SaveToFile('request.log');
|
||||||
i := AResponse.Position;
|
i := AResponse.Position;
|
||||||
SetLength(s,AResponse.Size);
|
SetLength(s,AResponse.Size);
|
||||||
AResponse.Read(s[1],AResponse.Size);TMemoryStream(AResponse).SaveToFile('E:\Inoussa\Sources\lazarus\wst\v0.3\tests\apache_module\log.log');
|
AResponse.Read(s[1],AResponse.Size);
|
||||||
WriteLn(s);
|
TMemoryStream(AResponse).SaveToFile('response.log');
|
||||||
|
if IsConsole then
|
||||||
|
WriteLn(s)
|
||||||
|
else
|
||||||
|
ShowMessage(s);
|
||||||
{$ENDIF WST_DBG}
|
{$ENDIF WST_DBG}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -394,7 +394,6 @@ procedure CloneRepository(
|
|||||||
out ADest : PServiceRepository
|
out ADest : PServiceRepository
|
||||||
);
|
);
|
||||||
var
|
var
|
||||||
buf : string;
|
|
||||||
i, c : LongInt;
|
i, c : LongInt;
|
||||||
ps : PService;
|
ps : PService;
|
||||||
begin
|
begin
|
||||||
|
@ -163,9 +163,10 @@ begin
|
|||||||
AResponse.CopyFrom(FConnection.Document,0);
|
AResponse.CopyFrom(FConnection.Document,0);
|
||||||
FConnection.Clear();
|
FConnection.Clear();
|
||||||
{$IFDEF WST_DBG}
|
{$IFDEF WST_DBG}
|
||||||
TMemoryStream(AResponse).SaveToFile('log.log');
|
TMemoryStream(ARequest).SaveToFile('request.log');
|
||||||
SetLength(s,AResponse.Size);
|
SetLength(s,AResponse.Size);
|
||||||
Move(TMemoryStream(AResponse).Memory^,s[1],Length(s));
|
Move(TMemoryStream(AResponse).Memory^,s[1],Length(s));
|
||||||
|
TMemoryStream(AResponse).SaveToFile('response.log');
|
||||||
if IsConsole then
|
if IsConsole then
|
||||||
WriteLn(s)
|
WriteLn(s)
|
||||||
else
|
else
|
||||||
|
@ -37,10 +37,10 @@
|
|||||||
<Filename Value="test_google_api.pas"/>
|
<Filename Value="test_google_api.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="test_google_api"/>
|
<UnitName Value="test_google_api"/>
|
||||||
<CursorPos X="54" Y="12"/>
|
<CursorPos X="17" Y="11"/>
|
||||||
<TopLine Value="12"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="0"/>
|
<EditorIndex Value="0"/>
|
||||||
<UsageCount Value="154"/>
|
<UsageCount Value="155"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
@ -49,7 +49,7 @@
|
|||||||
<UnitName Value="googlewebapi"/>
|
<UnitName Value="googlewebapi"/>
|
||||||
<CursorPos X="47" Y="85"/>
|
<CursorPos X="47" Y="85"/>
|
||||||
<TopLine Value="73"/>
|
<TopLine Value="73"/>
|
||||||
<UsageCount Value="154"/>
|
<UsageCount Value="155"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="googlewebapiimpunit.pas"/>
|
<Filename Value="googlewebapiimpunit.pas"/>
|
||||||
@ -153,15 +153,17 @@
|
|||||||
<UnitName Value="indy_http_protocol"/>
|
<UnitName Value="indy_http_protocol"/>
|
||||||
<CursorPos X="45" Y="166"/>
|
<CursorPos X="45" Y="166"/>
|
||||||
<TopLine Value="156"/>
|
<TopLine Value="156"/>
|
||||||
<UsageCount Value="69"/>
|
<UsageCount Value="70"/>
|
||||||
</Unit16>
|
</Unit16>
|
||||||
<Unit17>
|
<Unit17>
|
||||||
<Filename Value="..\..\ics_http_protocol.pas"/>
|
<Filename Value="..\..\ics_http_protocol.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="ics_http_protocol"/>
|
<UnitName Value="ics_http_protocol"/>
|
||||||
<CursorPos X="3" Y="17"/>
|
<CursorPos X="8" Y="177"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="166"/>
|
||||||
<UsageCount Value="131"/>
|
<EditorIndex Value="2"/>
|
||||||
|
<UsageCount Value="132"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit17>
|
</Unit17>
|
||||||
<Unit18>
|
<Unit18>
|
||||||
<Filename Value="D:\Lazarus\others_package\ics\latest_distr\Delphi\Vc32\HttpProt.pas"/>
|
<Filename Value="D:\Lazarus\others_package\ics\latest_distr\Delphi\Vc32\HttpProt.pas"/>
|
||||||
@ -180,11 +182,9 @@
|
|||||||
<Unit20>
|
<Unit20>
|
||||||
<Filename Value="..\..\service_intf.pas"/>
|
<Filename Value="..\..\service_intf.pas"/>
|
||||||
<UnitName Value="service_intf"/>
|
<UnitName Value="service_intf"/>
|
||||||
<CursorPos X="35" Y="37"/>
|
<CursorPos X="15" Y="47"/>
|
||||||
<TopLine Value="33"/>
|
<TopLine Value="36"/>
|
||||||
<EditorIndex Value="2"/>
|
|
||||||
<UsageCount Value="55"/>
|
<UsageCount Value="55"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit20>
|
</Unit20>
|
||||||
<Unit21>
|
<Unit21>
|
||||||
<Filename Value="D:\Lazarus\fpcsrc\fcl\xml\dom.pp"/>
|
<Filename Value="D:\Lazarus\fpcsrc\fcl\xml\dom.pp"/>
|
||||||
@ -233,7 +233,7 @@
|
|||||||
<CursorPos X="36" Y="29"/>
|
<CursorPos X="36" Y="29"/>
|
||||||
<TopLine Value="12"/>
|
<TopLine Value="12"/>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="3"/>
|
||||||
<UsageCount Value="49"/>
|
<UsageCount Value="50"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit27>
|
</Unit27>
|
||||||
<Unit28>
|
<Unit28>
|
||||||
@ -242,7 +242,7 @@
|
|||||||
<CursorPos X="3" Y="694"/>
|
<CursorPos X="3" Y="694"/>
|
||||||
<TopLine Value="666"/>
|
<TopLine Value="666"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="4"/>
|
||||||
<UsageCount Value="49"/>
|
<UsageCount Value="50"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit28>
|
</Unit28>
|
||||||
<Unit29>
|
<Unit29>
|
||||||
@ -251,7 +251,7 @@
|
|||||||
<CursorPos X="3" Y="119"/>
|
<CursorPos X="3" Y="119"/>
|
||||||
<TopLine Value="135"/>
|
<TopLine Value="135"/>
|
||||||
<EditorIndex Value="8"/>
|
<EditorIndex Value="8"/>
|
||||||
<UsageCount Value="33"/>
|
<UsageCount Value="34"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit29>
|
</Unit29>
|
||||||
<Unit30>
|
<Unit30>
|
||||||
@ -280,9 +280,7 @@
|
|||||||
<UnitName Value="googlewebapi_proxy"/>
|
<UnitName Value="googlewebapi_proxy"/>
|
||||||
<CursorPos X="29" Y="64"/>
|
<CursorPos X="29" Y="64"/>
|
||||||
<TopLine Value="47"/>
|
<TopLine Value="47"/>
|
||||||
<EditorIndex Value="1"/>
|
<UsageCount Value="73"/>
|
||||||
<UsageCount Value="72"/>
|
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit33>
|
</Unit33>
|
||||||
<Unit34>
|
<Unit34>
|
||||||
<Filename Value="..\..\..\v0.2\base_service_intf.pas"/>
|
<Filename Value="..\..\..\v0.2\base_service_intf.pas"/>
|
||||||
@ -301,9 +299,11 @@
|
|||||||
<Unit36>
|
<Unit36>
|
||||||
<Filename Value="..\..\synapse_http_protocol.pas"/>
|
<Filename Value="..\..\synapse_http_protocol.pas"/>
|
||||||
<UnitName Value="synapse_http_protocol"/>
|
<UnitName Value="synapse_http_protocol"/>
|
||||||
<CursorPos X="3" Y="178"/>
|
<CursorPos X="17" Y="25"/>
|
||||||
<TopLine Value="134"/>
|
<TopLine Value="9"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="12"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit36>
|
</Unit36>
|
||||||
<Unit37>
|
<Unit37>
|
||||||
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
|
<Filename Value="D:\Lazarus\others_package\synapse\httpsend.pas"/>
|
||||||
@ -359,7 +359,7 @@
|
|||||||
<CursorPos X="1" Y="498"/>
|
<CursorPos X="1" Y="498"/>
|
||||||
<TopLine Value="139"/>
|
<TopLine Value="139"/>
|
||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="6"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="13"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit44>
|
</Unit44>
|
||||||
<Unit45>
|
<Unit45>
|
||||||
@ -369,7 +369,7 @@
|
|||||||
<CursorPos X="23" Y="1"/>
|
<CursorPos X="23" Y="1"/>
|
||||||
<TopLine Value="19"/>
|
<TopLine Value="19"/>
|
||||||
<EditorIndex Value="7"/>
|
<EditorIndex Value="7"/>
|
||||||
<UsageCount Value="23"/>
|
<UsageCount Value="24"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit45>
|
</Unit45>
|
||||||
<Unit46>
|
<Unit46>
|
||||||
@ -377,21 +377,12 @@
|
|||||||
<CursorPos X="74" Y="13"/>
|
<CursorPos X="74" Y="13"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="5"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="11"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<SyntaxHighlighter Value="None"/>
|
<SyntaxHighlighter Value="None"/>
|
||||||
</Unit46>
|
</Unit46>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="2" HistoryIndex="1">
|
<JumpHistory Count="0" HistoryIndex="-1"/>
|
||||||
<Position1>
|
|
||||||
<Filename Value="googlewebapi_proxy.pas"/>
|
|
||||||
<Caret Line="64" Column="29" TopLine="47"/>
|
|
||||||
</Position1>
|
|
||||||
<Position2>
|
|
||||||
<Filename Value="..\..\service_intf.pas"/>
|
|
||||||
<Caret Line="37" Column="35" TopLine="33"/>
|
|
||||||
</Position2>
|
|
||||||
</JumpHistory>
|
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="5"/>
|
<Version Value="5"/>
|
||||||
|
@ -13,11 +13,11 @@ uses
|
|||||||
|
|
||||||
Const
|
Const
|
||||||
//sADRESS = 'http:Address=http://api.google.com/search/beta2;Proxy';
|
//sADRESS = 'http:Address=http://api.google.com/search/beta2;Proxy';
|
||||||
sADDRESS = 'http:Address=http://api.google.com/search/beta2'+
|
sADDRESS = 'http:Address=http://api.google.com/search/beta2';//+
|
||||||
';ProxyServer=10.0.0.5;ProxyPort=8080';
|
//';ProxyServer=10.0.0.5;ProxyPort=8080';
|
||||||
sTARGET = 'urn:GoogleSearch';
|
sTARGET = 'urn:GoogleSearch';
|
||||||
sKEY = '<your key here>';
|
sKEY = '0w9pU3tQFHJyjRUP/bKgv2qwCoXf5pop';//'<your key here>';
|
||||||
sSERVICE_PROTOCOL = 'SOAP';
|
sSERVICE_PROTOCOL = 'SOAP:style=rpc';
|
||||||
Var
|
Var
|
||||||
tmpObj : IGoogleSearch;
|
tmpObj : IGoogleSearch;
|
||||||
qryRes : TGoogleSearchResult;
|
qryRes : TGoogleSearchResult;
|
||||||
|
@ -146,6 +146,7 @@ type
|
|||||||
FDecStream : ISourceStream;
|
FDecStream : ISourceStream;
|
||||||
FImpStream : ISourceStream;
|
FImpStream : ISourceStream;
|
||||||
FImpTempStream : ISourceStream;
|
FImpTempStream : ISourceStream;
|
||||||
|
FImpLastStream : ISourceStream;
|
||||||
private
|
private
|
||||||
function GenerateIntfName(AIntf : TInterfaceDefinition):string;
|
function GenerateIntfName(AIntf : TInterfaceDefinition):string;
|
||||||
|
|
||||||
@ -1292,7 +1293,8 @@ begin
|
|||||||
NewLine();
|
NewLine();
|
||||||
NewLine();
|
NewLine();
|
||||||
FImpTempStream.NewLine();
|
FImpTempStream.NewLine();
|
||||||
FImpTempStream.WriteLn('End.');
|
FImpLastStream.NewLine();
|
||||||
|
FImpLastStream.WriteLn('End.');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TInftGenerator.GenerateIntf(AIntf: TInterfaceDefinition);
|
procedure TInftGenerator.GenerateIntf(AIntf: TInterfaceDefinition);
|
||||||
@ -1382,7 +1384,7 @@ end;
|
|||||||
|
|
||||||
procedure TInftGenerator.GenerateClass(ASymbol: TClassTypeDefinition);
|
procedure TInftGenerator.GenerateClass(ASymbol: TClassTypeDefinition);
|
||||||
var
|
var
|
||||||
locClassPropNbr, locStoredPropsNbr : Integer;
|
locClassPropNbr, locStoredPropsNbr, locArrayPropsNbr : Integer;
|
||||||
loc_BaseComplexSimpleContentRemotable : TClassTypeDefinition;
|
loc_BaseComplexSimpleContentRemotable : TClassTypeDefinition;
|
||||||
|
|
||||||
procedure Prepare();
|
procedure Prepare();
|
||||||
@ -1392,13 +1394,17 @@ var
|
|||||||
begin
|
begin
|
||||||
locClassPropNbr := 0;
|
locClassPropNbr := 0;
|
||||||
locStoredPropsNbr := 0;
|
locStoredPropsNbr := 0;
|
||||||
|
locArrayPropsNbr := 0;
|
||||||
for k := 0 to Pred(ASymbol.PropertyCount) do begin
|
for k := 0 to Pred(ASymbol.PropertyCount) do begin
|
||||||
p := ASymbol.Properties[k];
|
p := ASymbol.Properties[k];
|
||||||
if ( p.StorageOption = soOptional ) then
|
if ( p.StorageOption = soOptional ) then
|
||||||
Inc(locStoredPropsNbr);
|
Inc(locStoredPropsNbr);
|
||||||
if p.DataType.InheritsFrom(TClassTypeDefinition) then
|
if p.DataType.InheritsFrom(TClassTypeDefinition) then
|
||||||
Inc(locClassPropNbr);
|
Inc(locClassPropNbr);
|
||||||
|
if p.DataType.InheritsFrom(TArrayDefinition) then
|
||||||
|
Inc(locArrayPropsNbr);
|
||||||
end;
|
end;
|
||||||
|
locClassPropNbr := locClassPropNbr + locArrayPropsNbr;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure WriteDec();
|
procedure WriteDec();
|
||||||
@ -1440,12 +1446,12 @@ var
|
|||||||
Indent();
|
Indent();
|
||||||
WriteLn('property %s : %s read F%s write F%s%s;',[propName,AProp.DataType.Name,propName,propName,locStore]);
|
WriteLn('property %s : %s read F%s write F%s%s;',[propName,AProp.DataType.Name,propName,propName,locStore]);
|
||||||
if not AnsiSameText(AProp.Name,AProp.ExternalName) then begin
|
if not AnsiSameText(AProp.Name,AProp.ExternalName) then begin
|
||||||
FImpTempStream.Indent();
|
FImpLastStream.Indent();
|
||||||
FImpTempStream.WriteLn('GetTypeRegistry().ItemByTypeInfo[TypeInfo(%s)].RegisterExternalPropertyName(%s,%s);',[ASymbol.Name,QuotedStr(AProp.Name),QuotedStr(AProp.ExternalName)]);
|
FImpLastStream.WriteLn('GetTypeRegistry().ItemByTypeInfo[TypeInfo(%s)].RegisterExternalPropertyName(%s,%s);',[ASymbol.Name,QuotedStr(AProp.Name),QuotedStr(AProp.ExternalName)]);
|
||||||
end;
|
end;
|
||||||
if AProp.IsAttribute and ( not ASymbol.IsDescendantOf(loc_BaseComplexSimpleContentRemotable) ) then begin
|
if AProp.IsAttribute then begin
|
||||||
FImpTempStream.Indent();
|
FImpLastStream.Indent();
|
||||||
FImpTempStream.WriteLn('%s.RegisterAttributeProperty(%s);',[ASymbol.Name,QuotedStr(AProp.Name)]);
|
FImpLastStream.WriteLn('%s.RegisterAttributeProperty(%s);',[ASymbol.Name,QuotedStr(AProp.Name)]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1478,12 +1484,19 @@ var
|
|||||||
DecIndent();
|
DecIndent();
|
||||||
end;
|
end;
|
||||||
//
|
//
|
||||||
if ( locClassPropNbr > 0 ) then begin
|
if ( locArrayPropsNbr > 0 ) or ( locClassPropNbr > 0 ) then begin
|
||||||
Indent();
|
Indent();
|
||||||
WriteLn('public');
|
WriteLn('public');
|
||||||
|
end;
|
||||||
|
if ( locArrayPropsNbr > 0 ) then begin
|
||||||
IncIndent();
|
IncIndent();
|
||||||
Indent();
|
Indent(); WriteLn('constructor Create();override;');
|
||||||
WriteLn('destructor Destroy();override;');
|
DecIndent();
|
||||||
|
end;
|
||||||
|
|
||||||
|
if ( locClassPropNbr > 0 ) then begin
|
||||||
|
IncIndent();
|
||||||
|
Indent(); WriteLn('destructor Destroy();override;');
|
||||||
DecIndent();
|
DecIndent();
|
||||||
end;
|
end;
|
||||||
//
|
//
|
||||||
@ -1505,6 +1518,24 @@ var
|
|||||||
NewLine();
|
NewLine();
|
||||||
WriteLn('{ %s }',[ASymbol.Name]);
|
WriteLn('{ %s }',[ASymbol.Name]);
|
||||||
|
|
||||||
|
if ( locArrayPropsNbr > 0 ) then begin
|
||||||
|
NewLine();
|
||||||
|
WriteLn('constructor %s.Create();',[ASymbol.Name]);
|
||||||
|
WriteLn('begin');
|
||||||
|
IncIndent();
|
||||||
|
Indent();
|
||||||
|
WriteLn('inherited Create();');
|
||||||
|
for k := 0 to Pred(ASymbol.PropertyCount) do begin
|
||||||
|
p := ASymbol.Properties[k];
|
||||||
|
if p.DataType.InheritsFrom(TArrayDefinition) then begin
|
||||||
|
Indent();
|
||||||
|
WriteLn('F%s := %s.Create();',[p.Name,p.DataType.Name]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
DecIndent();
|
||||||
|
WriteLn('end;');
|
||||||
|
end;
|
||||||
|
|
||||||
if ( locClassPropNbr > 0 ) then begin
|
if ( locClassPropNbr > 0 ) then begin
|
||||||
NewLine();
|
NewLine();
|
||||||
WriteLn('destructor %s.Destroy();',[ASymbol.Name]);
|
WriteLn('destructor %s.Destroy();',[ASymbol.Name]);
|
||||||
@ -1526,7 +1557,7 @@ var
|
|||||||
DecIndent();
|
DecIndent();
|
||||||
WriteLn('end;');
|
WriteLn('end;');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if ( locStoredPropsNbr > 0 ) then begin
|
if ( locStoredPropsNbr > 0 ) then begin
|
||||||
for k := 0 to Pred(ASymbol.PropertyCount) do begin
|
for k := 0 to Pred(ASymbol.PropertyCount) do begin
|
||||||
p := ASymbol.Properties[k];
|
p := ASymbol.Properties[k];
|
||||||
@ -1819,10 +1850,19 @@ procedure TInftGenerator.GenerateCustomMetadatas();
|
|||||||
IncIndent();
|
IncIndent();
|
||||||
Indent(); WriteLn('%s,',[sUNIT_NAME]);
|
Indent(); WriteLn('%s,',[sUNIT_NAME]);
|
||||||
Indent(); WriteLn('%s,',[QuotedStr(AIntf.Name)]);
|
Indent(); WriteLn('%s,',[QuotedStr(AIntf.Name)]);
|
||||||
Indent(); WriteLn('%s,',[QuotedStr('SoapStyle')]);
|
Indent(); WriteLn('%s,',[QuotedStr('SoapDocumentStyle')]);
|
||||||
Indent(); WriteLn('%s' ,[QuotedStr('rpc')]);
|
Indent(); WriteLn('%s' ,[QuotedStr('rpc')]);
|
||||||
DecIndent();
|
DecIndent();
|
||||||
Indent();WriteLn(');');
|
Indent();WriteLn(');');
|
||||||
|
end else if ( AIntf.BindingStyle = bsDocument ) then begin
|
||||||
|
Indent();WriteLn('mm.SetServiceCustomData(');
|
||||||
|
IncIndent();
|
||||||
|
Indent(); WriteLn('%s,',[sUNIT_NAME]);
|
||||||
|
Indent(); WriteLn('%s,',[QuotedStr(AIntf.Name)]);
|
||||||
|
Indent(); WriteLn('%s,',[QuotedStr('SoapDocumentStyle')]);
|
||||||
|
Indent(); WriteLn('%s' ,[QuotedStr('document')]);
|
||||||
|
DecIndent();
|
||||||
|
Indent();WriteLn(');');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
for k := 0 to Pred(AIntf.MethodCount) do begin
|
for k := 0 to Pred(AIntf.MethodCount) do begin
|
||||||
@ -1867,7 +1907,9 @@ begin
|
|||||||
FDecStream := SrcMngr.CreateItem(GetDestUnitName() + '.dec');
|
FDecStream := SrcMngr.CreateItem(GetDestUnitName() + '.dec');
|
||||||
FImpStream := SrcMngr.CreateItem(GetDestUnitName() + '.imp');
|
FImpStream := SrcMngr.CreateItem(GetDestUnitName() + '.imp');
|
||||||
FImpTempStream := SrcMngr.CreateItem(GetDestUnitName() + '.tmp_imp');
|
FImpTempStream := SrcMngr.CreateItem(GetDestUnitName() + '.tmp_imp');
|
||||||
|
FImpLastStream := SrcMngr.CreateItem(GetDestUnitName() + '.tmp_imp_last');
|
||||||
FImpTempStream.IncIndent();
|
FImpTempStream.IncIndent();
|
||||||
|
FImpLastStream.IncIndent();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TInftGenerator.Execute();
|
procedure TInftGenerator.Execute();
|
||||||
@ -1967,7 +2009,7 @@ begin
|
|||||||
GenerateCustomMetadatas();
|
GenerateCustomMetadatas();
|
||||||
|
|
||||||
GenerateUnitImplementationFooter();
|
GenerateUnitImplementationFooter();
|
||||||
FSrcMngr.Merge(GetDestUnitName() + '.pas',[FDecStream,FImpStream,FImpTempStream]);
|
FSrcMngr.Merge(GetDestUnitName() + '.pas',[FDecStream,FImpStream,FImpTempStream,FImpLastStream]);
|
||||||
FDecStream := nil;
|
FDecStream := nil;
|
||||||
FImpStream := nil;
|
FImpStream := nil;
|
||||||
FImpTempStream := nil;
|
FImpTempStream := nil;
|
||||||
|
@ -255,6 +255,8 @@ Type
|
|||||||
property Properties[const Index : Integer] : TPropertyDefinition read GetProperty;
|
property Properties[const Index : Integer] : TPropertyDefinition read GetProperty;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TClassTypeDefinitionClass = class of TClassTypeDefinition;
|
||||||
|
|
||||||
TNativeClassTypeDefinition = class(TClassTypeDefinition)
|
TNativeClassTypeDefinition = class(TClassTypeDefinition)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -565,7 +567,7 @@ function TMethodDefinition.AddParameter(
|
|||||||
ADataType : TTypeDefinition
|
ADataType : TTypeDefinition
|
||||||
): TParameterDefinition;
|
): TParameterDefinition;
|
||||||
begin
|
begin
|
||||||
If ( GetParameterIndex(Name) = -1 ) Then Begin
|
If ( GetParameterIndex(AName) = -1 ) Then Begin
|
||||||
Result := TParameterDefinition.Create(AName,AModifier,ADataType);
|
Result := TParameterDefinition.Create(AName,AModifier,ADataType);
|
||||||
FParameterList.Add(Result);
|
FParameterList.Add(Result);
|
||||||
End Else Begin
|
End Else Begin
|
||||||
@ -1182,10 +1184,15 @@ function CreateWstInterfaceSymbolTable() : TSymbolTable;
|
|||||||
function AddClassDef(
|
function AddClassDef(
|
||||||
ATable : TSymbolTable;
|
ATable : TSymbolTable;
|
||||||
const AClassName,
|
const AClassName,
|
||||||
AParentName : string
|
AParentName : string;
|
||||||
|
const AClassType : TClassTypeDefinition = nil
|
||||||
):TClassTypeDefinition;
|
):TClassTypeDefinition;
|
||||||
begin
|
begin
|
||||||
Result := TClassTypeDefinition.Create(AClassName);
|
if Assigned(AClassType) then begin
|
||||||
|
Result := AClassType.Create(AClassName);
|
||||||
|
end else begin
|
||||||
|
Result := TClassTypeDefinition.Create(AClassName);
|
||||||
|
end;
|
||||||
if not IsStrEmpty(AParentName) then
|
if not IsStrEmpty(AParentName) then
|
||||||
Result.SetParent(ATable.ByName(AParentName) as TClassTypeDefinition);
|
Result.SetParent(ATable.ByName(AParentName) as TClassTypeDefinition);
|
||||||
ATable.Add(Result);
|
ATable.Add(Result);
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
<IconPath Value="./"/>
|
<IconPath Value="./"/>
|
||||||
<TargetFileExt Value=""/>
|
<TargetFileExt Value=""/>
|
||||||
<ActiveEditorIndexAtStart Value="8"/>
|
<ActiveEditorIndexAtStart Value="1"/>
|
||||||
</General>
|
</General>
|
||||||
<PublishOptions>
|
<PublishOptions>
|
||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
@ -33,13 +33,13 @@
|
|||||||
<PackageName Value="FCL"/>
|
<PackageName Value="FCL"/>
|
||||||
</Item1>
|
</Item1>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="46">
|
<Units Count="40">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="ws_helper.pas"/>
|
<Filename Value="ws_helper.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="ws_helper"/>
|
<UnitName Value="ws_helper"/>
|
||||||
<CursorPos X="1" Y="122"/>
|
<CursorPos X="1" Y="122"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="35"/>
|
||||||
<EditorIndex Value="8"/>
|
<EditorIndex Value="8"/>
|
||||||
<UsageCount Value="200"/>
|
<UsageCount Value="200"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -58,14 +58,14 @@
|
|||||||
<Filename Value="generator.pas"/>
|
<Filename Value="generator.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="generator"/>
|
<UnitName Value="generator"/>
|
||||||
<CursorPos X="50" Y="1823"/>
|
<CursorPos X="9" Y="1435"/>
|
||||||
<TopLine Value="1798"/>
|
<TopLine Value="1435"/>
|
||||||
<EditorIndex Value="0"/>
|
<EditorIndex Value="0"/>
|
||||||
<UsageCount Value="200"/>
|
<UsageCount Value="200"/>
|
||||||
<Bookmarks Count="3">
|
<Bookmarks Count="3">
|
||||||
<Item0 X="69" Y="859" ID="1"/>
|
<Item0 X="69" Y="860" ID="1"/>
|
||||||
<Item1 X="17" Y="219" ID="2"/>
|
<Item1 X="17" Y="220" ID="2"/>
|
||||||
<Item2 X="23" Y="1831" ID="4"/>
|
<Item2 X="23" Y="1871" ID="4"/>
|
||||||
</Bookmarks>
|
</Bookmarks>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
@ -73,12 +73,12 @@
|
|||||||
<Filename Value="parserdefs.pas"/>
|
<Filename Value="parserdefs.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="parserdefs"/>
|
<UnitName Value="parserdefs"/>
|
||||||
<CursorPos X="48" Y="365"/>
|
<CursorPos X="14" Y="225"/>
|
||||||
<TopLine Value="353"/>
|
<TopLine Value="204"/>
|
||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="5"/>
|
||||||
<UsageCount Value="200"/>
|
<UsageCount Value="200"/>
|
||||||
<Bookmarks Count="1">
|
<Bookmarks Count="1">
|
||||||
<Item0 X="69" Y="1238" ID="0"/>
|
<Item0 X="69" Y="1245" ID="0"/>
|
||||||
</Bookmarks>
|
</Bookmarks>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit3>
|
</Unit3>
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<Filename Value="ws_helper.lpi"/>
|
<Filename Value="ws_helper.lpi"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="8"/>
|
||||||
<SyntaxHighlighter Value="None"/>
|
<SyntaxHighlighter Value="None"/>
|
||||||
</Unit5>
|
</Unit5>
|
||||||
<Unit6>
|
<Unit6>
|
||||||
@ -104,321 +104,366 @@
|
|||||||
<UnitName Value="Classes"/>
|
<UnitName Value="Classes"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="8"/>
|
||||||
</Unit6>
|
</Unit6>
|
||||||
<Unit7>
|
<Unit7>
|
||||||
<Filename Value="usr\share\fpcsrc\rtl\objpas\strutils.pp"/>
|
<Filename Value="usr\share\fpcsrc\rtl\objpas\strutils.pp"/>
|
||||||
<UnitName Value="strutils"/>
|
<UnitName Value="strutils"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="8"/>
|
||||||
</Unit7>
|
</Unit7>
|
||||||
<Unit8>
|
<Unit8>
|
||||||
<Filename Value="usr\share\fpcsrc\rtl\unix\sysutils.pp"/>
|
<Filename Value="usr\share\fpcsrc\rtl\unix\sysutils.pp"/>
|
||||||
<UnitName Value="sysutils"/>
|
<UnitName Value="sysutils"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="8"/>
|
||||||
</Unit8>
|
</Unit8>
|
||||||
<Unit9>
|
<Unit9>
|
||||||
<Filename Value="D:\Lazarus\others_package\indy\indy-10.2.0.1\lazarus\IdDsnCoreResourceStrings.pas"/>
|
|
||||||
<UnitName Value="IdDsnCoreResourceStrings"/>
|
|
||||||
<CursorPos X="1" Y="1"/>
|
|
||||||
<TopLine Value="1"/>
|
|
||||||
<UsageCount Value="1"/>
|
|
||||||
</Unit9>
|
|
||||||
<Unit10>
|
|
||||||
<Filename Value="D:\Lazarus\others_package\indy\indy-10.2.0.1\lazarus\IdDsnPropEdBinding.pas"/>
|
|
||||||
<UnitName Value="IdDsnPropEdBinding"/>
|
|
||||||
<CursorPos X="1" Y="1"/>
|
|
||||||
<TopLine Value="1"/>
|
|
||||||
<UsageCount Value="1"/>
|
|
||||||
</Unit10>
|
|
||||||
<Unit11>
|
|
||||||
<Filename Value="D:\Lazarus\ide\lazarus.pp"/>
|
|
||||||
<UnitName Value="Lazarus"/>
|
|
||||||
<CursorPos X="1" Y="1"/>
|
|
||||||
<TopLine Value="1"/>
|
|
||||||
<UsageCount Value="1"/>
|
|
||||||
</Unit11>
|
|
||||||
<Unit12>
|
|
||||||
<Filename Value="source_utils.pas"/>
|
<Filename Value="source_utils.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="source_utils"/>
|
<UnitName Value="source_utils"/>
|
||||||
<CursorPos X="3" Y="34"/>
|
<CursorPos X="3" Y="34"/>
|
||||||
<TopLine Value="45"/>
|
<TopLine Value="45"/>
|
||||||
<UsageCount Value="201"/>
|
<UsageCount Value="201"/>
|
||||||
</Unit12>
|
</Unit9>
|
||||||
<Unit13>
|
<Unit10>
|
||||||
<Filename Value="D:\lazarusClean\fpcsrc\rtl\objpas\strutils.pp"/>
|
<Filename Value="D:\lazarusClean\fpcsrc\rtl\objpas\strutils.pp"/>
|
||||||
<UnitName Value="strutils"/>
|
<UnitName Value="strutils"/>
|
||||||
<CursorPos X="23" Y="246"/>
|
<CursorPos X="23" Y="246"/>
|
||||||
<TopLine Value="246"/>
|
<TopLine Value="246"/>
|
||||||
<UsageCount Value="5"/>
|
<UsageCount Value="3"/>
|
||||||
</Unit13>
|
</Unit10>
|
||||||
<Unit14>
|
<Unit11>
|
||||||
<Filename Value="D:\lazarusClean\fpcsrc\rtl\objpas\sysutils\sysstrh.inc"/>
|
<Filename Value="D:\lazarusClean\fpcsrc\rtl\objpas\sysutils\sysstrh.inc"/>
|
||||||
<CursorPos X="10" Y="74"/>
|
<CursorPos X="10" Y="74"/>
|
||||||
<TopLine Value="70"/>
|
<TopLine Value="70"/>
|
||||||
<UsageCount Value="5"/>
|
<UsageCount Value="3"/>
|
||||||
</Unit14>
|
</Unit11>
|
||||||
<Unit15>
|
<Unit12>
|
||||||
<Filename Value="D:\lazarusClean\fpcsrc\rtl\objpas\sysutils\sysstr.inc"/>
|
<Filename Value="D:\lazarusClean\fpcsrc\rtl\objpas\sysutils\sysstr.inc"/>
|
||||||
<CursorPos X="3" Y="185"/>
|
<CursorPos X="3" Y="185"/>
|
||||||
<TopLine Value="180"/>
|
<TopLine Value="180"/>
|
||||||
<UsageCount Value="5"/>
|
<UsageCount Value="3"/>
|
||||||
</Unit15>
|
</Unit12>
|
||||||
<Unit16>
|
<Unit13>
|
||||||
<Filename Value="command_line_parser.pas"/>
|
<Filename Value="command_line_parser.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="command_line_parser"/>
|
<UnitName Value="command_line_parser"/>
|
||||||
<CursorPos X="38" Y="63"/>
|
<CursorPos X="38" Y="63"/>
|
||||||
<TopLine Value="42"/>
|
<TopLine Value="42"/>
|
||||||
<UsageCount Value="200"/>
|
<UsageCount Value="200"/>
|
||||||
</Unit16>
|
</Unit13>
|
||||||
<Unit17>
|
<Unit14>
|
||||||
<Filename Value="metadata_generator.pas"/>
|
<Filename Value="metadata_generator.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="metadata_generator"/>
|
<UnitName Value="metadata_generator"/>
|
||||||
<CursorPos X="3" Y="96"/>
|
<CursorPos X="3" Y="96"/>
|
||||||
<TopLine Value="69"/>
|
<TopLine Value="69"/>
|
||||||
<UsageCount Value="200"/>
|
<UsageCount Value="200"/>
|
||||||
</Unit17>
|
</Unit14>
|
||||||
<Unit18>
|
<Unit15>
|
||||||
<Filename Value="..\binary_streamer.pas"/>
|
<Filename Value="..\binary_streamer.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="binary_streamer"/>
|
<UnitName Value="binary_streamer"/>
|
||||||
<CursorPos X="32" Y="344"/>
|
<CursorPos X="32" Y="344"/>
|
||||||
<TopLine Value="328"/>
|
<TopLine Value="328"/>
|
||||||
<UsageCount Value="200"/>
|
<UsageCount Value="200"/>
|
||||||
</Unit18>
|
</Unit15>
|
||||||
<Unit19>
|
<Unit16>
|
||||||
<Filename Value="D:\Lazarus\fpcsrc\rtl\objpas\classes\classesh.inc"/>
|
|
||||||
<CursorPos X="17" Y="662"/>
|
|
||||||
<TopLine Value="652"/>
|
|
||||||
<UsageCount Value="1"/>
|
|
||||||
</Unit19>
|
|
||||||
<Unit20>
|
|
||||||
<Filename Value="wst_resources_utils.pas"/>
|
<Filename Value="wst_resources_utils.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="wst_resources_utils"/>
|
<UnitName Value="wst_resources_utils"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="184"/>
|
<UsageCount Value="200"/>
|
||||||
</Unit20>
|
</Unit16>
|
||||||
<Unit21>
|
<Unit17>
|
||||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\win32\classes.pp"/>
|
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\win32\classes.pp"/>
|
||||||
<UnitName Value="Classes"/>
|
<UnitName Value="Classes"/>
|
||||||
<CursorPos X="1" Y="47"/>
|
<CursorPos X="1" Y="47"/>
|
||||||
<TopLine Value="5"/>
|
<TopLine Value="5"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit21>
|
</Unit17>
|
||||||
<Unit22>
|
<Unit18>
|
||||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysutilh.inc"/>
|
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysutilh.inc"/>
|
||||||
<CursorPos X="13" Y="178"/>
|
<CursorPos X="13" Y="178"/>
|
||||||
<TopLine Value="163"/>
|
<TopLine Value="163"/>
|
||||||
<UsageCount Value="3"/>
|
<UsageCount Value="1"/>
|
||||||
</Unit22>
|
</Unit18>
|
||||||
<Unit23>
|
<Unit19>
|
||||||
<Filename Value="..\wsdl_to_pascal\wsdl2pas_imp.pas"/>
|
<Filename Value="..\wsdl_to_pascal\wsdl2pas_imp.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="wsdl2pas_imp"/>
|
<UnitName Value="wsdl2pas_imp"/>
|
||||||
<CursorPos X="29" Y="1641"/>
|
<CursorPos X="29" Y="1641"/>
|
||||||
<TopLine Value="1633"/>
|
<TopLine Value="1633"/>
|
||||||
<UsageCount Value="176"/>
|
<UsageCount Value="201"/>
|
||||||
</Unit23>
|
</Unit19>
|
||||||
<Unit24>
|
<Unit20>
|
||||||
<Filename Value="..\wst_rtti_filter\rtti_filters.pas"/>
|
<Filename Value="..\wst_rtti_filter\rtti_filters.pas"/>
|
||||||
<UnitName Value="rtti_filters"/>
|
<UnitName Value="rtti_filters"/>
|
||||||
<CursorPos X="1" Y="209"/>
|
<CursorPos X="1" Y="564"/>
|
||||||
<TopLine Value="198"/>
|
<TopLine Value="543"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="2"/>
|
||||||
<UsageCount Value="44"/>
|
<UsageCount Value="57"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit24>
|
</Unit20>
|
||||||
<Unit25>
|
<Unit21>
|
||||||
<Filename Value="..\wst_rtti_filter\dom_cursors.pas"/>
|
<Filename Value="..\wst_rtti_filter\dom_cursors.pas"/>
|
||||||
<UnitName Value="dom_cursors"/>
|
<UnitName Value="dom_cursors"/>
|
||||||
<CursorPos X="1" Y="172"/>
|
<CursorPos X="1" Y="172"/>
|
||||||
<TopLine Value="161"/>
|
<TopLine Value="151"/>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="3"/>
|
||||||
<UsageCount Value="70"/>
|
<UsageCount Value="83"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit25>
|
</Unit21>
|
||||||
<Unit26>
|
<Unit22>
|
||||||
<Filename Value="..\wst_rtti_filter\cursor_intf.pas"/>
|
<Filename Value="..\wst_rtti_filter\cursor_intf.pas"/>
|
||||||
<UnitName Value="cursor_intf"/>
|
<UnitName Value="cursor_intf"/>
|
||||||
<CursorPos X="1" Y="98"/>
|
<CursorPos X="1" Y="113"/>
|
||||||
<TopLine Value="87"/>
|
<TopLine Value="97"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="4"/>
|
||||||
<UsageCount Value="72"/>
|
<UsageCount Value="85"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit26>
|
</Unit22>
|
||||||
<Unit27>
|
<Unit23>
|
||||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysstrh.inc"/>
|
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysstrh.inc"/>
|
||||||
<CursorPos X="10" Y="100"/>
|
<CursorPos X="10" Y="100"/>
|
||||||
<TopLine Value="86"/>
|
<TopLine Value="86"/>
|
||||||
<UsageCount Value="26"/>
|
<UsageCount Value="24"/>
|
||||||
</Unit27>
|
</Unit23>
|
||||||
<Unit28>
|
<Unit24>
|
||||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\xml\dom.pp"/>
|
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\xml\dom.pp"/>
|
||||||
<UnitName Value="DOM"/>
|
<UnitName Value="DOM"/>
|
||||||
<CursorPos X="3" Y="1387"/>
|
<CursorPos X="3" Y="1387"/>
|
||||||
<TopLine Value="1385"/>
|
<TopLine Value="1385"/>
|
||||||
<UsageCount Value="3"/>
|
|
||||||
</Unit28>
|
|
||||||
<Unit29>
|
|
||||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\inc\objpash.inc"/>
|
|
||||||
<CursorPos X="26" Y="139"/>
|
|
||||||
<TopLine Value="125"/>
|
|
||||||
<UsageCount Value="1"/>
|
<UsageCount Value="1"/>
|
||||||
</Unit29>
|
</Unit24>
|
||||||
<Unit30>
|
<Unit25>
|
||||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\inc\objpas.inc"/>
|
|
||||||
<CursorPos X="11" Y="360"/>
|
|
||||||
<TopLine Value="354"/>
|
|
||||||
<UsageCount Value="1"/>
|
|
||||||
</Unit30>
|
|
||||||
<Unit31>
|
|
||||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\classes\classesh.inc"/>
|
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\classes\classesh.inc"/>
|
||||||
<CursorPos X="14" Y="151"/>
|
<CursorPos X="14" Y="151"/>
|
||||||
<TopLine Value="137"/>
|
<TopLine Value="137"/>
|
||||||
<UsageCount Value="5"/>
|
<UsageCount Value="3"/>
|
||||||
</Unit31>
|
</Unit25>
|
||||||
<Unit32>
|
<Unit26>
|
||||||
<Filename Value="wsdl2pas_imp.pas"/>
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
<UnitName Value="wsdl2pas_imp"/>
|
<UnitName Value="wsdl2pas_imp"/>
|
||||||
<CursorPos X="16" Y="543"/>
|
<CursorPos X="73" Y="1810"/>
|
||||||
<TopLine Value="532"/>
|
<TopLine Value="1794"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<UsageCount Value="63"/>
|
<UsageCount Value="76"/>
|
||||||
<Bookmarks Count="1">
|
<Bookmarks Count="1">
|
||||||
<Item0 X="21" Y="659" ID="3"/>
|
<Item0 X="21" Y="659" ID="3"/>
|
||||||
</Bookmarks>
|
</Bookmarks>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit32>
|
</Unit26>
|
||||||
<Unit33>
|
<Unit27>
|
||||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysutils.inc"/>
|
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysutils.inc"/>
|
||||||
<CursorPos X="3" Y="567"/>
|
<CursorPos X="3" Y="567"/>
|
||||||
<TopLine Value="565"/>
|
<TopLine Value="565"/>
|
||||||
<UsageCount Value="3"/>
|
<UsageCount Value="1"/>
|
||||||
</Unit33>
|
</Unit27>
|
||||||
<Unit34>
|
<Unit28>
|
||||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\xml\xmlread.pp"/>
|
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\xml\xmlread.pp"/>
|
||||||
<UnitName Value="XMLRead"/>
|
<UnitName Value="XMLRead"/>
|
||||||
<CursorPos X="3" Y="954"/>
|
<CursorPos X="3" Y="954"/>
|
||||||
<TopLine Value="928"/>
|
<TopLine Value="928"/>
|
||||||
<UsageCount Value="3"/>
|
<UsageCount Value="1"/>
|
||||||
</Unit34>
|
</Unit28>
|
||||||
<Unit35>
|
<Unit29>
|
||||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\win32\classes.pp"/>
|
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\win32\classes.pp"/>
|
||||||
<UnitName Value="Classes"/>
|
<UnitName Value="Classes"/>
|
||||||
<CursorPos X="11" Y="43"/>
|
<CursorPos X="11" Y="43"/>
|
||||||
<TopLine Value="20"/>
|
<TopLine Value="20"/>
|
||||||
<UsageCount Value="3"/>
|
<UsageCount Value="1"/>
|
||||||
</Unit35>
|
</Unit29>
|
||||||
<Unit36>
|
<Unit30>
|
||||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\win\wininc\messages.inc"/>
|
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\win\wininc\messages.inc"/>
|
||||||
<CursorPos X="6" Y="1219"/>
|
<CursorPos X="6" Y="1219"/>
|
||||||
<TopLine Value="639"/>
|
<TopLine Value="639"/>
|
||||||
<UsageCount Value="3"/>
|
<UsageCount Value="1"/>
|
||||||
</Unit36>
|
</Unit30>
|
||||||
<Unit37>
|
<Unit31>
|
||||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\objpas\classes\classes.inc"/>
|
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\objpas\classes\classes.inc"/>
|
||||||
<CursorPos X="24" Y="20"/>
|
<CursorPos X="24" Y="20"/>
|
||||||
<TopLine Value="13"/>
|
<TopLine Value="13"/>
|
||||||
<UsageCount Value="3"/>
|
<UsageCount Value="1"/>
|
||||||
</Unit37>
|
</Unit31>
|
||||||
<Unit38>
|
<Unit32>
|
||||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\objpas\classes\classesh.inc"/>
|
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\objpas\classes\classesh.inc"/>
|
||||||
<CursorPos X="26" Y="301"/>
|
<CursorPos X="26" Y="301"/>
|
||||||
<TopLine Value="286"/>
|
<TopLine Value="286"/>
|
||||||
<UsageCount Value="3"/>
|
<UsageCount Value="1"/>
|
||||||
</Unit38>
|
</Unit32>
|
||||||
<Unit39>
|
<Unit33>
|
||||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\inc\objpash.inc"/>
|
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\inc\objpash.inc"/>
|
||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="319"/>
|
<TopLine Value="319"/>
|
||||||
<UsageCount Value="3"/>
|
<UsageCount Value="1"/>
|
||||||
</Unit39>
|
</Unit33>
|
||||||
<Unit40>
|
<Unit34>
|
||||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\inc\getopts.pp"/>
|
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\rtl\inc\getopts.pp"/>
|
||||||
<UnitName Value="getopts"/>
|
<UnitName Value="getopts"/>
|
||||||
<CursorPos X="49" Y="203"/>
|
<CursorPos X="49" Y="203"/>
|
||||||
<TopLine Value="10"/>
|
<TopLine Value="10"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="8"/>
|
||||||
</Unit40>
|
</Unit34>
|
||||||
<Unit41>
|
<Unit35>
|
||||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\packages\fcl-xml\src\dom.pp"/>
|
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\packages\fcl-xml\src\dom.pp"/>
|
||||||
<UnitName Value="DOM"/>
|
<UnitName Value="DOM"/>
|
||||||
<CursorPos X="27" Y="41"/>
|
<CursorPos X="27" Y="41"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="9"/>
|
<UsageCount Value="7"/>
|
||||||
</Unit41>
|
</Unit35>
|
||||||
<Unit42>
|
<Unit36>
|
||||||
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\packages\fcl-base\src\inc\avl_tree.pp"/>
|
<Filename Value="..\..\..\..\lazarus211\fpc\2.1.1\source\packages\fcl-base\src\inc\avl_tree.pp"/>
|
||||||
<UnitName Value="AVL_Tree"/>
|
<UnitName Value="AVL_Tree"/>
|
||||||
<CursorPos X="54" Y="156"/>
|
<CursorPos X="54" Y="156"/>
|
||||||
<TopLine Value="332"/>
|
<TopLine Value="332"/>
|
||||||
<UsageCount Value="5"/>
|
<UsageCount Value="3"/>
|
||||||
</Unit42>
|
</Unit36>
|
||||||
<Unit43>
|
<Unit37>
|
||||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\inc\contnrs.pp"/>
|
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\fcl\inc\contnrs.pp"/>
|
||||||
<UnitName Value="contnrs"/>
|
<UnitName Value="contnrs"/>
|
||||||
<CursorPos X="30" Y="685"/>
|
<CursorPos X="30" Y="685"/>
|
||||||
<TopLine Value="683"/>
|
<TopLine Value="683"/>
|
||||||
<UsageCount Value="5"/>
|
<UsageCount Value="3"/>
|
||||||
</Unit43>
|
</Unit37>
|
||||||
<Unit44>
|
<Unit38>
|
||||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\classes\lists.inc"/>
|
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\classes\lists.inc"/>
|
||||||
<CursorPos X="3" Y="29"/>
|
<CursorPos X="3" Y="29"/>
|
||||||
<TopLine Value="27"/>
|
<TopLine Value="27"/>
|
||||||
<UsageCount Value="5"/>
|
<UsageCount Value="3"/>
|
||||||
</Unit44>
|
</Unit38>
|
||||||
<Unit45>
|
<Unit39>
|
||||||
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysstr.inc"/>
|
<Filename Value="..\..\..\..\lazarusClean\fpc\2.0.4\source\rtl\objpas\sysutils\sysstr.inc"/>
|
||||||
<CursorPos X="1" Y="689"/>
|
<CursorPos X="1" Y="689"/>
|
||||||
<TopLine Value="686"/>
|
<TopLine Value="686"/>
|
||||||
<UsageCount Value="26"/>
|
<UsageCount Value="24"/>
|
||||||
</Unit45>
|
</Unit39>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="9" HistoryIndex="8">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="wsdl2pas_imp.pas"/>
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
<Caret Line="1159" Column="12" TopLine="1136"/>
|
<Caret Line="1537" Column="1" TopLine="1521"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="wsdl2pas_imp.pas"/>
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
<Caret Line="427" Column="11" TopLine="413"/>
|
<Caret Line="1640" Column="1" TopLine="1624"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="wsdl2pas_imp.pas"/>
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
<Caret Line="533" Column="32" TopLine="497"/>
|
<Caret Line="1783" Column="1" TopLine="1767"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="wsdl2pas_imp.pas"/>
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
<Caret Line="627" Column="22" TopLine="615"/>
|
<Caret Line="1638" Column="1" TopLine="1622"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="wsdl2pas_imp.pas"/>
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
<Caret Line="541" Column="52" TopLine="525"/>
|
<Caret Line="1537" Column="1" TopLine="1521"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="parserdefs.pas"/>
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
<Caret Line="333" Column="35" TopLine="312"/>
|
<Caret Line="1640" Column="1" TopLine="1624"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="parserdefs.pas"/>
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
<Caret Line="343" Column="34" TopLine="342"/>
|
<Caret Line="1537" Column="1" TopLine="1521"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="wsdl2pas_imp.pas"/>
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
<Caret Line="656" Column="66" TopLine="641"/>
|
<Caret Line="1640" Column="1" TopLine="1624"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="generator.pas"/>
|
<Filename Value="generator.pas"/>
|
||||||
<Caret Line="1837" Column="16" TopLine="1822"/>
|
<Caret Line="1452" Column="69" TopLine="1436"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
|
<Position10>
|
||||||
|
<Filename Value="generator.pas"/>
|
||||||
|
<Caret Line="1388" Column="40" TopLine="1372"/>
|
||||||
|
</Position10>
|
||||||
|
<Position11>
|
||||||
|
<Filename Value="generator.pas"/>
|
||||||
|
<Caret Line="1452" Column="96" TopLine="1436"/>
|
||||||
|
</Position11>
|
||||||
|
<Position12>
|
||||||
|
<Filename Value="generator.pas"/>
|
||||||
|
<Caret Line="1583" Column="38" TopLine="1567"/>
|
||||||
|
</Position12>
|
||||||
|
<Position13>
|
||||||
|
<Filename Value="generator.pas"/>
|
||||||
|
<Caret Line="1388" Column="40" TopLine="1372"/>
|
||||||
|
</Position13>
|
||||||
|
<Position14>
|
||||||
|
<Filename Value="generator.pas"/>
|
||||||
|
<Caret Line="1452" Column="96" TopLine="1436"/>
|
||||||
|
</Position14>
|
||||||
|
<Position15>
|
||||||
|
<Filename Value="parserdefs.pas"/>
|
||||||
|
<Caret Line="230" Column="3" TopLine="214"/>
|
||||||
|
</Position15>
|
||||||
|
<Position16>
|
||||||
|
<Filename Value="parserdefs.pas"/>
|
||||||
|
<Caret Line="1195" Column="41" TopLine="1179"/>
|
||||||
|
</Position16>
|
||||||
|
<Position17>
|
||||||
|
<Filename Value="parserdefs.pas"/>
|
||||||
|
<Caret Line="1186" Column="41" TopLine="1176"/>
|
||||||
|
</Position17>
|
||||||
|
<Position18>
|
||||||
|
<Filename Value="parserdefs.pas"/>
|
||||||
|
<Caret Line="258" Column="28" TopLine="235"/>
|
||||||
|
</Position18>
|
||||||
|
<Position19>
|
||||||
|
<Filename Value="parserdefs.pas"/>
|
||||||
|
<Caret Line="1215" Column="135" TopLine="1201"/>
|
||||||
|
</Position19>
|
||||||
|
<Position20>
|
||||||
|
<Filename Value="parserdefs.pas"/>
|
||||||
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
|
</Position20>
|
||||||
|
<Position21>
|
||||||
|
<Filename Value="parserdefs.pas"/>
|
||||||
|
<Caret Line="265" Column="3" TopLine="241"/>
|
||||||
|
</Position21>
|
||||||
|
<Position22>
|
||||||
|
<Filename Value="generator.pas"/>
|
||||||
|
<Caret Line="1452" Column="101" TopLine="1435"/>
|
||||||
|
</Position22>
|
||||||
|
<Position23>
|
||||||
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
|
<Caret Line="1531" Column="12" TopLine="1523"/>
|
||||||
|
</Position23>
|
||||||
|
<Position24>
|
||||||
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
|
<Caret Line="1602" Column="12" TopLine="1586"/>
|
||||||
|
</Position24>
|
||||||
|
<Position25>
|
||||||
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
|
<Caret Line="1604" Column="14" TopLine="1588"/>
|
||||||
|
</Position25>
|
||||||
|
<Position26>
|
||||||
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
|
<Caret Line="1616" Column="14" TopLine="1600"/>
|
||||||
|
</Position26>
|
||||||
|
<Position27>
|
||||||
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
|
<Caret Line="1395" Column="59" TopLine="1319"/>
|
||||||
|
</Position27>
|
||||||
|
<Position28>
|
||||||
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
|
<Caret Line="530" Column="40" TopLine="505"/>
|
||||||
|
</Position28>
|
||||||
|
<Position29>
|
||||||
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
|
</Position29>
|
||||||
|
<Position30>
|
||||||
|
<Filename Value="wsdl2pas_imp.pas"/>
|
||||||
|
<Caret Line="1809" Column="59" TopLine="1785"/>
|
||||||
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
@ -797,11 +797,22 @@ function TWsdlParser.ParseOperation(
|
|||||||
if IsStrEmpty(prmName) or IsStrEmpty(prmTypeName) or IsStrEmpty(prmTypeType) then begin
|
if IsStrEmpty(prmName) or IsStrEmpty(prmTypeName) or IsStrEmpty(prmTypeType) then begin
|
||||||
raise EWslParserException.CreateFmt('Invalid message part : "%s"',[tmpNode.NodeName]);
|
raise EWslParserException.CreateFmt('Invalid message part : "%s"',[tmpNode.NodeName]);
|
||||||
end;
|
end;
|
||||||
|
if SameText(s_document,ASoapBindingStyle) and
|
||||||
|
AnsiSameText(prmTypeType,s_element)
|
||||||
|
then begin
|
||||||
|
prmName := ExtractNameFromQName(prmTypeName);
|
||||||
|
end;
|
||||||
prmInternameName := Trim(prmName);
|
prmInternameName := Trim(prmName);
|
||||||
prmHasInternameName := IsReservedKeyWord(prmInternameName) or ( not IsValidIdent(prmInternameName) );
|
if AnsiSameText(prmInternameName,tmpMthd.Name) then begin
|
||||||
|
prmInternameName := prmInternameName + 'Param';
|
||||||
|
end;
|
||||||
|
prmHasInternameName := IsReservedKeyWord(prmInternameName) or
|
||||||
|
( not IsValidIdent(prmInternameName) ) or
|
||||||
|
( tmpMthd.GetParameterIndex(prmInternameName) >= 0 );
|
||||||
if prmHasInternameName then begin
|
if prmHasInternameName then begin
|
||||||
prmInternameName := '_' + prmInternameName;
|
prmInternameName := '_' + prmInternameName;
|
||||||
end;
|
end;
|
||||||
|
prmHasInternameName := not AnsiSameText(prmInternameName,prmName);
|
||||||
prmTypeDef := GetDataType(prmTypeName,prmTypeType);
|
prmTypeDef := GetDataType(prmTypeName,prmTypeType);
|
||||||
prmDef := tmpMthd.AddParameter(prmInternameName,pmConst,prmTypeDef);
|
prmDef := tmpMthd.AddParameter(prmInternameName,pmConst,prmTypeDef);
|
||||||
if prmHasInternameName then begin
|
if prmHasInternameName then begin
|
||||||
@ -859,11 +870,23 @@ function TWsdlParser.ParseOperation(
|
|||||||
prmTypeType := (tmpCrs.GetCurrent() as TDOMNodeRttiExposer).NodeName;
|
prmTypeType := (tmpCrs.GetCurrent() as TDOMNodeRttiExposer).NodeName;
|
||||||
if IsStrEmpty(prmName) or IsStrEmpty(prmTypeName) or IsStrEmpty(prmTypeType) then
|
if IsStrEmpty(prmName) or IsStrEmpty(prmTypeName) or IsStrEmpty(prmTypeType) then
|
||||||
raise EWslParserException.CreateFmt('Invalid message part : "%s"',[tmpNode.NodeName]);
|
raise EWslParserException.CreateFmt('Invalid message part : "%s"',[tmpNode.NodeName]);
|
||||||
|
if SameText(s_document,ASoapBindingStyle) and
|
||||||
|
AnsiSameText(prmTypeType,s_element)
|
||||||
|
then begin
|
||||||
|
prmName := ExtractNameFromQName(prmTypeName);
|
||||||
|
end;
|
||||||
prmInternameName := Trim(prmName);
|
prmInternameName := Trim(prmName);
|
||||||
prmHasInternameName := IsReservedKeyWord(prmInternameName) or ( not IsValidIdent(prmInternameName) );
|
if AnsiSameText(prmInternameName,tmpMthd.Name) then begin
|
||||||
|
prmInternameName := prmInternameName + 'Param';
|
||||||
|
end;
|
||||||
|
//prmHasInternameName := IsReservedKeyWord(prmInternameName) or ( not IsValidIdent(prmInternameName) );
|
||||||
|
prmHasInternameName := IsReservedKeyWord(prmInternameName) or
|
||||||
|
( not IsValidIdent(prmInternameName) ) or
|
||||||
|
( tmpMthd.GetParameterIndex(prmInternameName) >= 0 );
|
||||||
if prmHasInternameName then
|
if prmHasInternameName then
|
||||||
prmInternameName := '_' + prmInternameName;
|
prmInternameName := '_' + prmInternameName;
|
||||||
prmDef := tmpMthd.FindParameter(prmName);
|
prmHasInternameName := not AnsiSameText(prmInternameName,prmName);
|
||||||
|
prmDef := tmpMthd.FindParameter(prmInternameName);//(prmName);
|
||||||
if ( prmDef = nil ) then begin
|
if ( prmDef = nil ) then begin
|
||||||
prmDef := tmpMthd.AddParameter(prmInternameName,pmOut,GetDataType(prmTypeName,prmTypeType));
|
prmDef := tmpMthd.AddParameter(prmInternameName,pmOut,GetDataType(prmTypeName,prmTypeType));
|
||||||
if prmHasInternameName then begin
|
if prmHasInternameName then begin
|
||||||
@ -1012,11 +1035,15 @@ var
|
|||||||
FreeAndNil(locParser);
|
FreeAndNil(locParser);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frwType : TTypeDefinition;
|
||||||
begin
|
begin
|
||||||
embededType := False;
|
embededType := False;
|
||||||
|
Result := nil;
|
||||||
Result := FSymbols.Find(ExtractNameFromQName(AName),TTypeDefinition) as TTypeDefinition;
|
Result := FSymbols.Find(ExtractNameFromQName(AName),TTypeDefinition) as TTypeDefinition;
|
||||||
if ( not Assigned(Result) ) or ( Result is TForwardTypeDefinition ) then begin
|
if ( not Assigned(Result) ) or ( Result is TForwardTypeDefinition ) then begin
|
||||||
|
frwType := Result;
|
||||||
Result := nil;
|
Result := nil;
|
||||||
Init();
|
Init();
|
||||||
FindTypeNode();
|
FindTypeNode();
|
||||||
@ -1025,8 +1052,12 @@ begin
|
|||||||
end else if AnsiSameText(ExtractNameFromQName(typNd.NodeName),s_simpleType) then begin
|
end else if AnsiSameText(ExtractNameFromQName(typNd.NodeName),s_simpleType) then begin
|
||||||
Result := ParseSimpleType();
|
Result := ParseSimpleType();
|
||||||
end;
|
end;
|
||||||
if Assigned(Result) then
|
if Assigned(Result) then begin
|
||||||
|
if Assigned(frwType) and AnsiSameText(Result.ExternalName,frwType.ExternalName) then begin
|
||||||
|
TTypeDefinitionCrack(Result).SetName(frwType.Name);
|
||||||
|
end;
|
||||||
FSymbols.Add(Result);
|
FSymbols.Add(Result);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1121,9 +1152,9 @@ procedure TWsdlParser.Parse(const AMode : TParserMode);
|
|||||||
sym := FSymbols[i];
|
sym := FSymbols[i];
|
||||||
if ( sym is TForwardTypeDefinition ) then begin
|
if ( sym is TForwardTypeDefinition ) then begin
|
||||||
typeCursor.Reset();
|
typeCursor.Reset();
|
||||||
tmpNode := FindNamedNode(typeCursor,sym.Name);
|
tmpNode := FindNamedNode(typeCursor,sym.ExternalName);
|
||||||
if Assigned(tmpNode) then begin
|
if Assigned(tmpNode) then begin
|
||||||
ParseType(sym.Name,ExtractNameFromQName(tmpNode.NodeName));
|
ParseType(sym.ExternalName,ExtractNameFromQName(tmpNode.NodeName));
|
||||||
Dec(i);
|
Dec(i);
|
||||||
c := FSymbols.Count;
|
c := FSymbols.Count;
|
||||||
end else begin
|
end else begin
|
||||||
@ -1402,7 +1433,7 @@ begin
|
|||||||
if not locCrs.MoveNext() then
|
if not locCrs.MoveNext() then
|
||||||
raise EWslParserException.CreateFmt('Invalid extention/restriction of type "%s" : "base" attribute not found.',[FTypeName]);
|
raise EWslParserException.CreateFmt('Invalid extention/restriction of type "%s" : "base" attribute not found.',[FTypeName]);
|
||||||
locBaseTypeName := ExtractNameFromQName((locCrs.GetCurrent() as TDOMNodeRttiExposer).NodeValue);
|
locBaseTypeName := ExtractNameFromQName((locCrs.GetCurrent() as TDOMNodeRttiExposer).NodeValue);
|
||||||
locSymbol := FSymbols.Find(locBaseTypeName);//,TClassTypeDefinition);
|
locSymbol := FSymbols.Find(locBaseTypeName);
|
||||||
if Assigned(locSymbol) then begin
|
if Assigned(locSymbol) then begin
|
||||||
if locSymbol.InheritsFrom(TTypeDefinition) then begin
|
if locSymbol.InheritsFrom(TTypeDefinition) then begin
|
||||||
FBaseType := locSymbol as TTypeDefinition;
|
FBaseType := locSymbol as TTypeDefinition;
|
||||||
@ -1430,18 +1461,23 @@ end;
|
|||||||
|
|
||||||
function TComplexTypeParser.ParseComplexContent(const ATypeName : string) : TTypeDefinition;
|
function TComplexTypeParser.ParseComplexContent(const ATypeName : string) : TTypeDefinition;
|
||||||
|
|
||||||
function ExtractElementCursor():IObjectCursor;
|
function ExtractElementCursor(out AAttCursor : IObjectCursor):IObjectCursor;
|
||||||
var
|
var
|
||||||
frstCrsr, tmpCursor : IObjectCursor;
|
frstCrsr, tmpCursor : IObjectCursor;
|
||||||
parentNode, tmpNode : TDOMNode;
|
parentNode, tmpNode : TDOMNode;
|
||||||
begin
|
begin
|
||||||
Result := nil;
|
Result := nil;
|
||||||
|
AAttCursor := nil;
|
||||||
case FDerivationMode of
|
case FDerivationMode of
|
||||||
dmNone : parentNode := FContentNode;
|
dmNone : parentNode := FContentNode;
|
||||||
dmRestriction,
|
dmRestriction,
|
||||||
dmExtension : parentNode := FDerivationNode;
|
dmExtension : parentNode := FDerivationNode;
|
||||||
end;
|
end;
|
||||||
if parentNode.HasChildNodes() then begin;
|
if parentNode.HasChildNodes() then begin;
|
||||||
|
AAttCursor := CreateCursorOn(
|
||||||
|
CreateChildrenCursor(parentNode,cetRttiNode),
|
||||||
|
ParseFilter(CreateQualifiedNameFilterStr(s_attribute,FOwner.FXSShortNames),TDOMNodeRttiExposer)
|
||||||
|
);
|
||||||
frstCrsr := CreateChildrenCursor(parentNode,cetRttiNode);
|
frstCrsr := CreateChildrenCursor(parentNode,cetRttiNode);
|
||||||
tmpCursor := CreateCursorOn(
|
tmpCursor := CreateCursorOn(
|
||||||
frstCrsr.Clone() as IObjectCursor,
|
frstCrsr.Clone() as IObjectCursor,
|
||||||
@ -1538,10 +1574,20 @@ var
|
|||||||
if IsStrEmpty(locTypeName) then
|
if IsStrEmpty(locTypeName) then
|
||||||
raise EWslParserException.Create('Invalid <element> definition : empty "type".');
|
raise EWslParserException.Create('Invalid <element> definition : empty "type".');
|
||||||
locType := FSymbols.Find(locTypeName);
|
locType := FSymbols.Find(locTypeName);
|
||||||
if not Assigned(locType) then begin
|
if Assigned(locType) then begin
|
||||||
|
if locIsRefElement then begin
|
||||||
|
locTypeInternalName := locTypeName;
|
||||||
|
locTypeInternalName := locTypeInternalName + '_Type';
|
||||||
|
TTypeDefinitionCrack(locType).SetName(locTypeInternalName);
|
||||||
|
end;
|
||||||
|
end else begin
|
||||||
locTypeInternalName := locTypeName;
|
locTypeInternalName := locTypeName;
|
||||||
if IsReservedKeyWord(locTypeInternalName) then
|
if locIsRefElement then begin
|
||||||
|
locTypeInternalName := locTypeInternalName + '_Type';
|
||||||
|
end;
|
||||||
|
if IsReservedKeyWord(locTypeInternalName) then begin
|
||||||
locTypeInternalName := '_' + locTypeInternalName;
|
locTypeInternalName := '_' + locTypeInternalName;
|
||||||
|
end;
|
||||||
locType := TForwardTypeDefinition.Create(locTypeInternalName);
|
locType := TForwardTypeDefinition.Create(locTypeInternalName);
|
||||||
if not AnsiSameText(locTypeInternalName,locTypeName) then
|
if not AnsiSameText(locTypeInternalName,locTypeName) then
|
||||||
locType.RegisterExternalAlias(locTypeName);
|
locType.RegisterExternalAlias(locTypeName);
|
||||||
@ -1588,6 +1634,9 @@ var
|
|||||||
if isArrayDef then begin
|
if isArrayDef then begin
|
||||||
arrayItems.Add(locProp);
|
arrayItems.Add(locProp);
|
||||||
end;
|
end;
|
||||||
|
if AnsiSameText(s_attribute,ExtractNameFromQName(AElement.NodeName)) then begin
|
||||||
|
locProp.IsAttribute := True;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure GenerateArrayTypes(
|
procedure GenerateArrayTypes(
|
||||||
@ -1683,23 +1732,18 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
eltCrs : IObjectCursor;
|
eltCrs, eltAttCrs : IObjectCursor;
|
||||||
internalName : string;
|
internalName : string;
|
||||||
hasInternalName : Boolean;
|
hasInternalName : Boolean;
|
||||||
arrayDef : TArrayDefinition;
|
arrayDef : TArrayDefinition;
|
||||||
propTyp : TPropertyDefinition;
|
propTyp, tmpPropTyp : TPropertyDefinition;
|
||||||
tmpClassDef : TClassTypeDefinition;
|
tmpClassDef : TClassTypeDefinition;
|
||||||
i : Integer;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
ExtractBaseType();
|
ExtractBaseType();
|
||||||
eltCrs := ExtractElementCursor();
|
eltCrs := ExtractElementCursor(eltAttCrs);
|
||||||
|
|
||||||
internalName := ExtractIdentifier(ATypeName);
|
internalName := ExtractIdentifier(ATypeName);
|
||||||
{ while IsReservedKeyWord(internalName) or ( FSymbols.IndexOf(internalName) <> -1 ) do begin
|
|
||||||
internalName := Format('_%s',[internalName]);
|
|
||||||
end;
|
|
||||||
hasInternalName := ( not AnsiSameText(internalName,ATypeName) );
|
|
||||||
}
|
|
||||||
hasInternalName := IsReservedKeyWord(internalName) or
|
hasInternalName := IsReservedKeyWord(internalName) or
|
||||||
( not IsValidIdent(internalName) ) or
|
( not IsValidIdent(internalName) ) or
|
||||||
//( FSymbols.IndexOf(internalName) <> -1 ) or
|
//( FSymbols.IndexOf(internalName) <> -1 ) or
|
||||||
@ -1726,17 +1770,24 @@ begin
|
|||||||
(FSymbols.ByName('base_service_intf') as TSymbolTable)
|
(FSymbols.ByName('base_service_intf') as TSymbolTable)
|
||||||
.ByName('TBaseComplexRemotable') as TClassTypeDefinition
|
.ByName('TBaseComplexRemotable') as TClassTypeDefinition
|
||||||
);
|
);
|
||||||
if Assigned(eltCrs) then begin
|
if Assigned(eltCrs) or Assigned(eltAttCrs) then begin
|
||||||
isArrayDef := False;
|
isArrayDef := False;
|
||||||
eltCrs.Reset();
|
if Assigned(eltCrs) then begin
|
||||||
while eltCrs.MoveNext() do begin
|
eltCrs.Reset();
|
||||||
ParseElement((eltCrs.GetCurrent() as TDOMNodeRttiExposer).InnerObject);
|
while eltCrs.MoveNext() do begin
|
||||||
|
ParseElement((eltCrs.GetCurrent() as TDOMNodeRttiExposer).InnerObject);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if Assigned(eltAttCrs) then begin
|
||||||
|
eltAttCrs.Reset();
|
||||||
|
while eltAttCrs.MoveNext() do begin
|
||||||
|
ParseElement((eltAttCrs.GetCurrent() as TDOMNodeRttiExposer).InnerObject);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
if ( arrayItems.Count > 0 ) then begin
|
if ( arrayItems.Count > 0 ) then begin
|
||||||
if ( arrayItems.Count = 1 ) and ( classDef.PropertyCount = 1 ) then begin
|
if ( arrayItems.Count = 1 ) and ( classDef.PropertyCount = 1 ) then begin
|
||||||
Result := nil;
|
Result := nil;
|
||||||
propTyp := arrayItems[0] as TPropertyDefinition;
|
propTyp := arrayItems[0] as TPropertyDefinition;
|
||||||
//arrayDef := TArrayDefinition.Create(internalName,(arrayItemType as TTypeDefinition),arrayItemName);
|
|
||||||
arrayDef := TArrayDefinition.Create(internalName,propTyp.DataType,propTyp.Name,propTyp.ExternalName,asScoped);
|
arrayDef := TArrayDefinition.Create(internalName,propTyp.DataType,propTyp.Name,propTyp.ExternalName,asScoped);
|
||||||
FreeAndNil(classDef);
|
FreeAndNil(classDef);
|
||||||
Result := arrayDef;
|
Result := arrayDef;
|
||||||
@ -1753,7 +1804,10 @@ begin
|
|||||||
for i := 0 to Pred(tmpClassDef.PropertyCount) do begin
|
for i := 0 to Pred(tmpClassDef.PropertyCount) do begin
|
||||||
propTyp := tmpClassDef.Properties[i];
|
propTyp := tmpClassDef.Properties[i];
|
||||||
if ( arrayItems.IndexOf(propTyp) = -1 ) then begin
|
if ( arrayItems.IndexOf(propTyp) = -1 ) then begin
|
||||||
classDef.AddProperty(propTyp.Name,propTyp.DataType);
|
tmpPropTyp := classDef.AddProperty(propTyp.Name,propTyp.DataType);
|
||||||
|
tmpPropTyp.IsAttribute := propTyp.IsAttribute;
|
||||||
|
tmpPropTyp.StorageOption := propTyp.StorageOption;
|
||||||
|
tmpPropTyp.RegisterExternalAlias(propTyp.ExternalName);
|
||||||
end else begin
|
end else begin
|
||||||
classDef.AddProperty(
|
classDef.AddProperty(
|
||||||
propTyp.Name,
|
propTyp.Name,
|
||||||
|
Reference in New Issue
Block a user