Topic
  • 2 replies
  • Latest Post - ‏2012-02-08T09:42:42Z by SystemAdmin
SystemAdmin
SystemAdmin
1305 Posts

Pinned topic Adding Base type of Typedef.

‏2012-01-23T08:03:51Z |
Hi,

I want to add a type - Typedef and set its bse type.

I was able to add type and set its kind to Typedef

IRPType type = class.addType("typeVariable");
type.setKind("Typedef");

but to set the base type of this typedef

IRPClassifier typedefBaseType = ? (I could not find a way to create this object )

type.setTypedefBaseType(typedefBaseTypeClassifier);

a IRPClassifier object is required to pass as an argument. Can some one help me out in creating the right Classifier to be sent as an argument to setTypedefBaseType() API.
Regards
Rajath
Updated on 2012-02-08T09:42:42Z at 2012-02-08T09:42:42Z by SystemAdmin
  • ZvikaV.
    ZvikaV.
    16 Posts

    Re: Adding Base type of Typedef.

    ‏2012-01-29T09:49:04Z  
    Hi Rajath,

    It depends if you want to put there a Class or a Type.
    Class can be added to a package using the addClass method and Type can be added to a package using the addType method.
    Both are derived from IRPClassifier.

    Regards,
    Zvika.
  • SystemAdmin
    SystemAdmin
    1305 Posts

    Re: Adding Base type of Typedef.

    ‏2012-02-08T09:42:42Z  
    • ZvikaV.
    • ‏2012-01-29T09:49:04Z
    Hi Rajath,

    It depends if you want to put there a Class or a Type.
    Class can be added to a package using the addClass method and Type can be added to a package using the addType method.
    Both are derived from IRPClassifier.

    Regards,
    Zvika.
    Thanks ZvikaV, Finally it worked great.

    Regards,
    Rajath