home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1998 September / dppcpro0998.iso / Rwc / Sybase / Install.exe / hpp.z / dtjtyped.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-25  |  7.0 KB  |  262 lines

  1. #ifndef _DTJTYPED_HPP
  2. #define _DTJTYPED_HPP
  3.  
  4. #include <stddef.h>
  5. #include "dttyped.hpp"
  6.  
  7. #define TYPE_ALIAS( _base, _alias )    \
  8. typedef DT ## _base DT ## _alias;
  9.  
  10. class METAEXPORTCLASSDEF DTType_JRect : public DTType_WRect {
  11.     public:
  12.         DTType_JRect( const MMType * imp ) : DTType_WRect( imp ) {}
  13.     ~DTType_JRect() {}
  14.  
  15.     virtual WBool            Textify( WString &, DT_Textify ) const;
  16.     virtual WBool            DeTextify( const WString &, DT_Textify );
  17.  
  18.     static DTType *            Instantiate( const MMType * );
  19. };
  20.  
  21. class METAEXPORTCLASSDEF DTType_Color : public DTType_WColor {
  22.     public:
  23.     DTType_Color( const MMType * imp );
  24.     ~DTType_Color();
  25.  
  26.     virtual WBool            Textify( WString &, DT_Textify ) const;
  27.     virtual WBool            DeTextify( const WString &, DT_Textify );
  28.  
  29.     virtual WBool            operator==( const DTType & o );
  30.  
  31.     virtual WBool            Set( const WColor & val );
  32.     virtual const WColor &        Get() const;
  33.  
  34.     virtual WBool            Browse( WWindow * parent, DTObject * obj );
  35.  
  36.     virtual WUInt            GetNumValues();
  37.     virtual WString            GetValue( WUInt i );
  38.  
  39.     static DTType *            Instantiate( const MMType * );
  40. };
  41.  
  42.  
  43. TYPE_ALIAS( Type_Color, Type_const_Color__ref_ );
  44.  
  45. class METAEXPORTCLASSDEF DTType_JFont : public DTType {
  46.     public:
  47.     DTType_JFont( const MMType * imp );
  48.     ~DTType_JFont();
  49.  
  50.     virtual WBool            Textify( WString &, DT_Textify ) const;
  51.     virtual WBool            DeTextify( const WString &, DT_Textify );
  52.  
  53.     virtual WBool            operator==( const DTType & o );
  54.  
  55.     virtual WBool            Set( const WFont & val );
  56.     virtual const WFont &        Get() const;
  57.  
  58.     virtual WBool            Browse( WWindow * parent, DTObject * obj );
  59.  
  60.     static DTType *            Instantiate( const MMType * );
  61.     private:
  62.     WFont        _value;
  63. };
  64.  
  65. TYPE_ALIAS( Type_JFont, Type_const_JFont__ref_ );
  66.  
  67. class METAEXPORTCLASSDEF DTType_WString_Or_Null : public DTType_WString {
  68.     public:
  69.         DTType_WString_Or_Null( const MMType * imp );
  70.     ~DTType_WString_Or_Null();
  71.  
  72.     virtual WBool            Textify( WString &, DT_Textify ) const;
  73.     virtual WBool            DeTextify( const WString &, DT_Textify );
  74.  
  75.     static DTType *            Instantiate( const MMType * );
  76.  
  77.     void MarkAsNonNull() { _null = false; }
  78.  
  79.     protected:
  80.         WBool        _null;
  81. };
  82.  
  83. class METAEXPORTCLASSDEF DTType_Color_Or_Null : public DTType_Color {
  84.     public:
  85.     DTType_Color_Or_Null( const MMType * imp );
  86.     ~DTType_Color_Or_Null();
  87.  
  88.     virtual WBool            Textify( WString &, DT_Textify ) const;
  89.     virtual WBool            DeTextify( const WString &, DT_Textify );
  90.  
  91.     static DTType *            Instantiate( const MMType * );
  92.  
  93.     void MarkAsNonNull() { _null = false; }
  94.  
  95.     protected:
  96.         WBool        _null;
  97. };
  98.  
  99. class METAEXPORTCLASSDEF DTType_JFont_Or_Null : public DTType_JFont {
  100.     public:
  101.     DTType_JFont_Or_Null( const MMType * imp );
  102.     ~DTType_JFont_Or_Null();
  103.  
  104.     virtual WBool            Textify( WString &, DT_Textify ) const;
  105.     virtual WBool            DeTextify( const WString &, DT_Textify );
  106.  
  107.     static DTType *            Instantiate( const MMType * );
  108.  
  109.     void MarkAsNonNull() { _null = false; }
  110.  
  111.     protected:
  112.         WBool        _null;
  113. };
  114.  
  115. class METAEXPORTCLASSDEF DTType_WChar_Or_Null : public DTType_WChar {
  116.     public:
  117.     DTType_WChar_Or_Null( const MMType * imp );
  118.     ~DTType_WChar_Or_Null();
  119.  
  120.     virtual WBool            Textify( WString &, DT_Textify ) const;
  121.     virtual WBool            DeTextify( const WString &, DT_Textify );
  122.  
  123.     static DTType *            Instantiate( const MMType * );
  124.  
  125.     void MarkAsNonNull() { _null = false; }
  126.  
  127.     protected:
  128.         WBool        _null;
  129. };
  130.  
  131. class METAEXPORTCLASSDEF DTType_JBool : public DTBoolType {
  132.     public:
  133.     DTType_JBool( const MMType * imp ) : DTBoolType( imp ) {}
  134.     ~DTType_JBool() {}
  135.  
  136.     static DTType *        MakeDTJBool( const MMType * );
  137.     static DTType *        Instantiate( const MMType * mm ) { return MakeDTJBool( mm ); }
  138.  
  139.     virtual WUInt        GetNumValues() { return 2; }
  140. };
  141.  
  142. class METAEXPORTCLASSDEF DTType_JBool_Or_Null : public DTType_JBool {
  143.     public:
  144.     DTType_JBool_Or_Null( const MMType * imp );
  145.     ~DTType_JBool_Or_Null();
  146.  
  147.     virtual WBool            Textify( WString &, DT_Textify ) const;
  148.     virtual WBool            DeTextify( const WString &, DT_Textify );
  149.  
  150.     static DTType *            Instantiate( const MMType * );
  151.  
  152.     void MarkAsNonNull() { _null = false; }
  153.  
  154.     protected:
  155.         WBool        _null;
  156. };
  157.  
  158. class METAEXPORTCLASSDEF DTType_WInt_Or_Null : public DTType_WInt {
  159.     public:
  160.     DTType_WInt_Or_Null( const MMType * imp );
  161.     ~DTType_WInt_Or_Null();
  162.  
  163.     virtual WBool            Textify( WString &, DT_Textify ) const;
  164.     virtual WBool            DeTextify( const WString &, DT_Textify );
  165.  
  166.     static DTType *            Instantiate( const MMType * );
  167.  
  168.     void MarkAsNonNull() { _null = false; }
  169.  
  170.     protected:
  171.         WBool        _null;
  172. };
  173.  
  174. class METAEXPORTCLASSDEF DTEnumType_Or_Null: public DTEnumType {
  175.     public:
  176.     DTEnumType_Or_Null( const MMType * imp );
  177.     ~DTEnumType_Or_Null();
  178.  
  179.     virtual WBool            Textify( WString &, DT_Textify ) const;
  180.     virtual WBool            DeTextify( const WString &, DT_Textify );
  181.  
  182.     static DTType *            Instantiate( const MMType * );
  183.  
  184.     void MarkAsNonNull() { _null = false; }
  185.  
  186.     protected:
  187.         WBool        _null;
  188. };
  189.  
  190. class METAEXPORTCLASSDEF DTType_WShort_Or_Null : public DTType_WShort {
  191.     public:
  192.     DTType_WShort_Or_Null( const MMType * imp );
  193.     ~DTType_WShort_Or_Null();
  194.  
  195.     virtual WBool            Textify( WString &, DT_Textify ) const;
  196.     virtual WBool            DeTextify( const WString &, DT_Textify );
  197.  
  198.     static DTType *            Instantiate( const MMType * );
  199.  
  200.     void MarkAsNonNull() { _null = false; }
  201.  
  202.     protected:
  203.         WBool        _null;
  204. };
  205.  
  206. class METAEXPORTCLASSDEF DTType_WUShort_Or_Null : public DTType_WUShort {
  207.     public:
  208.     DTType_WUShort_Or_Null( const MMType * imp );
  209.     ~DTType_WUShort_Or_Null();
  210.  
  211.     virtual WBool            Textify( WString &, DT_Textify ) const;
  212.     virtual WBool            DeTextify( const WString &, DT_Textify );
  213.  
  214.     static DTType *            Instantiate( const MMType * );
  215.  
  216.     void MarkAsNonNull() { _null = false; }
  217.  
  218.     protected:
  219.         WBool        _null;
  220. };
  221.  
  222. class METAEXPORTCLASSDEF DTType_WLong_Or_Null : public DTType_WLong {
  223.     public:
  224.     DTType_WLong_Or_Null( const MMType * imp );
  225.     ~DTType_WLong_Or_Null();
  226.  
  227.     virtual WBool            Textify( WString &, DT_Textify ) const;
  228.     virtual WBool            DeTextify( const WString &, DT_Textify );
  229.  
  230.     static DTType *            Instantiate( const MMType * );
  231.  
  232.     void MarkAsNonNull() { _null = false; }
  233.  
  234.     protected:
  235.         WBool        _null;
  236. };
  237.  
  238. class METAEXPORTCLASSDEF DTType_WUInt_Or_Null : public DTType_WUInt {
  239.     public:
  240.     DTType_WUInt_Or_Null( const MMType * imp );
  241.     ~DTType_WUInt_Or_Null();
  242.  
  243.     virtual WBool            Textify( WString &, DT_Textify ) const;
  244.     virtual WBool            DeTextify( const WString &, DT_Textify );
  245.  
  246.     static DTType *            Instantiate( const MMType * );
  247.  
  248.     void MarkAsNonNull() { _null = false; }
  249.  
  250.     protected:
  251.         WBool        _null;
  252. };
  253.  
  254. extern WBool METAEXPORTDEF SearchAndReplace( WString & given,
  255.             const WChar * search,
  256.                         const WChar * replace );
  257.  
  258. extern void METAEXPORTDEF TranslateString( WString &outStr,
  259.                                            const WString &inStr );
  260.  
  261. #endif // _DTJTYPED_HPP
  262.