AimlFacade Class Reference

Facade to manage the memory allocation and deallocation of concrete objects that have publicly exposed interfaces as well as provide get'ers to the concerte objects using their exposed interfaces. More...

#include <AimlFacade.h>

List of all members.

Public Member Functions

 AimlFacade () throw (Exception &)
 Constructs the facade and all the concrete objects to the interfaces that have get'ers.
GraphBuildergetGraphBuilder () 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.
AimlFacadeoperator= (const AimlFacade &aimlFacade)
 The assignment operator.

Private Attributes

GraphBuilderm_graphBuilder
 The GraphBuilder pointer.


Detailed Description

Facade to manage the memory allocation and deallocation of concrete objects that have publicly exposed interfaces as well as provide get'ers to the concerte objects using their exposed interfaces.

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".


Constructor & Destructor Documentation

AimlFacade  )  throw (Exception &)
 

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.

Exceptions:
This constuctor will not explicitly throw an exception. However, an underlying method or function could. More than likely, the only exception that would be thrown would be an out of memory exception (bad_alloc exception).

virtual ~AimlFacade  )  [virtual]
 

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.

AimlFacade const AimlFacade aimlFacade  )  [private]
 

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.

Parameters:
aimlFacade The standard second reference


Member Function Documentation

GraphBuilder& getGraphBuilder  )  throw ()
 

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.

Returns:
The GraphBuilder constructed in the AimlFacade constructor.
Exceptions:
No exceptions will be thrown.

AimlFacade& operator= const AimlFacade aimlFacade  )  [private]
 

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.

Parameters:
aimlFacade The standard second reference.


Member Data Documentation

GraphBuilder* m_graphBuilder [private]
 

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".


The documentation for this class was generated from the following file:
Generated on Tue Feb 14 22:44:54 2006 for RebeccaAIML by  doxygen 1.4.5