Can wxVariant be used as a direct ("plugin") replacement for
COleVariant?
Dave Bee
davebeeus at yahoo.com
Thu Nov 22 09:22:35 PST 2007
--- Vadim Zeitlin <vadim at wxwidgets.org> wrote:
> On Thu, 22 Nov 2007 07:49:17 -0800 (PST) Dave Bee
> <davebeeus at yahoo.com> wrote:
>
> DB> In short, I am simply interested to know whether
> DB> wxVariant was indeed designed to be a direct
> DB> replacement for COleVariant?
>
> No, absolutely not.
>
OK, thanks. That definitely helps me think in a new
direction. I noticed that while COleVariant is made of
an incredibly complex union of a structure of a union
of structures... wxVariant uses a pointer to the
abstract wxVariantData class which is
realized/instantiated only in its (many) constructors.
This fundamental difference is intriguing considering
the fact that the interface of the member functions of
wxVariant is almost identical to those of COleVariant.
Compare:
wxVariant();
wxVariant(double val);
wxVariant(long val);
wxVariant(bool val);
wxVariant(char val);
wxVariant(const wxString& val);
wxVariant(const wxChar* val);
wxVariant(const wxDateTime& val);
to:
COleVariant();
COleVariant(double dblSrc);
COleVariant(long lSrc, VARTYPE vtSrc = VT_I4);
{ no bool ctor }
COleVariant(BYTE nSrc);
COleVariant(CString& strSrc);
COleVariant(LPCTSTR lpszSrc);
COleVariant(const COleDateTime& timeSrc);
Regards,
Dave
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
More information about the wx-users
mailing list