#include <AimlFacade.h>
Public Member Functions | |
AimlFacade () throw (Exception &) | |
Constructs the facade and all the concrete objects to the interfaces that have get'ers. | |
GraphBuilder & | getGraphBuilder () throw () |
Returns the constructed GraphBuilder object from AimlFacade's constructor. | |
virtual | ~AimlFacade () |
Destructs the facade and all the concrete objects to the interfaces that have get'ers. | |
Private Member Functions | |
AimlFacade (const AimlFacade &aimlFacade) | |
The copy constructor. | |
AimlFacade & | operator= (const AimlFacade &aimlFacade) |
The assignment operator. | |
Private Attributes | |
GraphBuilder * | m_graphBuilder |
The GraphBuilder pointer. |
AimlFacade manages the memory for the GraphBuilder object. When AimlFacade is instantiated it creates the GraphBuilder concerte implementation with a "new" and stores it inside of its pointer to the GraphBuilder interface, m_graphBuilder. When AimlFacade is destroyed it in turn destroys the GraphBuilder object through this same pointer.
This indirection is needed since GraphBuilder is an interface and users cannot directly instantiate it without access to a concrete implementation.
Since AimlFacade creates and deletes the GraphBuilder object from the heap with a "new", the memory management stays inside of the dll. This is a requirement for "dll memory boundary safety".
|
Constructs the facade and all the concrete objects to the interfaces that have get'ers. Underneath the covers the constructor creates a factory and from that factor creates the GraphBuilder concrete representation and stores it in the m_graphBuilder pointer.
|
|
Destructs the facade and all the concrete objects to the interfaces that have get'ers. Underneath the covers it deletes the GraphBuilder and its respective factory which created it. |
|
The copy constructor. For now, I am not allowing this to be invoked. In the future, if I do, it will more than likely be a shallow copy since it could be potentially expensive to do a deep copy of the GraphBuilder object.
|
|
Returns the constructed GraphBuilder object from AimlFacade's constructor. The GraphBuilder object and memory is constructed in the AimlFacade constructor and destoryed in the AimlFacade destructor. DO NOT try to delete GraphBuilder yourself. Instead let AimlFacade auotmagically handle the construction and deletion of GraphBuilder.
|
|
The assignment operator. For now, I am not allowing a copy to be made. In the future, if I do, it will more than likely be a shallow copy since it could be potentially expensive to do a deep copy of the GraphBuilder object.
|
|
The GraphBuilder pointer. Use AimlFacade::getGraphBuilder to obtain a reference to this. The GraphBuilder object is constructed in the constructor of AimlFacade and deleted in the destructor of AimlFacade. DO NOT try to delete this yourself. Let AimlFacade handle the memory of this for "dll memory boundary safety". |