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.

57 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name :
  4. itemlist.hxx
  5. Abstract:
  6. Class to parse different parameters coming in from the inf
  7. Author:
  8. Christopher Achille (cachille)
  9. Project:
  10. Internet Services Setup
  11. Revision History:
  12. June 2001: Created
  13. --*/
  14. #define ITEMLIST_TERMINATIONCHARACTER '|'
  15. // Class: CItemList
  16. //
  17. // Purporse: The purpose of this class is to seperate a pipe ('|') seperated list of items
  18. // into a list of different items. For example, we would take foo,bar,test into
  19. // three different items, the first of which would be foo, the next would be bar
  20. // and the last would be test. This is being done to simplify the way we read
  21. // in values from the inf file
  22. //
  23. class CItemList {
  24. private:
  25. BUFFER m_Buff;
  26. DWORD m_dwItemsinList;
  27. LPTSTR *m_pItems;
  28. LPTSTR SkipWhiteSpaces(LPTSTR szLine);
  29. LPTSTR FindNextItem(LPTSTR szLine, TCHAR cTermChar);
  30. public:
  31. CItemList();
  32. ~CItemList();
  33. BOOL LoadList(LPTSTR szList);
  34. BOOL LoadSubList(LPTSTR szList);
  35. LPTSTR GetItem(DWORD dwIndex);
  36. DWORD GetNumberOfItems();
  37. BOOL IsNumber(DWORD dwIndex);
  38. DWORD GetNumber(DWORD dwIndex);
  39. BOOL FindItem(LPTSTR szSearchString, BOOL bCaseSensitive = TRUE);
  40. };