void CSSselector::attribute(CSSselector selector) { int group = 0; int connected = 0; // Check previous tag to see if it applies to this one. if (tagContainer.size() != 0){ group = tagContainer.back().getTagGroup() + 1; connected = tagContainer.back().getTagType(); } // Open attribute CSStag::setTag(4, group, connected, ""); CSStag::setTagExtend(1); insertSelector(); clearTag(); // Extract attribute from selector for (int i = 0;i < (int)selector.getSelectorContainer().size(); i++){ CSStag::setTag(selector.getSelectorContainer().at(i).getTagType(), group, 4, selector.getSelectorContainer().at(i).getTagName()); if (i != 1) {CSStag::setTagExtend(selector.getSelectorContainer().at(i).getTagExtend());} insertSelector(); clearTag(); } // Close attribute CSStag::setTag(5, group, connected, ""); CSStag::setTagExtend(1); insertSelector(); clearTag(); }
void CSSselector::attribute(std::string name) { int group = 0; int connected = 0; // Check previous tag to see if it applies to this one. if (tagContainer.size() != 0){ group = tagContainer.back().getTagGroup() + 1; connected = tagContainer.back().getTagType(); } // Open attribute CSStag::setTag(4, group, connected, ""); CSStag::setTagExtend(1); insertSelector(); clearTag(); // Create selector element selector(name); // Close attribute CSStag::setTag(5, group, connected, ""); CSStag::setTagExtend(1); insertSelector(); clearTag(); }
void CSSselector::setSelector(int type, std::string name) { tagContainer.clear(); CSStag::setTag(type, name); CSStag::setTagExtend(1); insertSelector(); clearTag(); }
void CSSselector::setSelector(CSStag tag) { tagContainer.clear(); setTag(tag.getTag()); CSStag::setTagExtend(1); insertSelector(); clearTag(); }
void shouldRetagItemsOnModify() { // GIVEN auto data = Testlib::AkonadiFakeData(); QScopedPointer<Akonadi::MonitorInterface> monitor(data.createMonitor()); QSignalSpy spy(monitor.data(), &Akonadi::MonitorInterface::itemChanged); auto t1 = Akonadi::Tag(42); t1.setName(QStringLiteral("42")); data.createTag(t1); auto t2 = Akonadi::Tag(43); t2.setName(QStringLiteral("43")); data.createTag(t2); auto i1 = Akonadi::Item(42); i1.setPayloadFromData("42"); i1.setTag(Akonadi::Tag(42)); data.createItem(i1); // WHEN i1.setPayloadFromData("42-bis"); i1.clearTag(Akonadi::Tag(42)); i1.setTag(Akonadi::Tag(43)); data.modifyItem(i1); // THEN QVERIFY(data.tagItems(t1.id()).isEmpty()); QCOMPARE(data.tagItems(t2.id()).size(), 1); QCOMPARE(data.tagItems(t2.id()).at(0), i1); QCOMPARE(spy.size(), 1); QCOMPARE(spy.takeFirst().at(0).value<Akonadi::Item>(), i1); }
void CSSselector::media(CSStag tag) { // Media selector tags do not come before any other selector elements. tagContainer.clear(); CSStag::setTag(6, tag.getTagName()); setTagExtend(1); insertSelector(); clearTag(); }
void CSSselector::media(std::string name) { // Media selector tags do not come before any other selector elements. tagContainer.clear(); CSStag::setTag(6, name); setTagExtend(1); insertSelector(); clearTag(); }
void CSSselector::selector(int type, std::string name) { int group = 0; int connected = 0; // Check previous tag to see if it applies to this one. if (tagContainer.size() != 0){ group = tagContainer.back().getTagGroup() + 1; connected = tagContainer.back().getTagType(); } CSStag::setTag(type, group, connected, name); insertSelector(); clearTag(); }
void CSSselector::selector(CSStag tag) { int group = tag.getTagGroup(); int previousGroup = tagContainer.back().getTagGroup(); int connected = tag.getTagConnected(); int previousConnected = tagContainer.back().getTagType(); // If group and connection is set in tag, see if it applies to current selector. if (group != 0 && group <= previousGroup){ group = previousGroup + 1;} if (group == previousGroup){ connected = previousConnected;} CSStag::setTag(tag.getTagType(), group, connected, tag.getTagName()); insertSelector(); clearTag(); }
void loop(){ char tagString[13]; getRFIDTagName(tagString); validRFID = checkTag(tagString); //Check if it is a match // turn on green LED if valid RFID setTrainLed(validRFID); clearTag(tagString); //Clear the char of all value resetReader(); //eset the RFID reader }
void CSSselector::combinator(std::string name1, std::string comparison, std::string name2) { int group = 0; int connected = 0; std::string compare; compare = comparison; // Check previous tag to see if it applies to this one. if (tagContainer.size() != 0){ group = tagContainer.back().getTagGroup() + 1; connected = tagContainer.back().getTagType(); } CSStag::setTag(0, group, connected, name1); CSStag::setTagExtend(1); insertSelector(); clearTag(); CSStag::setTag(7, group, connected, compare); insertSelector(); clearTag(); CSStag::setTag(0, group, connected, name2); insertSelector(); clearTag(); }
void CSSselector::pseudo(CSStag tag) { int group = 0; int connected = 0; // Check previous tag to see if it applies to this one. if (tagContainer.size() != 0){ group = tagContainer.back().getTagGroup() + 1; connected = tagContainer.back().getTagType(); } CSStag::setTag(3, group, connected, tag.getTagName()); CSStag::setTagExtend(1); insertSelector(); clearTag(); }
void unlock() { clearTag(tail_, std::memory_order_release); }
void clearTag(const char* tag) { clearTag(sym(tag)); }
InnovationsRFID::InnovationsRFID(){ clearTag(); }
void unlock() { VEDGE(pre, unlock); LS(unlock, clearTag(tail_)); }