Book a Demo

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Richard Fasang

Pages: [1]
1
General Board / Reverse eng. of method with ellipse "..." as param
« on: May 13, 2010, 03:15:10 pm »
Hello,

I have following problem with EA7.5 related to reverse engineering of C++ code containing method with ellipses as parameter.

Example:
Code: [Select]
class IDebugService
{
public:
virtual void debugValues(DWORD zHandle, void *pvFirst, ...) = 0;
}

EA has imported parameters like (btw how to put picture here?):
Quote
Parameters: zHandle: Dword, pvFirst: void *, prm1: ...
with sign '?' in dialog window indicating, that EA has problems with evaluation.

When I will make forward enginering from that stuff result is:
Code: [Select]
class IDebugService
{
public:
virtual void debugValues(Dword zHandle, void * pvFirst, ... [highlight]prm1[/highlight]) =0;
}

what is not valid syntax. While playing with change of parameters for method in EA shows me, that EA will not accept simple '...' there.

Do you have some idea how to solve that C/C++ syntax properly?

Regards,
Richard Fasang

2
Bugs and Issues / Re: C++ generate source parameter as reference
« on: June 01, 2010, 02:04:27 pm »
Quote
One reason, is that in order for generation to use in/out we would need to reverse engineer pointers or references as either as in/out.  Which would then create problems with generation in systems where a mixture of references and pointers are used.

The other thing is that it doesn't actually solve the problem with needing to append to append a reference character to the type because you could have pointer to a pointer, you could have parameters passed by reference that you explicitly want to declare as in only etc.

Yes, it looks like serious problem. I think that it is better to use explicit '*' in parameter specification. It is not problem at all, but anoying is that EA will not trace change of parameter type name.

Is it possible to change EA in way, that you are able to trace that stuff even if parameter type will have additional '*'? E.g. If I use class 'IINIFileService' and change parameter type to 'IINIFileService *' (space delimited), will be possible to trace change IINIFileService class name?

Regards,
Richard Fasang

3
Bugs and Issues / Re: C++ generate source parameter as reference
« on: May 31, 2010, 02:52:26 pm »
Quote
Exactly, there is a mismatch between your templates and the way EA interprets the code being generated.  Precisely why I didn't recommend changing templates as an option.

thnx, I will study templates to change generation for C++.

Let me but ask one question: Is there reason why for C++ is [in/out] not taken into account? I think (but I am just a BFU) [in/out] are references therefore it shouldbe easy to generate source with specified reference character e.g. '*'.

Regards,
Richard Fasang

4
Bugs and Issues / Re: C++ generate source parameter as reference
« on: May 28, 2010, 03:27:03 pm »
Thank You very much for answer,

I used also suggested way in past but it has following disadvantage:

When I change name of class (e.g. when making refactoring) EA changes all places where original class was used *except* parameters (I think EA assumes 'INIFileService*' has nothing to do with 'INIFileService')

Is it possible to solve that issue somehow?

Regards,
Richard Fasang

5
Bugs and Issues / C++ generate source parameter as reference
« on: May 26, 2010, 07:00:17 pm »
Hello,

with EA8.0.856 I have tried to generate C++ code (Ansi).

1. I have tried design class with operation using parameter passed as reference "+ Abstract Pure readConfiguration ([inout] Fixed poReadConfigurationService: IINIFileService): void"

2. I have set also in C++ to use pointer as default for references (Tools | Options | Source Code Engineering | C++ dialog)

3. I have set also to highlight reference with '*' as described in help topic "Operation Parameters by Reference"

Highlight in EA works well and I see '*' in graphic class representation.
Generate of C++ but generates method without '*' which I expects to be there because of points 1 and 2. Here is result of code generation:

virtual void readConfiguration(const IINIFileService poReadConfigurationService) =0;

What's wrong?

Regards,
Richard Fasang

6
Thank You for all replies.

Quote
Richard is actually correct. That technology file does modify the reverse engineering of C++.

It's possible to make limited changes by this method, but it's not complicated and supported in any way.

So, one important thing: I was right and it is possible to control reverse engineering in this way! As this is but limited and not supported feature I should probably find another way. :(

Hmmm, seems to be most efficient way how to solve problems with reverse engineering to make addin and process what was created in UML by reverse engineering afterwards...

What si reason to not use similar mechanism as for forward engineering to control reverse engineering?

IMHO: Put similar stuff into hands of users and everybody will love You...  :)

Regards,
Richard Fasang


7
Hello together,

I have found MDG technology XML file for Symbian C++ here: http://www.sparxsystems.com/resources/mdg_tech/symbian_cpp.html

I understand how to control generation of code when classifier has some specific stereotype, using code template editor.

I do not understand but how it is controlled reverse engineering in that technology to set stereotype of new classifier when macro is used in source code for class) >:(

How it is possible to control reverse engineering in MDG generally?

I want for example set new classifier element type to Interface while C++ reverse engineering when used some macro in C++ header file. Reason is that actually EA imports from C++ everything as class into UML model.

Thanks a lot,
Richard Fasang


Pages: [1]