/******************************************************************
** Copyright (C) 2001, University of Alabama in Huntsville. 
** All rights reserved.
**
** File   : DrawableCGFactory.h
**
** Author : Satish Hota
**
** Description:
**    This file provides implementation for the CDrawableCGFactory
**    class.
**
** History:
**    28-Nov-2001 : Satish Hota
**        Created file.  Plagiarized heavily from CCGFactory.
******************************************************************/

#include "stdafx.h"
#include "DrawableCGFactory.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CDrawableCGFactory::CDrawableCGFactory()
{

}

CDrawableCGFactory::~CDrawableCGFactory()
{

}

CKnowledgeBase* CDrawableCGFactory::NewKnowledgeBase()
{
	CKnowledgeBase* ptr = new CKnowledgeBase;
	return ptr;
}

	
CTypeHierarchy* CDrawableCGFactory::NewTypeHierarchy()
{
    CTypeHierarchy* ptr = dynamic_cast<CTypeHierarchy*> (new CDrawableTH);
	return ptr;
}
	
CTypeDefinition* CDrawableCGFactory::NewTypeDefinition (std::string name)
{

	CTypeDefinition* ptr = dynamic_cast<CTypeDefinition*> (new CDrawableTypeDefinition(name));
	return ptr;
}

CRelationHierarchy* CDrawableCGFactory::NewRelationHierarchy()
{
	CRelationHierarchy* ptr = dynamic_cast<CRelationHierarchy*> (new CDrawableRH);
	return ptr;
}
	
CRelationDefinition* CDrawableCGFactory::NewRelationDefinition(std::string name)
{
	CRelationDefinition* ptr = dynamic_cast<CRelationDefinition*> (new CDrawableRelationDefinition(name));
	return ptr;
}
	
CCatalogOfIndividuals* CDrawableCGFactory::NewCatalogOfIndividuals()
{
	CCatalogOfIndividuals* ptr = dynamic_cast<CCatalogOfIndividuals*> (new CDrawableCOI);
	return ptr;
}
	
CSheetOfAssertion* CDrawableCGFactory::NewSheetOfAssertion()
{
	CSheetOfAssertion* ptr = dynamic_cast<CSheetOfAssertion*> (new CDrawableSOA);
	return ptr;
}


CConcept* CDrawableCGFactory::NewConcept()
{
	CConcept* ptr = dynamic_cast<CConcept*> (new CDrawableConcept);
	return ptr;
}
	
CRelation* CDrawableCGFactory:: NewRelation()
{
	CRelation* ptr = dynamic_cast<CRelation*> (new CDrawableRelation);
	return ptr;
}
