Logrus
Topic Author
Posts: 19
Joined: 22 Jul 2015, 12:16

TypeClass* from Type*

03 Jan 2021, 15:13

Hi,
how get Noesis::TypeClass* from Noesis::Symbol or Noesis::Type* ?

Tags:
 
User avatar
jsantos
Site Admin
Posts: 3015
Joined: 20 Jan 2012, 17:18
Contact:

Re: TypeClass* from Type*

03 Jan 2021, 15:44

If you know the Type is a TypeClass just a simple cast is enough:
TypeClass* typeClass = (TypeClass*)type;
But if the type may be something different then you can do a dynamic cast:
TypeClass* typeClass = DynamicCast<TypeClass*>(type);
if (typeClass) { ... }
 
Logrus
Topic Author
Posts: 19
Joined: 22 Jul 2015, 12:16

Re: TypeClass* from Type*

03 Jan 2021, 20:44

Thank

Who is online

Users browsing this forum: MiBa and 0 guests