
/*
**  This file forms part of the GOBLIN C++ Class Library.
**
**  Written by Christian Fremuth-Paeger, April 1999.
**  
**  Copying, compiling, distribution and modification
**  of this source code is permitted only in accordance
**  with the GOBLIN general licence information.
*/             


#if !defined(_GLOBALS_H_)

#define _GLOBALS_H_

#include <limits.h>
#include <float.h>
#include <stdlib.h>
#include <stdio.h>
#include <iostream.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <exception>
#include <config.h>




extern const int goblinMajorVersion;
extern const int goblinMinorVersion;


// Basic Types


#if defined(_BIG_NODES_)

typedef unsigned long   TNode;

#else

typedef unsigned short  TNode;

#endif


#if defined(_SMALL_ARCS_)

typedef unsigned short  TArc;

#else

typedef unsigned long   TArc;

#endif


typedef float           TCap;
typedef double          TFloat;
typedef unsigned long   THandle;
typedef unsigned short  TOption;


// Limits and Undefined Symbols 

extern TNode     NoNode;
extern TArc      NoArc;
extern TCap      InfCap;
extern TFloat    InfFloat;
extern THandle   NoHandle;

    
// Class Identifier Constants

enum objectType
    {IDSparseGraph,IDSparseDiGraph,IDSparseBiGraph,IDBalancedFNW,
     IDMixedGraph,IDDenseGraph,IDDenseDiGraph,IDDenseBiGraph,IDUnknown};

enum writeIncidencesType
    {OPT_INCIDENCES = 1,OPT_NO_INCIDENCES = 0};

enum constructorOptions
    {OPT_CLONE = 128,OPT_SUB = 32,OPT_PARALLELS = 64,OPT_COMPLETE = 16};


// Exception Handling

class ERGoblin                              {};

class ERIO          : protected ERGoblin    {};
class ERFile        : protected ERIO        {};
class ERParse       : protected ERIO        {};

class ERFatal       : protected ERGoblin    {};

class ERRejected    : protected ERGoblin    {};
class ERRange       : protected ERRejected  {};
class ERCheck       : protected ERRejected  {};


#endif
