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.

55 lines
1.3 KiB

  1. // clsinfo.h - DS Class Info header
  2. #ifndef _CLSINFO_H_
  3. #define _CLSINFO_H_
  4. //------------------------------------------------------------------
  5. // class CClassInfo
  6. //------------------------------------------------------------------
  7. class CClassInfo
  8. {
  9. friend IStream& operator>> (IStream& stm, CClassInfo& classinfo);
  10. friend IStream& operator<< (IStream& stm, CClassInfo& classinfo);
  11. public:
  12. CClassInfo(LPCWSTR pszClassName = NULL)
  13. {
  14. if (pszClassName != NULL)
  15. m_strName = pszClassName;
  16. }
  17. LPCWSTR Name() { return m_strName.c_str(); }
  18. string_vector& Columns() { return m_vstrColumns; }
  19. private:
  20. std::wstring m_strName;
  21. string_vector m_vstrColumns;
  22. };
  23. IStream& operator>> (IStream& stm, CClassInfo& classinfo);
  24. IStream& operator<< (IStream& stm, CClassInfo& classinfo);
  25. typedef std::vector<CClassInfo> classInfo_vector;
  26. class CClassInfoSet
  27. {
  28. public:
  29. CClassInfo* FindClass(LPCWSTR pszClassName);
  30. HRESULT AddClass(CClassInfo&);
  31. HRESULT RemoveClass(LPCWSTR pszClassName);
  32. operator classInfo_vector&() { return m_vClasses; }
  33. private:
  34. classInfo_vector m_vClasses;
  35. };
  36. IStream& operator>> (IStream& stm, CClassInfoSet& classSet);
  37. IStream& operator<< (IStream& stm, CClassInfoSet& classSet);
  38. #endif // _CLSINFO_H_