// COPYRIGHT Dassault Systemes 2003
// COPYRIGHT ANSYS/ICEMCFD 2003-2005
//===================================================================
//
// ICCGatewayCfg.cpp
// Provide implementation to interface
//    CATISAMWorkshopConfiguration
//
//===================================================================
//
// Usage notes:
//
//===================================================================
//  May 2003  Creation: Code generated by the CAA wizard  icemcfd
//===================================================================
#include <iostream.h>
#include "ICCGatewayCfg.h"

#include "ICCGeneral.h"
#include "CATInstantiateComponent.h"
#include "CATCommandHeader.h"                  // New Class Of command Header
MacDeclareHeader (ICCGatewayCommandHeader);             
#include "CATCreateWorkshop.h"                 // ApplicationFrame Macros

#include "ICCIGatewayAddin.h"

CATImplementClass( ICCGatewayCfg,
		   Implementation,
		   CATBaseUnknown,
		   CATNull );

//--------------------------------------------------------------------------
// ICCGatewayCfg : constructor
//--------------------------------------------------------------------------
ICCGatewayCfg::ICCGatewayCfg():
    CATBaseUnknown()
{
}

//--------------------------------------------------------------------------
// ICCGatewayCfg : destructor
//--------------------------------------------------------------------------
ICCGatewayCfg::~ICCGatewayCfg()
{
}

// Tie the implementation to its interface
// ---------------------------------------
#include "TIE_CATISAMWorkshopConfiguration.h"
TIE_CATISAMWorkshopConfiguration( ICCGatewayCfg);

static int DisplayedLicenseMsg = 0;
//===========================================================================
void ICCGatewayCfg::CreateCommands()
{
    CATUnicodeString Solution("ICCGatewaySet");
    if (ICCGeneral::IsLicenseValid() == 0) {
	cout << "ICCGatewayCfg::CreateCommands No license found" << endl;
    } else {
	new ICCGatewayCommandHeader("DisplaySolution", "ICCGateway", "ICCDisplaySolutionCom", &Solution );

__BCS_CMDHEADERS__
    }
}
//===========================================================================

CATCmdWorkbench* ICCGatewayCfg::CreateWorkbench()
{
    if (ICCGeneral::IsLicenseValid() == 0) {
	cout << "ICCGatewayCfg::CreateWorkbench No license found" << endl;
    } else {
	// ICCGatewayCfg Workbench layout
	NewAccess(CATCmdWorkbench,pICCGatewayWkb,ICCGatewayCfg);

	// New menu bar
	NewAccess(CATCmdContainer,pAniMeb01,CATNewMenuBar);
	NewAccess(CATCmdContainer,pAniTlb05,Gateway);
	SetAccessChild(pAniMeb01,pAniTlb05);

	//----------------------
	//  Display Solution
	//----------------------
	NewAccess(CATCmdStarter,pDisplaySolutionCom,DisplaySolutionCom);
	SetAccessCommand(pDisplaySolutionCom,"DisplaySolution");
	SetAccessChild(pAniTlb05,pDisplaySolutionCom);

__BCS_MENUS__
    
	NewAccess(CATCmdWorkbench,pICCHexaWkb,ICCHexaCfg);

	// Visible menu bar
	SetWorkbenchMenu(pICCGatewayWkb,pAniMeb01);
	return pICCGatewayWkb;
    }
    return NULL;
}

//===========================================================================

CATClassId ICCGatewayCfg::GetAddinInterface()
{
    return ICCIGatewayAddin::ClassName();
}
//===========================================================================

void ICCGatewayCfg::GetCustomInterfaces(CATListPV * DefaultIIDList,
					CATListPV * CustomIIDList)
{
}
//===========================================================================

