Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] C Structure fields analysis

> For each member I want to know the name, the type,
> if it is an array (in that case the size) and if it is a pointer.
> But I don't see how to retrieve those informations from
> a CASTSimpleDeclaration instance.

Once you have the IASTCompositeTypeSpecifier, you can
get the struct's name from it (getName()), and call
resolveBinding() on it to get an ICPPClassType. I believe
that has a getFields() method which returns an IField[],
and IField has a getType() method.

Hope that helps,
Nate


Back to the top