#include "QGVGraphPrivate.h"

QGVGraphPrivate::QGVGraphPrivate(Agraph_t *graph)
{
	setGraph(graph);
}

void QGVGraphPrivate::setGraph(Agraph_t *graph)
{
	_graph = graph;
}

Agraph_t* QGVGraphPrivate::graph() const
{
	return _graph;
}

#include "QGVGraphPrivate.h"

QGVGraphPrivate::QGVGraphPrivate(Agraph_t *graph)
  : _graph (NULL)
{
	setGraph(graph);
}

void QGVGraphPrivate::setGraph(Agraph_t *graph)
{
  if (_graph != NULL)
    agclose(_graph);
	_graph = graph;
}

Agraph_t* QGVGraphPrivate::graph() const
{
	return _graph;
}

Call agclose when clearing the graph
Call agclose when clearing the graph
