#include <CC_ManoeuvreFactory.h>
Inheritance diagram for CC_ManoeuvreFactory:
Manoeuvre
.
A dynamic factory is a component that manages a pool of instances of components of a certain type. Clients of the factory can require one of these instances at run-time. After the factory hands over a component instance to its client, the instance is marked as "in use" and cannot be given to any other clients. When the requesting client has finished using the instance, it should release it by marking it as "no longer in use". This will allow the factory to make it available to other clients that request it. The "in use" status of the component instances is controlled through method setInUse
declared on the component instances.
A dynamic factory is configured in two steps. The first step is performed by the factory constructor when the internal data structures to hold the component instances are created. The second step is performed during application initialization when the component instances are loaded in the factory. Reconfiguration at run time during normal application operation is not allowed.
Dynamic factories are implemented as singletons. They can exist in one single instance that can be accessed through the getInstance
method. The one single instance of the class is created the first time that method getInstance is called. In order to avoid possible disruptions of real-time behaviour, applications should ensure that this method has been called at least once before the application enters its operational phase.
This factory manages the following component instances:<ul> Number of instances of type DC_DummyConfigurableManoeuvre
: 1 Number of instances of type DC_DummyManoeuvre
: 1 Number of instances of type DC_TestPUSConfigurableManoeuvre
: 1 The code for this class was automatically generated by an XSL program processing the XML-based application model.
Definition at line 57 of file CC_ManoeuvreFactory.h.
Public Member Functions | |
virtual bool | isObjectConfigured () |
Check that all component instances required by the factory have been loaded. | |
void | setManoeuvre (unsigned int i, DC_DummyConfigurableManoeuvre *pItem) |
Load one instance of type DC_DummyConfigurableManoeuvre in the factory. | |
unsigned int | getNumberDummyConfigurableManoeuvre (void) |
Return the number of component instances of type DC_DummyConfigurableManoeuvre that are currently allocated. | |
unsigned int | getCapacityDummyConfigurableManoeuvre (void) |
Return the number of component instances of type DC_DummyConfigurableManoeuvre that are in the factory. | |
DC_DummyConfigurableManoeuvre * | allocateDummyConfigurableManoeuvre () |
Allocate one instance of type DC_DummyConfigurableManoeuvre . | |
bool | isFreeDummyConfigurableManoeuvre () |
Check whether a non-allocated component instance of type DC_DummyConfigurableManoeuvre is available within the factory. | |
void | setManoeuvre (unsigned int i, DC_DummyManoeuvre *pItem) |
Load one instance of type DC_DummyManoeuvre in the factory. | |
unsigned int | getNumberDummyManoeuvre (void) |
Return the number of component instances of type DC_DummyManoeuvre that are currently allocated. | |
unsigned int | getCapacityDummyManoeuvre (void) |
Return the number of component instances of type DC_DummyManoeuvre that are in the factory. | |
DC_DummyManoeuvre * | allocateDummyManoeuvre () |
Allocate one instance of type DC_DummyManoeuvre . | |
bool | isFreeDummyManoeuvre () |
Check whether a non-allocated component instance of type DC_DummyManoeuvre is available within the factory. | |
void | setManoeuvre (unsigned int i, DC_TestPUSConfigurableManoeuvre *pItem) |
Load one instance of type DC_TestPUSConfigurableManoeuvre in the factory. | |
unsigned int | getNumberTestPUSConfigurableManoeuvre (void) |
Return the number of component instances of type DC_TestPUSConfigurableManoeuvre that are currently allocated. | |
unsigned int | getCapacityTestPUSConfigurableManoeuvre (void) |
Return the number of component instances of type DC_TestPUSConfigurableManoeuvre that are in the factory. | |
DC_TestPUSConfigurableManoeuvre * | allocateTestPUSConfigurableManoeuvre () |
Allocate one instance of type DC_TestPUSConfigurableManoeuvre . | |
bool | isFreeTestPUSConfigurableManoeuvre () |
Check whether a non-allocated component instance of type DC_TestPUSConfigurableManoeuvre is available within the factory. | |
Static Public Member Functions | |
CC_ManoeuvreFactory * | getInstance (void) |
Get the single instance of this singleton class. | |
Protected Member Functions | |
CC_ManoeuvreFactory (void) | |
Instantiate the factory component. |
|
Instantiate the factory component. The class identifier is set and the internal data structures to hold the component instances managed by the factory are created. This constructor is defined to be protected because this is a singleton class. Definition at line 23 of file CC_ManoeuvreFactory.cpp. |
|
Allocate one instance of type
This method scans all the entries in the factory of type If no free component instances are found, then the method returns null. Note that no event report is generated to record the failure to allocate a component instance. Event reporting is the responsibility of the caller.
Definition at line 101 of file CC_ManoeuvreFactory.cpp. |
|
Allocate one instance of type
This method scans all the entries in the factory of type If no free component instances are found, then the method returns null. Note that no event report is generated to record the failure to allocate a component instance. Event reporting is the responsibility of the caller.
Definition at line 141 of file CC_ManoeuvreFactory.cpp. |
|
Allocate one instance of type
This method scans all the entries in the factory of type If no free component instances are found, then the method returns null. Note that no event report is generated to record the failure to allocate a component instance. Event reporting is the responsibility of the caller.
Definition at line 181 of file CC_ManoeuvreFactory.cpp. |
|
Return the number of component instances of type
The value returned is the maximum number of component instances of type
Definition at line 96 of file CC_ManoeuvreFactory.cpp. |
|
Return the number of component instances of type
The value returned is the maximum number of component instances of type
Definition at line 136 of file CC_ManoeuvreFactory.cpp. |
|
Return the number of component instances of type
The value returned is the maximum number of component instances of type
Definition at line 176 of file CC_ManoeuvreFactory.cpp. |
|
Get the single instance of this singleton class. If the instance does not yet exist, it is created. Definition at line 74 of file CC_ManoeuvreFactory.cpp. |
|
Return the number of component instances of type A component instance is allocated if its "in use" status is equal to: "component is in use".
Definition at line 88 of file CC_ManoeuvreFactory.cpp. |
|
Return the number of component instances of type A component instance is allocated if its "in use" status is equal to: "component is in use".
Definition at line 128 of file CC_ManoeuvreFactory.cpp. |
|
Return the number of component instances of type A component instance is allocated if its "in use" status is equal to: "component is in use".
Definition at line 168 of file CC_ManoeuvreFactory.cpp. |
|
Check whether a non-allocated component instance of type
If this method return true, then the corresponding
Definition at line 111 of file CC_ManoeuvreFactory.cpp. |
|
Check whether a non-allocated component instance of type
If this method return true, then the corresponding
Definition at line 151 of file CC_ManoeuvreFactory.cpp. |
|
Check whether a non-allocated component instance of type
If this method return true, then the corresponding
Definition at line 191 of file CC_ManoeuvreFactory.cpp. |
|
Check that all component instances required by the factory have been loaded.
Reimplemented from CC_RootObject. Definition at line 44 of file CC_ManoeuvreFactory.cpp. |
|
Load one instance of type
The component instances managed by the factory are internally stored in an array. This method loads the i-th element of the array. The argument i should lie in the interval [0,N-1] where N is the number of component instances of type The "in use" status of a newly loaded component is initialized to: "component is not in use". This is an initialization method that should only be called during the application configuration phase.
Definition at line 161 of file CC_ManoeuvreFactory.cpp. |
|
Load one instance of type
The component instances managed by the factory are internally stored in an array. This method loads the i-th element of the array. The argument i should lie in the interval [0,N-1] where N is the number of component instances of type The "in use" status of a newly loaded component is initialized to: "component is not in use". This is an initialization method that should only be called during the application configuration phase.
Definition at line 121 of file CC_ManoeuvreFactory.cpp. |
|
Load one instance of type
The component instances managed by the factory are internally stored in an array. This method loads the i-th element of the array. The argument i should lie in the interval [0,N-1] where N is the number of component instances of type The "in use" status of a newly loaded component is initialized to: "component is not in use". This is an initialization method that should only be called during the application configuration phase.
Definition at line 81 of file CC_ManoeuvreFactory.cpp. |