2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
2013-12-03 18:59:29 -06:00
|
|
|
// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved
|
2010-03-09 09:24:55 -06:00
|
|
|
//
|
2013-12-03 18:59:29 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:24:55 -06:00
|
|
|
// | C O R I O L I S |
|
|
|
|
// | K i t e - D e t a i l e d R o u t e r |
|
|
|
|
// | |
|
|
|
|
// | Author : Jean-Paul Chaput |
|
|
|
|
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
|
|
|
// | =============================================================== |
|
|
|
|
// | C++ Header : "./GraphicKiteEngine.cpp" |
|
2013-12-03 18:59:29 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
|
|
|
|
|
|
|
|
|
|
|
#include <functional>
|
|
|
|
#include <boost/bind.hpp>
|
|
|
|
#include <QAction>
|
|
|
|
#include <QMenu>
|
|
|
|
#include <QMenuBar>
|
|
|
|
#include <QApplication>
|
|
|
|
#include <hurricane/Warning.h>
|
|
|
|
#include <hurricane/Error.h>
|
|
|
|
#include <hurricane/Breakpoint.h>
|
|
|
|
#include <hurricane/DebugSession.h>
|
|
|
|
#include <hurricane/Go.h>
|
|
|
|
#include <hurricane/Net.h>
|
|
|
|
#include <hurricane/Cell.h>
|
|
|
|
#include <hurricane/UpdateSession.h>
|
|
|
|
#include <hurricane/viewer/Graphics.h>
|
|
|
|
#include <hurricane/viewer/CellWidget.h>
|
|
|
|
#include <hurricane/viewer/CellViewer.h>
|
|
|
|
#include <hurricane/viewer/ControllerWidget.h>
|
|
|
|
#include <crlcore/Utilities.h>
|
|
|
|
#include <crlcore/AllianceFramework.h>
|
|
|
|
#include <katabatic/GCell.h>
|
|
|
|
#include <katabatic/GCellGrid.h>
|
|
|
|
#include <knik/Edge.h>
|
|
|
|
#include <knik/Vertex.h>
|
|
|
|
#include <knik/KnikEngine.h>
|
|
|
|
#include <knik/GraphicKnikEngine.h>
|
|
|
|
#include <kite/GraphicKiteEngine.h>
|
|
|
|
//#include <kite/ConfigurationWidget.h>
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
namespace Kite {
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using Hurricane::Error;
|
|
|
|
using Hurricane::Warning;
|
|
|
|
using Hurricane::Breakpoint;
|
|
|
|
using Hurricane::DebugSession;
|
|
|
|
using Hurricane::UpdateSession;
|
2010-06-22 15:38:41 -05:00
|
|
|
using Hurricane::Point;
|
2010-03-09 09:24:55 -06:00
|
|
|
using Hurricane::Net;
|
|
|
|
using Hurricane::Graphics;
|
|
|
|
using Hurricane::ColorScale;
|
2010-04-28 10:44:07 -05:00
|
|
|
using Hurricane::ControllerWidget;
|
2010-03-09 09:24:55 -06:00
|
|
|
using CRL::Catalog;
|
|
|
|
using CRL::AllianceFramework;
|
|
|
|
using Knik::KnikEngine;
|
2010-06-22 15:38:41 -05:00
|
|
|
using Knik::GraphicKnikEngine;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
size_t GraphicKiteEngine::_references = 0;
|
|
|
|
GraphicKiteEngine* GraphicKiteEngine::_singleton = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
void GraphicKiteEngine::initKatabaticAc ( CellWidget* widget )
|
2013-12-03 18:59:29 -06:00
|
|
|
{ }
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
void GraphicKiteEngine::drawKatabaticAc ( CellWidget* widget
|
|
|
|
, const Go* go
|
|
|
|
, const BasicLayer* basicLayer
|
|
|
|
, const Box& box
|
|
|
|
, const Transformation& transformation
|
|
|
|
)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
void GraphicKiteEngine::initKatabaticGCell ( CellWidget* widget )
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
widget->getDrawingPlanes().setPen( Qt::NoPen );
|
2010-12-12 15:42:57 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
KiteEngine* kite = KiteEngine::get( widget->getCell() );
|
2010-12-12 15:42:57 -06:00
|
|
|
if ( kite ) {
|
2013-12-03 18:59:29 -06:00
|
|
|
kite->getGCellGrid()->setDensityMode( Katabatic::GCellGrid::MaxDensity );
|
2010-12-12 15:42:57 -06:00
|
|
|
}
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GraphicKiteEngine::drawKatabaticGCell ( CellWidget* widget
|
|
|
|
, const Go* go
|
|
|
|
, const BasicLayer* basicLayer
|
|
|
|
, const Box& box
|
|
|
|
, const Transformation& transformation
|
|
|
|
)
|
|
|
|
{
|
|
|
|
const Katabatic::GCell* gcell = static_cast<const Katabatic::GCell*>(go);
|
|
|
|
|
|
|
|
QPainter& painter = widget->getPainter();
|
2010-12-12 15:42:57 -06:00
|
|
|
size_t density = (size_t)( gcell->getDensity() * 255.0 );
|
2013-12-03 18:59:29 -06:00
|
|
|
if (density > 255) density = 255;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
painter.setBrush
|
|
|
|
( Graphics::getColorScale(ColorScale::Fire).getBrush(density,widget->getDarkening()) );
|
|
|
|
painter.drawRect
|
|
|
|
( widget->dbuToDisplayRect(gcell->getBoundingBox().inflate(0
|
|
|
|
,0
|
|
|
|
,gcell->getTopRightShrink()
|
|
|
|
,gcell->getTopRightShrink())) );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-04-28 10:44:07 -05:00
|
|
|
KiteEngine* GraphicKiteEngine::createEngine ()
|
2010-03-09 09:24:55 -06:00
|
|
|
{
|
|
|
|
Cell* cell = getCell ();
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
KiteEngine* kite = KiteEngine::get( cell );
|
|
|
|
if (not kite) {
|
|
|
|
kite = KiteEngine::create( cell );
|
|
|
|
kite->setPostEventCb( boost::bind(&GraphicKiteEngine::postEvent,this) );
|
2010-03-09 09:24:55 -06:00
|
|
|
} else
|
2013-12-03 18:59:29 -06:00
|
|
|
cerr << Warning( "%s already has a Kite engine.", getString(cell).c_str() ) << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
return kite;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KiteEngine* GraphicKiteEngine::getForFramework ()
|
|
|
|
{
|
|
|
|
// Currently, only one framework is avalaible: Alliance.
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
KiteEngine* kite = KiteEngine::get( getCell() );
|
|
|
|
if (kite) return kite;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
kite = createEngine();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not kite)
|
|
|
|
throw Error( "Failed to create Kite engine on %s.", getString(getCell()).c_str() );
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
return kite;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GraphicKiteEngine::saveGlobalSolution ()
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
KiteEngine* kite = KiteEngine::get( getCell() );
|
|
|
|
if (kite) kite->saveGlobalSolution ();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GraphicKiteEngine::loadGlobalSolution ()
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
KiteEngine* kite = getForFramework();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
emit cellPreModificated();
|
|
|
|
kite->runGlobalRouter( KtLoadGlobalRouting );
|
|
|
|
emit cellPostModificated();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-08-26 10:02:26 -05:00
|
|
|
void GraphicKiteEngine::globalRoute ()
|
2010-03-09 09:24:55 -06:00
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
KiteEngine* kite = getForFramework();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
emit cellPreModificated();
|
|
|
|
kite->runGlobalRouter( KtBuildGlobalRouting );
|
|
|
|
emit cellPostModificated();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-08-26 10:02:26 -05:00
|
|
|
void GraphicKiteEngine::detailRoute ()
|
2010-03-09 09:24:55 -06:00
|
|
|
{
|
2010-05-11 06:04:47 -05:00
|
|
|
static KatabaticEngine::NetSet routingNets;
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
KiteEngine* kite = KiteEngine::get( getCell() );
|
|
|
|
if (not kite) {
|
|
|
|
throw Error( "KiteEngine not created yet, run the global router first." );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
2013-12-03 18:59:29 -06:00
|
|
|
if (cmess1.enabled()) kite->printConfiguration();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
emit cellPreModificated();
|
|
|
|
_viewer->clearToolInterrupt();
|
|
|
|
kite->loadGlobalRouting( Katabatic::EngineLoadGrByNet, routingNets );
|
|
|
|
emit cellPostModificated();
|
2010-03-09 09:24:55 -06:00
|
|
|
emit cellPreModificated ();
|
2013-12-03 18:59:29 -06:00
|
|
|
kite->balanceGlobalDensity ();
|
|
|
|
kite->layerAssign ( Katabatic::EngineNoNetLayerAssign );
|
|
|
|
emit cellPostModificated();
|
|
|
|
emit cellPreModificated();
|
|
|
|
kite->runNegociate();
|
|
|
|
emit cellPostModificated();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GraphicKiteEngine::finalize ()
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
emit cellPreModificated();
|
|
|
|
KiteEngine* kite = KiteEngine::get( getCell() );
|
|
|
|
if (kite) {
|
|
|
|
kite->finalizeLayout();
|
|
|
|
kite->destroy();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
2013-12-03 18:59:29 -06:00
|
|
|
emit cellPostModificated();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GraphicKiteEngine::save ()
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
Cell* cell = getCell();
|
|
|
|
AllianceFramework* af = AllianceFramework::get();
|
|
|
|
|
|
|
|
string name = getString(cell->getName()) + "_kite";
|
|
|
|
cell->setName( name );
|
|
|
|
af->saveCell( cell, Catalog::State::Physical );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-08-26 10:02:26 -05:00
|
|
|
void GraphicKiteEngine::route ()
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
globalRoute();
|
|
|
|
detailRoute();
|
|
|
|
finalize ();
|
2010-08-26 10:02:26 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-12-15 09:12:00 -06:00
|
|
|
void GraphicKiteEngine::dumpMeasures ()
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
KiteEngine* kite = getForFramework();
|
|
|
|
if (kite) kite->dumpMeasures();
|
2010-12-15 09:12:00 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-09 09:24:55 -06:00
|
|
|
void GraphicKiteEngine::postEvent ()
|
|
|
|
{
|
|
|
|
static unsigned int count = 0;
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not (count++ % 500)) {
|
|
|
|
QApplication::processEvents();
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (_viewer->isToolInterrupted()) {
|
|
|
|
KiteEngine* kite = KiteEngine::get( getCell() );
|
|
|
|
if (kite) kite->setInterrupt( true );
|
|
|
|
_viewer->clearToolInterrupt();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GraphicKiteEngine::addToMenu ( CellViewer* viewer )
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
assert( _viewer == NULL );
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
_viewer = viewer;
|
|
|
|
|
|
|
|
QMenu* prMenu = _viewer->findChild<QMenu*>("viewer.menuBar.placeAndRoute");
|
|
|
|
QMenu* stepMenu = _viewer->findChild<QMenu*>("viewer.menuBar.placeAndRoute.stepByStep");
|
2013-12-03 18:59:29 -06:00
|
|
|
if (prMenu == NULL) {
|
2010-03-09 09:24:55 -06:00
|
|
|
QMenuBar* menuBar = _viewer->findChild<QMenuBar*>("viewer.menuBar");
|
2013-12-03 18:59:29 -06:00
|
|
|
if (menuBar == NULL) {
|
|
|
|
cerr << Warning( "GraphicKiteEngine::addToMenu() - No MenuBar in parent widget." ) << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
return;
|
|
|
|
}
|
2013-12-03 18:59:29 -06:00
|
|
|
prMenu = menuBar->addMenu( tr("P&&R") );
|
|
|
|
prMenu->setObjectName( "viewer.menuBar.placeAndRoute" );
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
stepMenu = prMenu->addMenu( tr("&Step by Step") );
|
|
|
|
stepMenu->setObjectName( "viewer.menuBar.placeAndRoute.stepByStep" );
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
prMenu->addSeparator();
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
QAction* dRouteAction = _viewer->findChild<QAction*>("viewer.menuBar.placeAndRoute.detailedRoute");
|
2013-12-03 18:59:29 -06:00
|
|
|
if (dRouteAction)
|
|
|
|
cerr << Warning( "GraphicKiteEngine::addToMenu() - Kite detailed router already hooked in." ) << endl;
|
2010-03-09 09:24:55 -06:00
|
|
|
else {
|
2013-12-03 18:59:29 -06:00
|
|
|
stepMenu->addSeparator();
|
|
|
|
|
|
|
|
QAction* gRouteAction = new QAction ( tr("Kite - &Global Route"), _viewer );
|
|
|
|
gRouteAction->setObjectName( "viewer.menuBar.placeAndRoute.stepBystep.globalRoute" );
|
|
|
|
gRouteAction->setStatusTip ( tr("Run the <b>Knik</b> global router") );
|
|
|
|
gRouteAction->setVisible ( true );
|
|
|
|
stepMenu->addAction( gRouteAction );
|
|
|
|
|
|
|
|
QAction* gLoadSolutionAction = new QAction ( tr("Kite - &Load Global Routing"), _viewer );
|
|
|
|
gLoadSolutionAction->setObjectName( "viewer.menuBar.placeAndRoute.stepByStep.loadGlobalRouting" );
|
|
|
|
gLoadSolutionAction->setStatusTip ( tr("Load a solution for the global routing (.kgr)") );
|
|
|
|
gLoadSolutionAction->setVisible ( true );
|
|
|
|
stepMenu->addAction( gLoadSolutionAction );
|
|
|
|
|
|
|
|
QAction* gSaveSolutionAction = new QAction ( tr("Kite - &Save Global Routing"), _viewer );
|
|
|
|
gSaveSolutionAction->setObjectName( "viewer.menuBar.placeAndRoute.stepByStep.saveGlobalRouting" );
|
|
|
|
gSaveSolutionAction->setStatusTip ( tr("Save a global router solution (.kgr)") );
|
|
|
|
gSaveSolutionAction->setVisible ( true );
|
|
|
|
stepMenu->addAction( gSaveSolutionAction );
|
|
|
|
|
|
|
|
dRouteAction = new QAction ( tr("Kite - &Detailed Route"), _viewer );
|
|
|
|
dRouteAction->setObjectName( "viewer.menuBar.placeAndRoute.stepBystep.detailedRoute" );
|
|
|
|
dRouteAction->setStatusTip ( tr("Run the <b>Kite</b> detailed router") );
|
|
|
|
dRouteAction->setVisible ( true );
|
|
|
|
stepMenu->addAction( dRouteAction );
|
|
|
|
|
|
|
|
QAction* dFinalizeAction = new QAction( tr("Kite - &Finalize Routing"), _viewer );
|
|
|
|
dFinalizeAction->setObjectName( "viewer.menuBar.placeAndRoute.stepBystep.finalize" );
|
|
|
|
dFinalizeAction->setStatusTip ( tr("Closing Routing") );
|
|
|
|
dFinalizeAction->setVisible ( true );
|
|
|
|
stepMenu->addAction( dFinalizeAction );
|
2010-03-09 09:24:55 -06:00
|
|
|
|
2010-12-15 09:12:00 -06:00
|
|
|
QAction* dDumpMeasuresAction = new QAction ( tr("Kite - Dump &Measures"), _viewer );
|
2013-12-03 18:59:29 -06:00
|
|
|
dDumpMeasuresAction->setObjectName( "viewer.menuBar.placeAndRoute.stepBystep.dumpMeasures" );
|
|
|
|
dDumpMeasuresAction->setStatusTip ( tr("Dumping Measurements on the disk") );
|
|
|
|
dDumpMeasuresAction->setVisible ( true );
|
|
|
|
stepMenu->addAction( dDumpMeasuresAction );
|
2010-12-15 09:12:00 -06:00
|
|
|
|
2010-03-09 09:24:55 -06:00
|
|
|
QAction* dSaveAction = new QAction ( tr("Kite - &Save Design"), _viewer );
|
2013-12-03 18:59:29 -06:00
|
|
|
dSaveAction->setObjectName( "viewer.menuBar.placeAndRoute.stepBystep.save" );
|
|
|
|
dSaveAction->setStatusTip ( tr("Save routed design (temporary hack)") );
|
|
|
|
dSaveAction->setVisible ( true );
|
|
|
|
stepMenu->addAction( dSaveAction );
|
|
|
|
|
|
|
|
QAction* routeAction = new QAction ( tr("Kite - &Route"), _viewer );
|
|
|
|
routeAction->setObjectName( "viewer.menuBar.placeAndRoute.route" );
|
|
|
|
routeAction->setStatusTip ( tr("Route the design (global & detailed)") );
|
|
|
|
routeAction->setVisible ( true );
|
|
|
|
prMenu->addAction( routeAction );
|
|
|
|
|
|
|
|
connect( gLoadSolutionAction, SIGNAL(triggered()), this, SLOT(loadGlobalSolution()) );
|
|
|
|
connect( gSaveSolutionAction, SIGNAL(triggered()), this, SLOT(saveGlobalSolution()) );
|
|
|
|
connect( gRouteAction , SIGNAL(triggered()), this, SLOT(globalRoute ()) );
|
|
|
|
connect( dRouteAction , SIGNAL(triggered()), this, SLOT(detailRoute ()) );
|
|
|
|
connect( dFinalizeAction , SIGNAL(triggered()), this, SLOT(finalize ()) );
|
|
|
|
connect( dSaveAction , SIGNAL(triggered()), this, SLOT(save ()) );
|
|
|
|
connect( dDumpMeasuresAction, SIGNAL(triggered()), this, SLOT(dumpMeasures ()) );
|
|
|
|
connect( routeAction , SIGNAL(triggered()), this, SLOT(route ()) );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
connect( this, SIGNAL(cellPreModificated ()), _viewer->getCellWidget(), SLOT(cellPreModificate ()) );
|
|
|
|
connect( this, SIGNAL(cellPostModificated()), _viewer->getCellWidget(), SLOT(cellPostModificate()) );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const Name& GraphicKiteEngine::getName () const
|
2013-12-03 18:59:29 -06:00
|
|
|
{ return KiteEngine::staticGetName(); }
|
2010-03-09 09:24:55 -06:00
|
|
|
|
|
|
|
|
|
|
|
Cell* GraphicKiteEngine::getCell ()
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
if (_viewer == NULL) {
|
|
|
|
throw Error( "<b>Kite:</b> GraphicKiteEngine not bound to any Viewer." );
|
2010-03-09 09:24:55 -06:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
if (_viewer->getCell() == NULL) {
|
|
|
|
throw Error( "<b>Kite:</b> No Cell is loaded into the Viewer." );
|
2010-03-09 09:24:55 -06:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return _viewer->getCell();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
GraphicKiteEngine* GraphicKiteEngine::grab ()
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
if (not _references) {
|
2010-03-09 09:24:55 -06:00
|
|
|
_singleton = new GraphicKiteEngine ();
|
|
|
|
}
|
|
|
|
_references++;
|
|
|
|
|
|
|
|
return _singleton;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
size_t GraphicKiteEngine::release ()
|
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
--_references;
|
|
|
|
if (not _references) {
|
2010-03-09 09:24:55 -06:00
|
|
|
delete _singleton;
|
|
|
|
_singleton = NULL;
|
|
|
|
}
|
|
|
|
return _references;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
GraphicKiteEngine::GraphicKiteEngine ()
|
|
|
|
: GraphicTool()
|
2013-12-03 18:59:29 -06:00
|
|
|
, _viewer (NULL)
|
2010-03-09 09:24:55 -06:00
|
|
|
{
|
2013-12-03 18:59:29 -06:00
|
|
|
addDrawGo( "Knik::Edge" , GraphicKnikEngine::initKnikEdges , GraphicKnikEngine::drawKnikEdges );
|
|
|
|
addDrawGo( "Knik::Vertex" , GraphicKnikEngine::initKnikVertex, GraphicKnikEngine::drawKnikVertex );
|
|
|
|
addDrawGo( "Katabatic::Ac" , initKatabaticAc , drawKatabaticAc );
|
|
|
|
addDrawGo( "Katabatic::GCell", initKatabaticGCell, drawKatabaticGCell );
|
2010-03-09 09:24:55 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
GraphicKiteEngine::~GraphicKiteEngine ()
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
2013-12-03 18:59:29 -06:00
|
|
|
} // Kite namespace.
|