Sign in to follow this  
_orm_

Classes Across Modules

Recommended Posts

_orm_    112
It was not very clear to me on whether or not one is able to access whole classes across modules. I know functions can be imported, but can we say the same for classes? Is it just a matter of importing their constructors?

Share this post


Link to post
Share on other sites
WitchLord    4677
You cannot import a constructor, but you can import a function that would create a class and return a handle to that class through an interface that both modules understand.

The other module will only be able to work with the class through the interface though. Trying to cast the handle to the class type will return a null handle even if the same class has been implemented in both modules.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this