Abstract classes and RTTI

Bryan Bulten <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.wxnet
Message-ID <[email protected]>
Hello,

I am unsure where to proceed when dealing with abstract classes, for
example, wxSizer.

In Window.cs, I haven't yet implemented Window::Sizer { get { ... } },
since wx::Sizer is abstract, it must use some sort of type information
to create the appropriate subclass.

The two possible ways to do this are as follows:

   1. Create a typemap as is done with wx::Event, and subclass each of
      the wxSizer subclasses, adding a method to grab some sort of type
      id.

   2. Use the C++ RTTI information to grab the type of each wxSizer
      subclass at runtime, then use this information to create a
      typemap.

Solution 1 seems like a hack, and I am rather unfamiliar with using RTTI
in solution 2.  I have no idea how cross-compiler/platform using RTTI
is;  for example, I believe that VS.NET requires additional settings to
be added in order to use RTTI.

Currently, I am just messing around with RTTI, and trying to store a
typemap in wx::Object, so that it can be used for other classes without
to much work.

Any suggestions for what I could try here?

-- 
Bryan Bulten
http://opendev.ods.org/
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+eXzf32WFWIzmzHgRAuakAJ9pAuRDkwB0gDbjOWJMqgtJFtxzPACfXmcy
8qxg+AiTEynylyS4AIYKQQ0=
=6J4a
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.