#pragma once
#include <iostream>
#include <cstring>

/** This converter is used to search string in dump file.
 *  so unvisilbe are automatically convert to space.
 */
class CharacterGraph
{
	char m_character;
	void display(std::ostream& os)const
	{
		os << (isgraph(m_character)? m_character : ' ');
	}
public:
	CharacterGraph(char c)
	{
		m_character=c;
	}
	CharacterGraph()
	{
		m_character =' ';
	}
	CharacterGraph& operator=(CharacterGraph rh)
	{
		m_character= rh.m_character;
		return *this;
	}
	operator char()const
	{
		return (isgraph(m_character)? m_character : ' ');
	}
	friend std::ostream& operator<<(std::ostream& os,
									const CharacterGraph& rh)
	{
		rh.display(os);
		return os;
	}
	
};
