WSF
WsfComponentRoles.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFCOMPONENTROLES_HPP
13#define WSFCOMPONENTROLES_HPP
14
15#include <type_traits>
16
20template<class T>
22{
23 template<class U>
24 struct always_false : std::false_type
25 {
26 };
27 static_assert(
29 "Type has no component role registered. Use the WSF_DECLARE_COMPONENT_ROLE_TYPE macro to register the type.");
30};
31
43
44#define WSF_DECLARE_COMPONENT_ROLE_TYPE(TYPE, ROLE) \
45 template<> \
46 struct WsfComponentRole<TYPE> : std::integral_constant<int, ROLE> \
47 { \
48 static_assert(std::is_base_of<WsfComponent, TYPE>::value, \
49 "Cannot register component role for type that does not derive from WsfComponent"); \
50 static_assert(value > 0, "Component role must be > 0"); \
51 };
52
55// template <class T>
56// constexpr int cCOMPONENT_ROLE = WsfComponentRole<T>::value;
57
58template<class T>
60{
61 constexpr operator int() const noexcept { return WsfComponentRole<T>::value; }
62};
63
88
89enum
90{
93
95
97
116
118
132
136
140
142
153};
154
160
161enum
162{
172
182
184};
185#endif
@ cWSF_INITIALIZE_ORDER_COMMAND_CHAIN
Command chains aren't dependent on anything, but something may be dependent on them.
Definition WsfComponentRoles.hpp:164
@ cWSF_INITIALIZE_ORDER_FUEL
Definition WsfComponentRoles.hpp:173
@ cWSF_INITIALIZE_ORDER_TRACK_MANAGER
The track manager must be initialized prior to the mover.
Definition WsfComponentRoles.hpp:166
@ cWSF_INITIALIZE_ORDER_COMM
Definition WsfComponentRoles.hpp:176
@ cWSF_INITIALIZE_ORDER_VISUAL_PART
Definition WsfComponentRoles.hpp:179
@ cWSF_INITIALIZE_ORDER_MOVER
The mover must be initialized prior to just about everything else because it defines the initial loca...
Definition WsfComponentRoles.hpp:168
@ cWSF_INITIALIZE_ORDER_ROUTER
Definition WsfComponentRoles.hpp:175
@ cWSF_INITIALIZE_ORDER_RESERVED
Definition WsfComponentRoles.hpp:180
@ cWSF_INITIALIZE_ORDER_SENSOR
Definition WsfComponentRoles.hpp:178
@ cWSF_INITIALIZE_ORDER_NAVIGATION_ERRORS
Definition WsfComponentRoles.hpp:174
@ cWSF_INITIALIZE_ORDER_ZONE
Zones generally aren't dependent on anything except position, but something may be dependent on them.
Definition WsfComponentRoles.hpp:183
@ cWSF_INITIALIZE_ORDER_PROCESSOR
Definition WsfComponentRoles.hpp:177
@ cWSF_COMPONENT_PLATFORM
The component is or derives from WsfPlatform.
Definition WsfComponentRoles.hpp:94
@ cWSF_COMPONENT_SOLAR_ILLUMINATION
Solar Illumination command sensor component.
Definition WsfComponentRoles.hpp:150
@ cWSF_COMPONENT_COMM_ROUTER
A 'router' component (WsfCommRouter).
Definition WsfComponentRoles.hpp:103
@ cWSF_COMPONENT_SENSOR_COMPONENT
A Component on a WsfSensor.
Definition WsfComponentRoles.hpp:147
@ cWSF_COMPONENT_COMM_ROUTER_PROTOCOL_MULTICAST
Definition WsfComponentRoles.hpp:127
@ cWSF_COMPONENT_TRACK_MANAGER
A 'track manager' component (WsfTrackManager).
Definition WsfComponentRoles.hpp:107
@ cWSF_COMPONENT_COMM_ROUTER_PROTOCOL_LEGACY
Definition WsfComponentRoles.hpp:124
@ cWSF_COMPONENT_SOLAR_ELEVATION_AT_TARGET
A solar elevation from target sensor component.
Definition WsfComponentRoles.hpp:151
@ cWSF_COMPONENT_TASK_MANAGER
An extension to WsfTaskManager.
Definition WsfComponentRoles.hpp:145
@ cWSF_COMPONENT_CALLBACK
A 'callback' component (WsfCallback).
Definition WsfComponentRoles.hpp:112
@ cWSF_COMPONENT_COMM_PROTOCOL_IGMP
Definition WsfComponentRoles.hpp:122
@ cWSF_COMPONENT_INTERSECT_MESH
A 'intersect_mesh" component (WsfIntersectMesh).
Definition WsfComponentRoles.hpp:113
@ cWSF_COMPONENT_PROCESSOR_COMPONENT
An extension to WsfProcessor.
Definition WsfComponentRoles.hpp:144
@ cWSF_COMPONENT_TASK_MANAGER_COMPONENT
A Component on a WsfTaskManager.
Definition WsfComponentRoles.hpp:146
@ cWSF_COMPONENT_ZONE
A 'zone' component (WsfZone).
Definition WsfComponentRoles.hpp:110
@ cWSF_COMPONENT_PROCESSOR
A 'processor' component (WsfProcessor).
Definition WsfComponentRoles.hpp:104
@ cWSF_COMPONENT_COMM_ROUTER_PROTOCOL_OSPF
Definition WsfComponentRoles.hpp:126
@ cWSF_COMPONENT_COMMAND_CHAIN
A 'command_chain' component (WsfCommandChain).
Definition WsfComponentRoles.hpp:109
@ cWSF_COMPONENT_COMM_ROUTER_PROTOCOL_AD_HOC
Definition WsfComponentRoles.hpp:128
@ cWSF_COMPONENT_COMM_ROUTER_PROTOCOL
Definition WsfComponentRoles.hpp:123
@ cWSF_COMPONENT_COMM_MEDIUM_CONTAINER_ROUTER
Definition WsfComponentRoles.hpp:130
@ cWSF_COMPONENT_GEOPOINT
A 'geopoint' component (WsfGeoPoint).
Definition WsfComponentRoles.hpp:111
@ cWSF_COMPONENT_COMM_HW
Definition WsfComponentRoles.hpp:119
@ cWSF_COMPONENT_THERMAL_SYSTEM
A 'thermal system' component.
Definition WsfComponentRoles.hpp:114
@ cWSF_COMPONENT_NAVIGATION_ERRORS
A 'navigation_error' component (WsfNavigationErrors).
Definition WsfComponentRoles.hpp:108
@ cWSF_COMPONENT_COMM_ROUTER_PROTOCOL_RIPv2
Definition WsfComponentRoles.hpp:125
@ cWSF_COMPONENT_VISUAL
A 'visual_part' component (WsfVisualPart).
Definition WsfComponentRoles.hpp:106
@ cWSF_COMPONENT_COMM_PROTOCOL
Definition WsfComponentRoles.hpp:121
@ cWSF_COMPONENT_SENSOR_MOON_LOS
A Component enabling Moon LOS checks.
Definition WsfComponentRoles.hpp:149
@ cWSF_COMPONENT_SENSOR
A 'sensor' component (WsfSensor).
Definition WsfComponentRoles.hpp:105
@ cWSF_COMPONENT_COMM
A 'comm' component (WsfComm).
Definition WsfComponentRoles.hpp:102
@ cWSF_COMPONENT_PLATFORM_PART
The component derives from WsfPlatformPart.
Definition WsfComponentRoles.hpp:98
@ cWSF_COMPONENT_EM_RCVR
WSFEM_Rcvr.
Definition WsfComponentRoles.hpp:138
@ cWSF_COMPONENT_MOVER
A 'mover' component (WsfMover).
Definition WsfComponentRoles.hpp:100
@ cWSF_COMPONENT_COMM_XIO
Definition WsfComponentRoles.hpp:120
@ cWSF_COMPONENT_FUEL
A 'fuel' component (WsfFuel).
Definition WsfComponentRoles.hpp:101
@ cWSF_COMPONENT_COMM_MEDIUM_CONTAINER_COMM
Definition WsfComponentRoles.hpp:129
@ cWSF_COMPONENT_EM_INTERACTION
An extension to WsfEM_Interaction.
Definition WsfComponentRoles.hpp:143
@ cWSF_COMPONENT_NULL
A special entry to indicate the end of the list of roles assumed by a component.
Definition WsfComponentRoles.hpp:92
@ cWSF_COMPONENT_ARTICULATED_PART
The component derives from WsfArticulatedPart.
Definition WsfComponentRoles.hpp:99
@ cWSF_COMPONENT_SENSOR_EXCLUSION
A Solar or lunar exclusion angle component.
Definition WsfComponentRoles.hpp:148
@ cWSF_COMPONENT_EM_XMTR
WsfEM_Xmtr.
Definition WsfComponentRoles.hpp:137
Definition WsfComponentRoles.hpp:25
Definition WsfComponentRoles.hpp:22
Definition WsfComponentRoles.hpp:60
Copyrights Multiple, All Rights Reserved