]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/dataform.h
check that the conversion to wxDateTime was really successful
[wxWidgets.git] / include / wx / os2 / dataform.h
CommitLineData
2e1a688e 1///////////////////////////////////////////////////////////////////////////////
e7549107 2// Name: mac/dataform.h
2e1a688e 3// Purpose: declaration of the wxDataFormat class
e7549107 4// Author: Stefan Csomor
2e1a688e
DW
5// Modified by:
6// Created: 10/21/99
7// RCS-ID: $Id$
e7549107 8// Copyright: (c) 1999 Stefan Csomor
65571936 9// Licence: wxWindows licence
2e1a688e
DW
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_OS2_DATAFORM_H
13#define _WX_OS2_DATAFORM_H
14
15class wxDataFormat
16{
17public:
4fd899b6 18 wxDataFormat(unsigned int uFormat = wxDF_INVALID) { m_uFormat = uFormat; }
a1eb65c2 19 wxDataFormat(const wxString& zFormat) { SetId(zFormat); }
2e1a688e 20
4fd899b6
DW
21 wxDataFormat& operator=(unsigned int uFormat) { m_uFormat = uFormat; return(*this); }
22 wxDataFormat& operator=(const wxDataFormat& rFormat) {m_uFormat = rFormat.m_uFormat; return(*this); }
2e1a688e 23
4fd899b6
DW
24 //
25 // Comparison (must have both versions)
26 //
27 bool operator==(wxDataFormatId eFormat) const { return (m_uFormat == (unsigned int)eFormat); }
28 bool operator!=(wxDataFormatId eFormat) const { return (m_uFormat != (unsigned int)eFormat); }
29 bool operator==(const wxDataFormat& rFormat) const { return (m_uFormat == rFormat.m_uFormat); }
30 bool operator!=(const wxDataFormat& rFormat) const { return (m_uFormat != rFormat.m_uFormat); }
31 operator unsigned int(void) const { return m_uFormat; }
2e1a688e 32
4fd899b6
DW
33 unsigned int GetFormatId(void) const { return (unsigned int)m_uFormat; }
34 unsigned int GetType(void) const { return (unsigned int)m_uFormat; }
2e1a688e 35
4fd899b6 36 bool IsStandard(void) const;
2e1a688e 37
4fd899b6 38 void SetType(unsigned int uType){ m_uFormat = uType; }
2e1a688e 39
4fd899b6
DW
40 //
41 // String ids are used for custom types - this SetId() must be used for
2e1a688e 42 // application-specific formats
4fd899b6
DW
43 //
44 wxString GetId(void) const;
a1eb65c2 45 void SetId(const wxString& pId);
2e1a688e
DW
46
47private:
4fd899b6
DW
48 unsigned int m_uFormat;
49}; // end of CLASS wxDataFormat
2e1a688e
DW
50
51#endif // _WX_GTK_DATAFORM_H