/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   Factory.hpp                                        :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: abartz <abartz@student.42.fr>              +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2018/05/25 14:12:03 by abartz            #+#    #+#             */
/*   Updated: 2018/05/28 20:53:14 by abartz           ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#pragma once

#include <string>
#include "Operand.hpp"

class Factory
{
public:
	Factory() {}
	const IOperand*
		createOperand(eOperandType type, const std::string& value) const;

private:
	using _ld = long double;
	using FuncPtr = const IOperand* (Factory::*)(const std::string&) const;

	const IOperand* createInt8(const std::string& value) const;
	const IOperand* createInt16(const std::string& value) const;
	const IOperand* createInt32(const std::string& value) const;
	const IOperand* createFloat(const std::string& value) const;
	const IOperand* createDouble(const std::string& value) const;
};
