Commit Graph

65 Commits

Author SHA1 Message Date
Jaakko Salli
0bf14ab8b1 wxVariant <-> wxAny conversion functionality. Includes implicit construction of wxAny from wxVariant, and vice versa. wxVariant->wxAny conversion is implemented by adding new virtual member function into wxVariantData. wxAny->wxVariant conversion is implemented by associating wxAnyValueTypes with functions that generate wxVariantData instances (using a hash map).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-16 14:33:52 +00:00
Jaakko Salli
4e00b90802 Added support for wxLongLong and wxULongLong in wxVariant (closes #10166)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-15 22:43:27 +00:00
Jaakko Salli
cf25a599cd Converted wxVariant to use wxObject's reference counting facilities. Should make sense as wxVariant already derived from wxObject and now wxVariantData inherits wxRefCounter/wxObjectRefData.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-13 14:55:45 +00:00
Robert Roebling
6d37c1b773 Rename wxObjectDataRef wxRefCounter, use it in wxVariant
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-12 20:16:07 +00:00
Vadim Zeitlin
92ffc98a08 reuse wxObjectRefData for various ref-counted classes (closes #10886)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-12 17:14:28 +00:00
Václav Slavík
de4983f323 split wxCharTypeBuffer<T> into wxScopedCharTypeBuffer<T> and wxCharTypeBuffer<T> -- the former is for transient data with validity limited to parent's lifetime, the latter is for permanent storage of string data (bug #9638)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-27 15:33:55 +00:00
Vadim Zeitlin
4c1d5d5ae2 remove tests for bool and {const,static,reinterpret}_cast in configure and wx/defs.h, all supported compilers have them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-02 02:16:09 +00:00
Vadim Zeitlin
1e6b2edfc8 remove ODBC and DBgrid libraries
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-23 13:40:27 +00:00
Julian Smart
c8058a09e5 Added wxVariantData::Clone and wxVariant::Unshare
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-19 15:01:54 +00:00
Robert Roebling
9a0a58f5af Use typesafe wxVariantList in wxVariant instead of wxList
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-13 12:11:51 +00:00
Robert Roebling
7e6b478087 define typesafe wxVariantList (to be used by wxVariant instead of wxList
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-13 11:57:48 +00:00
Robert Roebling
3586d10f72 wxVariantData no longer inherits from wxObject
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-13 11:45:34 +00:00
Václav Slavík
af717fa87a fixed to make wxVariant compatible with both ANSI and Unicode modes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-06 23:02:16 +00:00
Vadim Zeitlin
c1dc9f8394 removed WXWIN_COMPATIBILITY_2_4 from common and wxMSW files (patch 1675546)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-07 11:35:04 +00:00
Vadim Zeitlin
5ffa72f49f use wxEMPTY_PARAMETER_VALUE to ensure that nested macro calls get correct number of parameters even when expdecl passed to the outer macro is empty (as happens in static builds)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-03 21:37:08 +00:00
Vadim Zeitlin
01df01eb19 added IMPLEMENT_VARIANT_OBJECT_SHALLOWCMP(classname) macro for consistency
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-03 21:25:59 +00:00
Vadim Zeitlin
bde626ce30 don't define EMPTY_PARAMETER_VALUE macro without wx prefix, this is an invitation for name clash; instead define wxEMPTY_PARAMETER_VALUE and use it in both variant.h and event.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-03 21:06:57 +00:00
Vadim Zeitlin
a3ab1c1801 renamed IsRefTo() to IsSameAs() (do complain if this is not more clear) and
changed its signature to take a const reference instead of a pointer which
simplifies the code and makes it safer as well


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-30 22:03:53 +00:00
Vadim Zeitlin
55ccdb93e4 COW cleanup patch (1583966):
1. perform deep comparison for the classes for which it makes sense in the
   ports where this wasn't done yet
2. remove (shallow) comparison operators for the classes for which it does
   not make sense (such as wxBitmap)
3. makes wxBitmap use COW on all ports
4. adds wxObject::IsRefTo()
5. centralizes and improves COW docs


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-30 19:26:48 +00:00
Vadim Zeitlin
39a485512a put expdecl in the correct place in DECLARE/IMPLEMENT_VARIANT_OBJECT_EXPORTED
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-02 09:00:12 +00:00
Włodzimierz Skiba
07502d7351 Warning fixes after char->wxChar in wxVariant.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-02 07:09:20 +00:00
Robert Roebling
38f82bf695 Missed these in the char -> wxChar change.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-30 21:01:04 +00:00
Robert Roebling
6f5d78250c Move wxVariant support for GDI classes to their
files (and thus away from wxBase).
  Add export declaration field for variant macros.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-30 20:45:15 +00:00
Robert Roebling
3f90a3994d Added DECLARE_VARIANT_OBJECT macros for easy conversion
from and to wxVariant using the shift left operator.
  Use the for GDI classes and wxImage.
  Document it.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-30 15:37:52 +00:00
Robert Roebling
71520754fc Changed char to wxChar.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-30 11:29:52 +00:00
Robert Roebling
2562c82329 Applied ref-couting patch.
Completely reorganized code (more readable to me).
  Minor other changes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-30 11:20:14 +00:00
Robert Roebling
2f62094615 Added wxVariant's =, == and != operators for wxObject*
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-26 21:08:23 +00:00
Robert Roebling
63574b81fa Make GetWxObjectPtr() const.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-26 20:16:24 +00:00
Vadim Zeitlin
d5dc103fd4 added wxUSE_VARIANT guards
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-25 12:55:25 +00:00
Vadim Zeitlin
d3c7fc996a mark all dtors which are virtual because base class dtor is virtual explicitly virtual themselves
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-05 20:47:48 +00:00
Włodzimierz Skiba
43f06cfda1 Line-up interfaces to use size_t for GetCount()s (and count related api).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-12 14:49:25 +00:00
Mart Raudsepp
8907154c1a Nuke #pragma implementation/interface's
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-23 12:56:45 +00:00
Julian Smart
99d800190a Added licence/copyright information
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-04 18:57:50 +00:00
Ryan Norton
2c3a10641d depereciate stringlist stuff in wxVariant
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-02-07 22:51:30 +00:00
Włodzimierz Skiba
6fb99eb3b7 Semicolon fixes according to Vadim's note about being danger (OW,BCC,MinGW,DMC tested).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-13 14:04:19 +00:00
Włodzimierz Skiba
cab1a6053d Source cleaning: whitespaces, tabs, -1/wxID_ANY/wxNOT_FOUND/wxDefaultCoord, TRUE/true, FALSE/false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-24 14:32:35 +00:00
Ryan Norton
8715d2d3c2 Add doc TODOs for wxVariant. You know, Convert wasn't documented _at all_, heh :).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-24 01:20:18 +00:00
Julian Smart
655719367a Use old licence name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 20:53:33 +00:00
Julian Smart
77ffb5937e Name and version changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 14:56:36 +00:00
Mattia Barbon
878d055d0b Match changes in DECLARE_*_CLASS.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-10-24 21:28:56 +00:00
Václav Slavík
1202890513 added support for gcc precompiled headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-09 12:38:21 +00:00
Mattia Barbon
4c3ebca927 Fix some compilation and linking errors in samples.
Replace some calls to wxString::getWriteBuffer with
wxStringBuffer.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-19 15:05:08 +00:00
Vadim Zeitlin
bddd7a8d89 renamed WXDLLEXPORT_BASE/CORE to WXDLLIMPEXP_BASE/CORE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-02 01:59:24 +00:00
Vadim Zeitlin
886dd7d28e fixes needed for separate DLL build to work
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-02 01:41:23 +00:00
Roger Gammans
cf6ae2907c Addition at simple wxObject*, support into wxVariant.
This includes 2 new methods wxVariant::IsValueKindOf() and
wxVariantData::GetValueClassInfo() to allow query of the
wxRTTI data of the variant's data.

Also included is a macro analogues to dynamicCast for fetching
objects out of a wxVariant.

Documentation patches for the above.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-06-02 21:17:28 +00:00
Julian Smart
2ab25aca26 Removed obsolete wxDate and wxTime classes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-03-23 20:14:19 +00:00
Vadim Zeitlin
e2b87f38d9 allow compilation with wxUSE_DATETIME == 0 (patch 679822)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-02-06 00:53:46 +00:00
Vadim Zeitlin
65f19af139 added iosfwrap.h (wrapper for <iosfwd>)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-01-26 00:12:12 +00:00
Gilles Depeyrot
af49c4b8a2 disable use of #pragma interface under Mac OS X
GNU compiler included with Mac OS X 10.2 (Jaguar) as well as August Developer
Tools update contain a bug concerning #pragma interface handling that can only
be worked around by not using them (and they are not necessary anyways)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-31 11:29:13 +00:00
Julian Smart
9708db208d Applied [ 586524 ] wxVariant Enhancements.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-01 20:00:55 +00:00