void Token::stringify(std::ostream& os, bool varid, bool attributes, bool macro) const { if (attributes) { if (isUnsigned()) os << "unsigned "; else if (isSigned()) os << "signed "; if (isLong()) { if (_type == eString || _type == eChar) os << "L"; else os << "long "; } } if (macro && isExpandedMacro()) os << "$"; if (_str[0] != '\"' || _str.find("\0") == std::string::npos) os << _str; else { for (std::size_t i = 0U; i < _str.size(); ++i) { if (_str[i] == '\0') os << "\\0"; else os << _str[i]; } } if (varid && _varId != 0) os << '@' << _varId; }
void Token::stringify(std::ostream& os, bool varid, bool attributes) const { if (attributes) { if (isUnsigned()) os << "unsigned "; else if (isSigned()) os << "signed "; if (isLong()) os << "long "; } os << _str; if (varid && _varId != 0) os << '@' << _varId; }
DCatWidget::DCatWidget(QWidget *p) : QWidget(p) { cat = new DLabel("<h2>lo","ng</h2>"); add = new QPushButton("&Add"); QVBoxLayout *l1 = new QVBoxLayout; l1->addSpacing(20); l1->addWidget(new QLabel("<h2>Long cat is</h2>")); l1->addStretch(1); l1->addWidget(cat); l1->addStretch(2); l1->addWidget(add); QLabel *img = new QLabel; img->setPixmap(QPixmap(":img/longcat.png")); QHBoxLayout *l0 = new QHBoxLayout; l0->addLayout(l1); l0->addWidget(img); setLayout(l0); connect(add, SIGNAL(clicked()), this, SLOT(isLong())); }
const pylong* pybase::asLong() const { assert(isLong()); return (reinterpret_cast<const pylong*>(this)); }
bool Type::isIntegral() const { return isAnyChar() || isShort() || isUnsignedShort() || isInt() || isUnsignedInt() || isLong() || isUnsignedLong() || isLongLong() || isUnsignedLongLong(); }
bool Type::isSigned() const { //XXX what about plain char? return isSignedChar() || isShort() || isInt() || isLong() || isLongLong(); }