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.

38 lines
1.2 KiB

  1. /*---------------------------------------------------------------------------
  2. File: DottedString.hpp
  3. Comments: Utility class used by VarSet to parse dot-delimited strings.
  4. Uses CString.
  5. (c) Copyright 1995-1998, Mission Critical Software, Inc., All Rights Reserved
  6. Proprietary and confidential to Mission Critical Software, Inc.
  7. REVISION LOG ENTRY
  8. Revision By: Christy Boles
  9. Revised on 11/19/98 17:24:11
  10. ---------------------------------------------------------------------------
  11. */
  12. #ifndef __CDOTTEDSTRING_HPP__
  13. #define __CDOTTEDSTRING_HPP__
  14. /////////////////////////////////////////////////////
  15. // Utility class used to parse dot-delimited strings
  16. /////////////////////////////////////////////////////
  17. class CDottedString
  18. {
  19. CString m_name;
  20. int m_nSegments;
  21. public:
  22. CDottedString(BSTR str) { m_name = str; Init(); }
  23. CDottedString(TCHAR const * str) { m_name = str; Init();}
  24. int NumSegments() { return m_nSegments; }
  25. void GetSegment(int ndx,CString & str);
  26. protected:
  27. void Init(); // counts the number of segments
  28. };
  29. #endif //__CPROPSTRING_HPP__