Source code of Windows XP (NT5)
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.

56 lines
1.2 KiB

  1. // TSNameValueMgr.h: interface for the CTSNameValueMgr class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_TSNAMEVALUEMGR_H__0AB724C3_AA78_11D2_8C82_00C04F949D33__INCLUDED_)
  5. #define AFX_TSNAMEVALUEMGR_H__0AB724C3_AA78_11D2_8C82_00C04F949D33__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include <vector>
  10. #include "apgtsstr.h"
  11. using namespace std;
  12. struct CNameValue;
  13. typedef vector<CNameValue> CArrNameValue;
  14. struct CNameValue
  15. {
  16. CString strName;
  17. CString strValue;
  18. };
  19. class CTSNameValueMgr
  20. {
  21. private:
  22. VARIANT* m_pvarNames;
  23. VARIANT* m_pvarValues;
  24. int m_nCount;
  25. bool m_bIsValid;
  26. CString m_strData;
  27. CArrNameValue m_arrNameValue;
  28. public:
  29. CTSNameValueMgr(const VARIANT& name, const VARIANT& value, int count);
  30. CTSNameValueMgr(const CArrNameValue& arr);
  31. CTSNameValueMgr();
  32. virtual ~CTSNameValueMgr();
  33. protected:
  34. void Initialize(const VARIANT& name, const VARIANT& value, int count);
  35. public:
  36. bool IsValid() const;
  37. const CString& GetData() const;
  38. int GetCount() const;
  39. CNameValue GetNameValue(int) const;
  40. protected:
  41. void FormDataFromArray();
  42. };
  43. #endif // !defined(AFX_TSNAMEVALUEMGR_H__0AB724C3_AA78_11D2_8C82_00C04F949D33__INCLUDED_)