#ifndef _D_ENV_H
#define _D_ENV_H

#include <string>
#include "bfstream.h"
#include "d_alloc.h"

namespace disk_tools {

using namespace std;
using namespace io_tools;

class d_env {
   bfstream * file;
   d_alloc * alloc;
   d_database * db;

public:
   d_env() {
      file = 0;
      alloc = 0;
      db = 0;
   }

   ~d_env() {
   }

   bfstream * get_file() {
      return file;
   }

   d_alloc * get_alloc() {
      return alloc;
   }

   d_database * get_db() {
      return db;
   }

   void set_file(bfstream * file) {
      this->file = file;
   }

   void set_db(d_database * db) {
      this->db = db;
   }

   void set_alloc(d_alloc * alloc) {
      this->alloc = alloc;
   }
};

extern d_env * p_d_env;

}

#endif /* _D_ENV_H */
