Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
1.6 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. FIELDVAL.H
  5. History:
  6. --*/
  7. #pragma once
  8. #pragma warning(disable : 4251)
  9. class LTAPIENTRY CColumnVal
  10. {
  11. public:
  12. CColumnVal();
  13. explicit CColumnVal(const CColumnVal & val);
  14. explicit CColumnVal(const CPascalString & pasValue);
  15. explicit CColumnVal(long nValue);
  16. explicit CColumnVal(const COleDateTime & dateValue);
  17. explicit CColumnVal(BOOL fValue);
  18. enum ColumnValType
  19. {
  20. cvtNone,
  21. cvtString,
  22. cvtLong,
  23. cvtDate,
  24. cvtBool,
  25. cvtStringList,
  26. cvtLocTerm
  27. };
  28. void Serialize(CArchive &);
  29. const CColumnVal & operator=(const CColumnVal & val);
  30. void SetString(const CPascalString & pasValue);
  31. void SetLong(const long nValue);
  32. void SetDate(const COleDateTime & dateValue);
  33. void SetBool(const BOOL fValue);
  34. void SetStringIndex(const long nValue);
  35. ColumnValType GetType() const;
  36. const CPascalString &GetString() const;
  37. long GetLong() const;
  38. const COleDateTime & GetDate() const;
  39. BOOL GetBool() const;
  40. long GetStringIndex() const;
  41. int operator==(const CColumnVal &);
  42. int operator!=(const CColumnVal &);
  43. #ifdef LTASSERT_ACTIVE
  44. void AssertValid(void) const;
  45. #endif
  46. private:
  47. BOOL Compare(const CColumnVal & valCompare);
  48. void AssignFrom(const CColumnVal & valSrc);
  49. ColumnValType m_cvt;
  50. union
  51. {
  52. long m_long;
  53. BOOL m_bool;
  54. };
  55. CPascalString m_pasString;
  56. COleDateTime m_Time;
  57. };
  58. typedef CColumnVal CCV;
  59. #pragma warning(default : 4251)
  60. #if !defined(_DEBUG) || defined(IMPLEMENT)
  61. #include "FieldVal.inl"
  62. #endif