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.

74 lines
1.7 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. multip.h
  7. FILE HISTORY:
  8. */
  9. #ifndef _MULTIP_H
  10. #define _MULTIP_H
  11. class CMultipleIpNamePair : public CIpNamePair
  12. {
  13. public:
  14. CMultipleIpNamePair();
  15. CMultipleIpNamePair(const CMultipleIpNamePair& pair);
  16. public:
  17. inline virtual CIpAddress& GetIpAddress()
  18. {
  19. return m_iaIpAddress[0];
  20. }
  21. inline virtual CIpAddress& GetIpAddress(int n)
  22. {
  23. ASSERT(n >= 0 && n < WINSINTF_MAX_MEM);
  24. return m_iaIpAddress[n];
  25. }
  26. inline virtual void SetIpAddress(CIpAddress& ip)
  27. {
  28. m_iaIpAddress[0] = ip;
  29. }
  30. inline virtual void SetIpAddress(long ip)
  31. {
  32. m_iaIpAddress[0] = ip;
  33. }
  34. inline virtual void SetIpAddress(CString& str)
  35. {
  36. m_iaIpAddress[0] = str;
  37. }
  38. inline virtual void SetIpAddress(int n, CIpAddress& ip)
  39. {
  40. ASSERT(n >= 0 && n < WINSINTF_MAX_MEM);
  41. m_iaIpAddress[n] = ip;
  42. }
  43. inline virtual void SetIpAddress(int n, long ip)
  44. {
  45. ASSERT(n >= 0 && n < WINSINTF_MAX_MEM);
  46. m_iaIpAddress[n] = ip;
  47. }
  48. inline virtual void SetIpAddress(int n, CString& str)
  49. {
  50. ASSERT(n >= 0 && n < WINSINTF_MAX_MEM);
  51. m_iaIpAddress[n] = str;
  52. }
  53. inline const int GetCount() const
  54. {
  55. return m_nCount;
  56. }
  57. inline void SetCount(int n)
  58. {
  59. ASSERT(n >= 0 && n <= WINSINTF_MAX_MEM);
  60. m_nCount = n;
  61. }
  62. protected:
  63. int m_nCount;
  64. CIpAddress m_iaIpAddress[WINSINTF_MAX_MEM];
  65. };
  66. #endif //_MULTIP_H