How to create BaseClassInfo if I just have a name

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to create BaseClassInfo if I just have a name

Ming Cheng
Hi,

public BaseClassInfo(ITypeInfo type, ASTAccessVisibility access, boolean isVirtual) {
fType = type;
fAccess = access;
fIsVirtual = isVirtual;
}

Or the question eventually could become how to create an object of ITypeInfo from string name with other necessary hard-coded value?

Thanks.

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to create BaseClassInfo if I just have a name

Nathan Ridge
> Or the question eventually could become how to create an object
> of ITypeInfo from string name with other necessary hard-coded value?

If the string names a type in the current source file, you can find an IASTName referencing this type, and use ASTTypeInfo.create(IASTName).

If the string names a type in an included header file, you can find it in the index and use IndexTypeInfo.create().

Hope that helps,
Nate
_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to create BaseClassInfo if I just have a name

Ming Cheng

Nate,

 

Thanks. Very helpful.

 

Sent from Mail for Windows 10

 


From: [hidden email] <[hidden email]> on behalf of Nathan Ridge <[hidden email]>
Sent: Tuesday, March 17, 2020 10:54:41 PM
To: [hidden email] <[hidden email]>
Subject: Re: [cdt-dev] How to create BaseClassInfo if I just have a name
 
> Or the question eventually could become how to create an object
> of ITypeInfo from string name with other necessary hard-coded value?

If the string names a type in the current source file, you can find an IASTName referencing this type, and use ASTTypeInfo.create(IASTName).

If the string names a type in an included header file, you can find it in the index and use IndexTypeInfo.create().

Hope that helps,
Nate
_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev