Пример #1
0
void Translator::translate()
{
	m_lineNumb = 0;
	Program::getInstance().clear();
	std::string str;


	while(readString(str) == false)
	{
		boost::trim(str);
		if(Translator::isEmptyOrComment(str) == false)
		{
			if(boost::istarts_with(str, ".name") == false)
				throw ParseError(str + " not expected");

			translateFunction(str);
		}
	}

	callOperandsCheck();

	m_in.close();

	if(Program::getInstance().functionIsExists("main") == false)
		throw ParseError("function `main` not exists");

}
Пример #2
0
void Camera::transformation()
{
    postset().postTranslate(translateFunction());
}
Пример #3
0
Rect Camera::getRegion()
{
    Pixel newtl=translateFunction();
    return Rect(newtl.getX(), newtl.getY(), newtl.getX()+getWidth(), newtl.getY()+getHeight());
}