/*
** reader.h for graviball in /u/a2/yousfi_r/projets/graviball/src/map
**
** Made by razik yousfi
** Login   <yousfi_r@epita.fr>
**
** Started on  Sat Nov 18 03:48:53 2006 razik yousfi
// Last update Thu Nov 23 23:11:35 2006 
*/

#ifndef READER_H_
# define READER_H_

# include <iostream>
# include <fstream>
# include <map>
# include "../factory/vertex.h"
# include "struct.hh"
# include "move.hh"
# include "shader.hh"

struct s_move_item
{
  std::string           name;
  move_function         func;
};

struct s_shader_item
{
  std::string		name;
  shader_function	func;
};

class Reader
{
public:
  Reader (std::string file);
  ~Reader ();

  void	print (struct s_map&);
  void	readBlocks (struct s_map&);
  void	readFace (struct s_map&);
  void	readWorld (struct s_map&);
  void	read (struct s_map&);

private:
  std::map<std::string, int>	faces_;
  std::string                   file_;
  std::ifstream                 fp_;
};

#endif /* !READER_H_ */
