![]() |
Telelogic TAU (steve huntington) | ![]() |
Topic Title: C++ API of Tau G2 Developer Topic Summary: What is right API to use to get the definitions 'syntype x=Integer Constants (0..50) ;' Created On: 23-Aug-2005 12:29 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi,
I could get the name, type and also meta feature using the Tau C++ API while parsing the U2 file. Is there any way to the GUID of the type and also constants clause details using the Tau C++ API. |
|
![]() |
|
![]() |
|
Have you installed the SDK? This addin is a debugger that allows you to browse in a debug mode though the model.
|
|
![]() |
|
![]() |
|
The debugger (DbgView) that comes with the SDK is often all you need to browse the structure of a model. However, it has a limitation that it doesn't show all information that is available on references. It only shows the target definition if the reference is bound.
In your example the "Type" metafeature of the syntype would show "Integer" in the debugger. However, in general a reference (e.g. the type reference) can contain much more information, such as actual template parameters, scope qualifiers etc. To get complete information about a reference you can use the GetReference API operation. The following Tcl script supplements the model debugger by showing full reference information for the selected entity: set r [u2::GetReference [std::GetSelection] "Type"] std::output [u2::XMLEncode $r] The output can look like this: If the reference is bound (like in this example) the GUID of the target definition is present as shown above. But in that case it is of course also possible to navigate to the type directly (GetEntity) and then access the guid from it (GetValue). Edited: 24-Jan-2006 at 08:49 by Mattias Mohlin |
|
![]() |
Telelogic TAU
» TAU/Developer
»
C++ API of Tau G2 Developer
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.