ExportEventContext.cpp 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <SceneAPI/SceneCore/Events/ExportEventContext.h>
  9. namespace AZ
  10. {
  11. namespace SceneAPI
  12. {
  13. namespace Events
  14. {
  15. /////////////
  16. // PreExportEventContext
  17. /////////////
  18. PreExportEventContext::PreExportEventContext(
  19. ExportProductList& productList,
  20. const AZStd::string& outputDirectory,
  21. const Containers::Scene& scene,
  22. const char* platformIdentifier,
  23. bool debug)
  24. : m_outputDirectory(outputDirectory)
  25. , m_productList(productList)
  26. , m_scene(scene)
  27. , m_platformIdentifier(platformIdentifier)
  28. , m_debug(debug)
  29. {
  30. }
  31. PreExportEventContext::PreExportEventContext(
  32. ExportProductList& productList,
  33. AZStd::string&& outputDirectory,
  34. const Containers::Scene& scene,
  35. const char* platformIdentifier,
  36. bool debug)
  37. : m_outputDirectory(AZStd::move(outputDirectory))
  38. , m_productList(productList)
  39. , m_scene(scene)
  40. , m_platformIdentifier(platformIdentifier)
  41. , m_debug(debug)
  42. {
  43. }
  44. const AZStd::string& PreExportEventContext::GetOutputDirectory() const
  45. {
  46. return m_outputDirectory;
  47. }
  48. ExportProductList& PreExportEventContext::GetProductList()
  49. {
  50. return m_productList;
  51. }
  52. const ExportProductList& PreExportEventContext::GetProductList() const
  53. {
  54. return m_productList;
  55. }
  56. const Containers::Scene& PreExportEventContext::GetScene() const
  57. {
  58. return m_scene;
  59. }
  60. const char* PreExportEventContext::GetPlatformIdentifier() const
  61. {
  62. return m_platformIdentifier;
  63. }
  64. bool PreExportEventContext::GetDebug() const
  65. {
  66. return m_debug;
  67. }
  68. /////////////
  69. // ExportEventContext
  70. /////////////
  71. ExportEventContext::ExportEventContext(ExportProductList& productList, const AZStd::string& outputDirectory, const Containers::Scene& scene, const char* platformIdentifier)
  72. : m_outputDirectory(outputDirectory)
  73. , m_productList(productList)
  74. , m_scene(scene)
  75. , m_platformIdentifier(platformIdentifier)
  76. {
  77. }
  78. ExportEventContext::ExportEventContext(ExportProductList& productList, AZStd::string&& outputDirectory, const Containers::Scene& scene, const char* platformIdentifier)
  79. : m_outputDirectory(AZStd::move(outputDirectory))
  80. , m_productList(productList)
  81. , m_scene(scene)
  82. , m_platformIdentifier(platformIdentifier)
  83. {
  84. }
  85. const AZStd::string& ExportEventContext::GetOutputDirectory() const
  86. {
  87. return m_outputDirectory;
  88. }
  89. ExportProductList& ExportEventContext::GetProductList()
  90. {
  91. return m_productList;
  92. }
  93. const ExportProductList& ExportEventContext::GetProductList() const
  94. {
  95. return m_productList;
  96. }
  97. const Containers::Scene& ExportEventContext::GetScene() const
  98. {
  99. return m_scene;
  100. }
  101. const char* ExportEventContext::GetPlatformIdentifier() const
  102. {
  103. return m_platformIdentifier;
  104. }
  105. /////////////
  106. // PostExportEventContext
  107. /////////////
  108. PostExportEventContext::PostExportEventContext(ExportProductList& productList, const AZStd::string& outputDirectory, const char* platformIdentifier)
  109. : m_outputDirectory(outputDirectory)
  110. , m_productList(productList)
  111. , m_platformIdentifier(platformIdentifier)
  112. {
  113. }
  114. PostExportEventContext::PostExportEventContext(ExportProductList& productList, AZStd::string&& outputDirectory, const char* platformIdentifier)
  115. : m_outputDirectory(AZStd::move(outputDirectory))
  116. , m_platformIdentifier(platformIdentifier)
  117. , m_productList(productList)
  118. {
  119. }
  120. const AZStd::string PostExportEventContext::GetOutputDirectory() const
  121. {
  122. return m_outputDirectory;
  123. }
  124. ExportProductList& PostExportEventContext::GetProductList()
  125. {
  126. return m_productList;
  127. }
  128. const ExportProductList& PostExportEventContext::GetProductList() const
  129. {
  130. return m_productList;
  131. }
  132. const char* PostExportEventContext::GetPlatformIdentifier() const
  133. {
  134. return m_platformIdentifier;
  135. }
  136. } // Events
  137. } // SceneAPI
  138. } // AZ