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"); }
void Camera::transformation() { postset().postTranslate(translateFunction()); }
Rect Camera::getRegion() { Pixel newtl=translateFunction(); return Rect(newtl.getX(), newtl.getY(), newtl.getX()+getWidth(), newtl.getY()+getHeight()); }