//-*-c++-*-
#ifndef _TLPTOOLS_H
#define _TLPTOOLS_H

#include "SuperGraph.h"
#include "LayoutProxy.h"
#include "MetricProxy.h"
#include "StringProxy.h"
#include "SelectionProxy.h"
#include "ColorsProxy.h"
#include "IntProxy.h"
#include "SizesProxy.h"
#include "PluginProgress.h"
#include "Reflect.h"

#ifndef _TULIP_LIB_DIR
#define _TULIP_LIB_DIR "/usr/local/lib/"
#endif

namespace TlpTools {
  extern string TulipLibDir;
  extern string TulipPluginsPath;
  
  extern void initTulipLib();
  
  extern TemplateFactory<ClusteringFactory,Clustering,ClusterContext > clusteringFactory;
  extern TemplateFactory<ImportModuleFactory,ImportModule,ClusterContext > importFactory;
  extern TemplateFactory<ExportModuleFactory,ExportModule,ClusterContext > exportFactory;
  void loadPlugins(PluginLoader *plug=0);

  SuperGraph * importGraph(const std::string &alg, DataSet &dataSet, PluginProgress *plugProgress=NULL);
  bool exportGraph(SuperGraph *sg,std::ostream  &os,const std::string &alg, DataSet &dataSet, PluginProgress *plugProgress=0);
  bool clusterizeGraph(SuperGraph *sg,std::string &errorMsg, const std::string &alg="hierarchical" , PluginProgress *plugProgress=0);
  SuperGraph* newSuperGraph();
  //  return an empty sub graph 
  SuperGraph *newSubGraph(SuperGraph *,string name = "unnamed");
};

#endif
