Repository navigation
Expand file tree
/
Copy pathROS2ScriptIntegrationEditorModule.cpp
More file actions
44 lines (38 loc) · 1.82 KB
/
Copy pathROS2ScriptIntegrationEditorModule.cpp
File metadata and controls
44 lines (38 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include "PublisherEditorSystemComponent.h"
#include "SubscriberEditorSystemComponent.h"
#include <ROS2ScriptIntegration/ROS2ScriptIntegrationTypeIds.h>
#include <ROS2ScriptIntegrationModuleInterface.h>
namespace ROS2ScriptIntegration
{
class ROS2ScriptIntegrationEditorModule : public ROS2ScriptIntegrationModuleInterface
{
public:
AZ_RTTI(ROS2ScriptIntegrationEditorModule, ROS2ScriptIntegrationEditorModuleTypeId, ROS2ScriptIntegrationModuleInterface);
AZ_CLASS_ALLOCATOR(ROS2ScriptIntegrationEditorModule, AZ::SystemAllocator);
ROS2ScriptIntegrationEditorModule()
{
// Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
// Add ALL components descriptors associated with this gem to m_descriptors.
// This will associate the AzTypeInfo information for the components with the the SerializeContext, BehaviorContext and
// EditContext. This happens through the [MyComponent]::Reflect() function.
m_descriptors.insert(
m_descriptors.end(),
{
PublisherEditorSystemComponent::CreateDescriptor(),
SubscriberEditorSystemComponent::CreateDescriptor(),
});
}
/**
* Add required SystemComponents to the SystemEntity.
* Non-SystemComponents should not be added here
*/
AZ::ComponentTypeList GetRequiredSystemComponents() const override
{
return AZ::ComponentTypeList{
azrtti_typeid<PublisherEditorSystemComponent>(),
azrtti_typeid<SubscriberEditorSystemComponent>(),
};
}
};
} // namespace ROS2ScriptIntegration
AZ_DECLARE_MODULE_CLASS(Gem_ROS2ScriptIntegration, ROS2ScriptIntegration::ROS2ScriptIntegrationEditorModule)