DefinitionParameter.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***********************************************************************************************
  19. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : LevelEdit *
  23. * *
  24. * $Archive:: /Commando/Code/Tools/LevelEdit/DefinitionParameter.h $*
  25. * *
  26. * Author:: Patrick Smith *
  27. * *
  28. * $Modtime:: 6/12/00 6:29p $*
  29. * *
  30. * $Revision:: 2 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #if defined(_MSC_VER)
  36. #pragma once
  37. #endif
  38. #ifndef __DEFINITION_PARAMETER_H
  39. #define __DEFINITION_PARAMETER_H
  40. #include "refcount.h"
  41. #include "utils.h"
  42. /////////////////////////////////////////////////////////////////////////////
  43. // Forward declarations
  44. /////////////////////////////////////////////////////////////////////////////
  45. class DefinitionClass;
  46. class ParameterClass;
  47. /////////////////////////////////////////////////////////////////////////////
  48. //
  49. // DefinitionParameterClass
  50. //
  51. /////////////////////////////////////////////////////////////////////////////
  52. class DefinitionParameterClass : public RefCountClass
  53. {
  54. public:
  55. ////////////////////////////////////////////////////////////
  56. // Public constructors/destructor
  57. ////////////////////////////////////////////////////////////
  58. DefinitionParameterClass (void)
  59. : m_Definition (NULL),
  60. m_Parameter (NULL),
  61. m_Index (0),
  62. m_Parent (NULL) {}
  63. virtual ~DefinitionParameterClass (void) { MEMBER_RELEASE (m_Parent); }
  64. ////////////////////////////////////////////////////////////
  65. // Public methods
  66. ////////////////////////////////////////////////////////////
  67. //
  68. // Parameter info
  69. //
  70. DefinitionClass * Get_Definition (void) const { return m_Definition; }
  71. ParameterClass * Get_Parameter (void) const { return m_Parameter; }
  72. int Get_Index (void) const { return m_Index; }
  73. void Set_Definition (DefinitionClass *def) { m_Definition = def; }
  74. void Set_Parameter (ParameterClass *param) { m_Parameter = param; }
  75. void Set_Index (int index) { m_Index = index; }
  76. //
  77. // Parent info
  78. //
  79. DefinitionParameterClass * Peek_Parent (void) const { return m_Parent; }
  80. void Set_Parent (DefinitionParameterClass * parent) { MEMBER_ADD (m_Parent, parent); }
  81. private:
  82. ////////////////////////////////////////////////////////////
  83. // Private member data
  84. ////////////////////////////////////////////////////////////
  85. DefinitionClass * m_Definition;
  86. ParameterClass * m_Parameter;
  87. int m_Index;
  88. DefinitionParameterClass * m_Parent;
  89. };
  90. #endif //__DEFINITION_PARAMETER_H